Skip to content

Instantly share code, notes, and snippets.

@chx
Created November 2, 2012 02:09
Show Gist options
  • Save chx/3998244 to your computer and use it in GitHub Desktop.
Save chx/3998244 to your computer and use it in GitHub Desktop.
Initiate test
cd /tmp/serverlist
for i in * ; do scp /var/www/$1.torrent $i:torrent/watch/ ; done
/usr/local/bin/extract
#!/usr/bin/python
import libtorrent as lt
import sys
torrent = open(sys.argv[1], 'rb').read()
print str(lt.torrent_info(torrent, len(torrent)).info_hash())
/usr/local/etc/opentracker/opentracker.conf
listen.tcp_udp 10.181.4.207:6969
access.whitelist /whitelist
tracker.rootdir /usr/local/etc/opentracker
tracker.user nobody
/usr/local/bin/prepare
cd /var/www
rm -f $1.torrent
rm -rf $1/.git
mkdir tests
distribute $1
mktorrent -a http://10.181.4.207:6969/announce $1
extract $1.torrent >> /usr/local/etc/opentracker/whitelist
killall -1 opentracker
mkdir /root/results/$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment