Skip to content

Instantly share code, notes, and snippets.

@binkybear
binkybear / gist:872b9dda631d10bcbb23
Created December 26, 2015 20:58
M2Crypto on El Capitan (in virtualenv)
brew install openssl
brew install swig
# In this case I was using kivy interpreter
cd /Applications/Kivy.app/Contents/Resources
env LDFLAGS="-L$(brew --prefix openssl)/lib" \
CFLAGS="-I$(brew --prefix openssl)/include" \
SWIG_FEATURES="-cpperraswarn -includeall -I$(brew --prefix openssl)/include" \
./python venv/bin/pip install m2crypto
{
"sdk": [
{
"windows":"http://tools.android.com/download/sdk-repo-windows-platform-tools-2219198.zip",
"osx":"http://tools.android.com/download/sdk-repo-darwin-platform-tools-2219242.zip",
"linux":"http://tools.android.com/download/sdk-repo-linux-platform-tools-2219198.zip",
"adb_version":"1.0.32"
}
],
"devices": [
@binkybear
binkybear / gist:25bef6e646adc619b4a5
Created January 4, 2016 23:54
NH - Read text file > output to hid
#!/bin/bash
INPUT=$1
HIDKEY="/system/xbin/hid-keyboard"
while IFS= read -r -N 1 char; do
if [ "$char" == $'\n' ] || [ "$char" == $'\r' ]; then
# For each new line = return key
echo enter | $HIDKEY /dev/hidg0 keyboard
else
@binkybear
binkybear / filetohid.py
Last active January 6, 2016 02:52
filetohid.py
import argparse # Handle arguments
import os # To write hid comands to system
from keyseed import * # The bytes to translate to keyboard codes
'''
Arguments for filetohid.py
python filetohid.py -f [inputfile] -l us
python filetohid.py -s "this is a string" -l us
@binkybear
binkybear / tpsetup.sh
Created January 31, 2016 19:43
Quick bash script for TOR/privoxy set up
#!/bin/bash
#
# Quickly get TOR/privoxy running with python modifiable python script to change IP every 10 seconds
# See https://github.com/FrackingAnalysis/PyTorStemPrivoxy for more details
#
echo "Downloading prerequisites"
apt-get install -y tor privoxy python-stem wget
echo "Setting up privoxy"
@binkybear
binkybear / useragents.txt
Created March 4, 2016 01:55
Giant list of user agents strings generated from https://github.com/binkybear/user-agent_strings_db
This file has been truncated, but you can view the full file.
Mozilla/5.0 (compatible; U; ABrowse 0.6; Syllable) AppleWebKit/420+ (KHTML, like Gecko)
Mozilla/5.0 (compatible; U; ABrowse 0.6; Syllable) AppleWebKit/420+ (KHTML, like Gecko)
Mozilla/5.0 (compatible; ABrowse 0.4; Syllable)
Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Acoo Browser 1.98.744; .NET CLR 3.5.30729)
Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Acoo Browser 1.98.744; .NET CLR 3.5.30729)
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Acoo Browser; GTB5; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; InfoPath.1; .NET CLR 3.5.30729; .NET CLR 3.0.30618)
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; SV1; Acoo Browser; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Avant Browser)
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Acoo Browser; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Acoo Browser; GTB5; Mozilla/4.0 (compat
@binkybear
binkybear / hostapd-wpe-install.sh
Created April 6, 2016 22:41
hostapd-wpe in kali linux
#!/bin/bash
#
# hostapd-wpe installation on Kali Linux
#
cd /tmp
git clone https://github.com/OpenSecurityResearch/hostapd-wpe
wget http://w1.fi/releases/hostapd-2.2.tar.gz
tar -zxf hostapd-2.2.tar.gz
cd hostapd-2.2
patch -p1 < ../hostapd-wpe/hostapd-wpe.patch
#
# All this should be done in Nethunter chroot
#
apt-get install -y subversion libglib2.0 libxml2-dev libpcap-dev libtool rrdtool librrd-dev autoconf automake autogen redis-server wget libsqlite3-dev libhiredis-dev libgeoip-dev libcurl4-openssl-dev libpango1.0-dev libcairo2-dev
apt-get install -y libpng12-dev git dh-autoreconf libcurl4-gnutls-dev libsqlite3-dev libmysqlclient-dev pkg-config libxml2-dev libglib2.0-dev
# Modify /etc/group by adding redis to inet group
nano /etc/group
# inet:x:3004:postgres,root,beef-xss,daemon,nginx,mysql,redis
git clone https://github.com/gitdurandal/dbd.git
cd dbd
#
# Edit dbd.h with settings to callback or listen
#
# Edit Makefile and add Wno-pointer-sign
#
# UNIX32_CFLAGS += -Wall -Wshadow -Os -m32 -march=i386 -Wno-pointer-sign
make unix
#!/bin/bash
# This is the Raspberry Pi2 Kali ARM build script - http://www.kali.org/downloads
# A trusted Kali Linux image created by Offensive Security - http://www.offensive-security.com
if [[ $# -eq 0 ]] ; then
echo "Please pass version number, e.g. $0 2.0"
exit 0
fi