diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testsuite.sh | 12 | ||||
-rw-r--r-- | tests/testsuite2.sh | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/tests/testsuite.sh b/tests/testsuite.sh index b07546d..dace2c6 100644 --- a/tests/testsuite.sh +++ b/tests/testsuite.sh | |||
@@ -1,15 +1,11 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | while true; do | 3 | while true; do |
4 | request_string="GET /announce?info_hash=\ | 4 | request_string="GET /announce?info_hash=0123456789012345678\ |
5 | %$(printf %02X $(( $RANDOM & 0xff )) )\ | 5 | %$(printf %02X $(( $RANDOM & 0xf )) )\ |
6 | %$(printf %02X $(( $RANDOM & 0xff )) )\ | 6 | &ip=$(( $RANDOM & 0xf )).$(( $RANDOM & 0xf )).13.16&port=$(( $RANDOM & 0xff )) HTTP/1.0\n" |
7 | 2345678901234567\ | ||
8 | %$(printf %02X $(( $RANDOM & 0xff )) )\ | ||
9 | %$(printf %02X $(( $RANDOM & 0xff )) )\ | ||
10 | &ip=$(( $RANDOM & 0xff )).17.13.15&port=$(( $RANDOM & 0xff )) HTTP/1.0\n" | ||
11 | 7 | ||
12 | # echo $request_string | 8 | echo $request_string |
13 | # echo | 9 | # echo |
14 | echo $request_string | nc 127.0.0.1 6969 >/dev/null | 10 | echo $request_string | nc 127.0.0.1 6969 >/dev/null |
15 | # echo | 11 | # echo |
diff --git a/tests/testsuite2.sh b/tests/testsuite2.sh index 5189187..c9a5a6a 100644 --- a/tests/testsuite2.sh +++ b/tests/testsuite2.sh | |||
@@ -8,7 +8,7 @@ while true; do | |||
8 | 8 | ||
9 | echo $request_string | 9 | echo $request_string |
10 | echo | 10 | echo |
11 | echo $request_string | nc 10.0.1.3 6969 >/dev/null | 11 | echo $request_string | nc 23.23.23.237 6969 >/dev/null |
12 | echo | 12 | echo |
13 | 13 | ||
14 | done | 14 | done |