while read id
do
echo -ne “$id\t”
echo -ne “GET /ShowDoc.jsp?docID=$id HTTP/1.0\r\nHost: $server\r\n\r\n”
| netcat $server $port | head -1
done | tee outputfile
Running this script with a suitable input file generates the following output,
which enables you to quickly identify valid document IDs:
~> ./script
3000 HTTP/1.0 500 Internal Server Error
3001 HTTP/1.0 200 Ok
3002 HTTP/1.0 200 Ok
3003 HTTP/1.0 500 Internal Server Error
...
T I P
The Cygwin environment can be used to execute bash scripts on the
Windows platform. Also, the UnxUtils suite contains Win32 ports of numerous
Do'stlaringiz bilan baham: