Skip to content

Instantly share code, notes, and snippets.

@0x00dec0de
0x00dec0de / t9.sh
Created May 8, 2016 21:45 — forked from atnan/t9.sh
#!/usr/bin/env bash
# Get a sample dictionary here:
# http://labs.kitiyo.com/files/t9.dic
umask 077
NUMN=/tmp/numn.$$
trap "exit 1" HUP INT PIPE QUIT TERM
trap "rm -f $DICTN $NUMN" EXIT
@0x00dec0de
0x00dec0de / rsyncrypto.sh
Created September 26, 2016 16:21 — forked from cristianrasch/rsyncrypto.sh
rsyncrypto tutorial
# Generate your backup private key and certificate
openssl req -nodes -newkey rsa:1536 -x509 -keyout backup.key -out backup.crt
# Encrypt your data to a temporary folder
rsyncrypto --verbose --ne-nesting=2 --trim=2 --name-encrypt=/tmp/rsyncrypto-map --delete-keys --changed --recurse /home/cristian/Dropbox/ /tmp/Dropbox/ /tmp/rsyncrypto-keys ~/Dropbox/backups/laptop/crypto/rsyncrypto/backup.crt
# Send it over the network
rsync --verbose --archive --compress --delete /tmp/Dropbox/ pi:~/backups/laptop
# Decryption time!
@0x00dec0de
0x00dec0de / git-cloneall
Created October 3, 2016 14:32 — forked from tstone2077/git-cloneall
Clones as usual but creates local tracking branches for all remote branches.
#!/bin/bash
# Clones as usual but creates local tracking branches for all remote branches.
# To use, copy this file into the same directory your git binaries are (git, git-flow, git-subtree, etc)
clone_output=$((git clone "$@" ) 2>&1)
retval=$?
echo $clone_output
if [[ $retval != 0 ]] ; then
exit 1
@0x00dec0de
0x00dec0de / AAA GPG Encrypt a file to a large number of recipients README.md This batch file is used to encrypt a file with GPG against a large number of recipient email addresses

Using this script

Place this batch file and the text file into the same directory, edit the batch file to specify the key server and the text file to specify the names to encrypt.

If you hit an issue where an individual has multiple keys against their name, the script may well complain and ditch responses. In this case, uncomment the line in the batch file which says: REM %COMMAND% --recv-keys <KEY ID>

So it should say instead: %COMMAND% --recv-keys DECAFBAD

This file has been truncated, but you can view the full file.
d,rank,ip,country
idealmilf.com,108296,78.140.130.6,Netherlands
skygals.com,415859,173.244.206.50,United States
guardomogli.com,658261,104.28.30.26,
sexy-streaming.com,117104,5.39.117.50,France
beach-porn.net,576671,173.214.250.167,United States
blackredtube.com,598818,88.208.0.196,United States
pornotom.com,449107,104.27.129.76,
pornflip.com,79500,199.101.134.20,United States
@0x00dec0de
0x00dec0de / polygon.php
Created October 12, 2016 15:10 — forked from spectrox/polygon.php
Polygon
<?php
class Polygon {
protected $polygon = array();
/**
* Polygon itself, with basic vector-based structure
* Array: [ [1,1], [2,1], [3,0], [2,-1] ]
*
@0x00dec0de
0x00dec0de / auth.go
Created October 27, 2016 14:42 — forked from tristanwietsma/auth.go
Golang web server example
package main
import (
"encoding/base64"
"net/http"
"strings"
)
type handler func(w http.ResponseWriter, r *http.Request)
@0x00dec0de
0x00dec0de / sine.py
Created December 8, 2016 13:24 — forked from ThomDietrich/sine.py
Pump a sine way into a local influxdb cluster
#!/usr/bin/python
import json
import math
import requests
import sys
from time import sleep
IP = "192.168.0.2"
DB = "test"
@0x00dec0de
0x00dec0de / aescmd.go
Created December 19, 2016 13:52 — forked from josephspurrier/aescmd.go
Golang - Encrypt, Decrypt, File Read, File Write, Readline
package main
import (
"bufio"
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"fmt"
"io"
"io/ioutil"
@0x00dec0de
0x00dec0de / ip_in_range.php
Created January 20, 2017 12:03 — forked from tott/ip_in_range.php
php check if IP is in given network range
/**
* Check if a given ip is in a network
* @param string $ip IP to check in IPV4 format eg. 127.0.0.1
* @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed
* @return boolean true if the ip is in this range / false if not.
*/
function ip_in_range( $ip, $range ) {
if ( strpos( $range, '/' ) == false ) {
$range .= '/32';
}