summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2024-04-13 14:04:18 +0200
committerDirk Engling <erdgeist@erdgeist.org>2024-04-13 14:04:18 +0200
commitbd4992435ca8343cca0b34af13cf6da331a357f8 (patch)
tree73889845ee88f968ce14332fcfd9043d2c736a4b /tests
parent35f55290f3832740535c7b419e494b8b7266804d (diff)
Add proper parsing for the gzip content encoding
Diffstat (limited to 'tests')
-rw-r--r--tests/testsuite2.sh24
1 files changed, 16 insertions, 8 deletions
diff --git a/tests/testsuite2.sh b/tests/testsuite2.sh
index c9a5a6a..da5181b 100644
--- a/tests/testsuite2.sh
+++ b/tests/testsuite2.sh
@@ -2,13 +2,21 @@
2 2
3while true; do 3while true; do
4 request_string="GET /announce?info_hash=012345678901234567\ 4 request_string="GET /announce?info_hash=012345678901234567\
5%$(printf %02X $(( $RANDOM & 0xff )) )\ 5$(printf %02X $(( $RANDOM & 0xff )) )\
6%$(printf %02X $(( $RANDOM & 0xff )) )\ 6&ip=$(( $RANDOM & 0xff )).17.13.15&port=$(( $RANDOM & 0xff )) HTTP/1.0"
7&ip=$(( $RANDOM & 0xff )).17.13.15&port=$(( $RANDOM & 0xff )) HTTP/1.0\n" 7
8 8# echo $request_string
9 echo $request_string 9# echo
10 echo 10 printf "%s\n\n" "$request_string" | nc 84.200.61.9 6969 | hexdump -C
11 echo $request_string | nc 23.23.23.237 6969 >/dev/null 11
12 echo 12 request_string="GET /announce?info_hash=012345678901234567\
13$(printf %02X $(( $RANDOM & 0xff )) )\
14&ip=2001:1608:6:27::$(( $RANDOM & 0xff ))&port=$(( $RANDOM & 0xff )) HTTP/1.0"
15 printf "%s\n\n" "$request_string" | nc 2001:1608:6:27::9 6969 | hexdump -C
16 printf "%s\n\n" "$request_string"
17
18 request_string="GET /scrape?info_hash=012345678901234567\
19$(printf %02X $(( $RANDOM & 0xff )) ) HTTP/1.0"
20 printf "%s\n\n" "$request_string" | nc 2001:1608:6:27::9 6969 | hexdump -C
13 21
14done 22done