From bd4992435ca8343cca0b34af13cf6da331a357f8 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 13 Apr 2024 14:04:18 +0200 Subject: Add proper parsing for the gzip content encoding --- tests/testsuite2.sh | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'tests') 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 @@ while true; do request_string="GET /announce?info_hash=012345678901234567\ -%$(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 23.23.23.237 6969 >/dev/null - echo +$(printf %02X $(( $RANDOM & 0xff )) )\ +&ip=$(( $RANDOM & 0xff )).17.13.15&port=$(( $RANDOM & 0xff )) HTTP/1.0" + +# echo $request_string +# echo + printf "%s\n\n" "$request_string" | nc 84.200.61.9 6969 | hexdump -C + + request_string="GET /announce?info_hash=012345678901234567\ +$(printf %02X $(( $RANDOM & 0xff )) )\ +&ip=2001:1608:6:27::$(( $RANDOM & 0xff ))&port=$(( $RANDOM & 0xff )) HTTP/1.0" + printf "%s\n\n" "$request_string" | nc 2001:1608:6:27::9 6969 | hexdump -C + printf "%s\n\n" "$request_string" + + request_string="GET /scrape?info_hash=012345678901234567\ +$(printf %02X $(( $RANDOM & 0xff )) ) HTTP/1.0" + printf "%s\n\n" "$request_string" | nc 2001:1608:6:27::9 6969 | hexdump -C done -- cgit v1.2.3