Skip to content

Instantly share code, notes, and snippets.

@antitree
antitree / onionporn.py
Created October 27, 2012 02:40
Python implementation of Tor's password hashing OpenPGP S2K algorithm
import os, binascii, hashlib
#supply password
secret = 'foo'
#static 'count' value later referenced as "c"
indicator = chr(96)
#used to generate salt
rng = os.urandom
@antitree
antitree / pumpkins.arduino
Created October 31, 2012 01:34
Stupid halloween pumpkins
/*
Stupid Pumpkins
v0.03
*/
unsigned char upDown=1; // start off going UP
int cylon=0;
int leds=11; // number of LEDs plugged in
int demo=1;
int count=0;
@antitree
antitree / gist:5237253
Created March 25, 2013 13:53
ISTS X autoshell pwner
import requests
import time
from optparse import OptionParser
timeout = 5
parser = OptionParser()
parser.add_option("-x", dest="host",
help="Choose an individual host to test")
@antitree
antitree / Tweetcollect.py
Created June 22, 2013 02:06
Example of using the 1.1 twitter API to collect tweets for a user since they shut down the 1.0 API.
#!/usr/bin/python
#
# Author: Antitree
# Description: Example of using the new Twitter 1.1 API to
# collect all the tweets from a user.
#
# Derived from tsileo
# https://gist.github.com/tsileo/4637864/raw/9ea056ffbe5bb88705e95b786332ae4c0fd7554c/mytweets.py
#
@antitree
antitree / gist:5905486
Created July 1, 2013 23:16
Longify without making a direct connection
import requests
def longify(url):
try:
r = requests.get(url, allow_redirects=False)
if r.status_code = 301:
lurl = r.headers['location']
return lurl
return url
except:
@antitree
antitree / Halloween_Brain0.1.pde
Last active September 7, 2018 10:59
Example Arduino code to run a neopixel for my Halloween brain
#include <Adafruit_NeoPixel.h>
//Hacked from the original Adafruit library demo
#define PIN 6 //my control pin
// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)

Keybase proof

I hereby claim:

  • I am antitree on github.
  • I am antitree (https://keybase.io/antitree) on keybase.
  • I have a public key whose fingerprint is 0B2C 9595 A8E0 3683 A81F E3EE 68B1 A274 584F 01E8

To claim this, I am signing this object:

@antitree
antitree / gist:768e1beb1f2d7d9ee9eb
Last active August 29, 2015 14:23
Simple example of a Tor script that leaks DNS
import requesocks
import BeautifulSoup as bs
base_url = 'http://treebind.antitree.com:8000'
test_url = base_url + '/test'
session = requesocks.session()
session.proxies = {'http': 'socks5://127.0.0.1:9050'}
print("Getting: %s" % test_url)
r = session.get(test_url)
s = bs.BeautifulSoup(r.text)
@antitree
antitree / Winning v1
Last active August 29, 2015 14:27
First attempt at the script
import requests
import time
import sys
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0',
'Referer': 'http://www.interlockroc.org'
}
#for i in range(1000000):
print("Starting Winning v1")
Nov 23, 2015 21:29:38:984 (freenet.keys.FreenetURI, Datastore checker(11), MINOR): Created from components (USK): USK@JWTT8rDSrYNQkv73wSww6fhYC9Z6AzUREzDO8xJCluI,Lpt8uGZy~y2UtMwMOwTjsdQHbAbjduxFBFFqZI5TGfI,AQACAAE/CENO-signaler/1
Nov 23, 2015 21:29:38:984 (freenet.client.async.ClientRequestScheduler, Datastore checker(11), MINOR): finishRegister for freenet.client.async.USKFetcher$DBRFetcher@7ceceac3 for freenet.client.async.USKFetcher@37c9d2fe for freenet.keys.USK@26ad91e3:USK@JWTT8rDSrYNQkv73wSww6fhYC9Z6AzUREzDO8xJCluI,Lpt8uGZy~y2UtMwMOwTjsdQHbAbjduxFBFFqZI5TGfI,AQACAAE/CENO-signaler/1 anyValid=true persistent=false
Nov 23, 2015 21:29:38:984 (freenet.keys.FreenetURI, Datastore checker(11), MINOR): Created from components (USK): USK@JWTT8rDSrYNQkv73wSww6fhYC9Z6AzUREzDO8xJCluI,Lpt8uGZy~y2UtMwMOwTjsdQHbAbjduxFBFFqZI5TGfI,AQACAAE/CENO-signaler/1
Nov 23, 2015 21:29:38:984 (freenet.keys.FreenetURI, Datastore checker(11), MINOR): Created from components (USK): USK@JWTT8rDSrYNQkv73wSww6fhYC9Z6AzUREzDO8xJCluI,Lpt8uG