summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2007-12-11 23:34:36 +0000
committerDirk Engling <erdgeist@erdgeist.org>2007-12-11 23:34:36 +0000
commit8a259ea80679b6ab62ac79fda8db808360de180f (patch)
tree438e44f1647ed286b17685cfde6f122802ae3351 /tests
parentc05e406d9ad2c961d706a54089365beff6bad308 (diff)
downloadopentracker-8a259ea80679b6ab62ac79fda8db808360de180f.tar.gz
opentracker-8a259ea80679b6ab62ac79fda8db808360de180f.zip
A simple script that fills up opentracker with some peers, if -DWANT_IP_FROM_QUERY_STRING is specifierd
Diffstat (limited to 'tests')
-rw-r--r--tests/testsuite.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/testsuite.sh b/tests/testsuite.sh
new file mode 100644
index 0000000..b07546d
--- /dev/null
+++ b/tests/testsuite.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+while true; do
+ request_string="GET /announce?info_hash=\
+%$(printf %02X $(( $RANDOM & 0xff )) )\
+%$(printf %02X $(( $RANDOM & 0xff )) )\
+2345678901234567\
+%$(printf %02X $(( $RANDOM & 0xff )) )\
+%$(printf %02X $(( $RANDOM & 0xff )) )\
+&ip=$(( $RANDOM & 0xff )).17.13.15&port=$(( $RANDOM & 0xff )) HTTP/1.0\n"
+
+# echo $request_string
+# echo
+ echo $request_string | nc 127.0.0.1 6969 >/dev/null
+# echo
+
+done