Only works with NON https Website!!!!
Only works with apache
screen -S telnet
$ telnet localhost 80 GET / HTTP/1.1 Host: example.com*Press ENTER Once*
screen -S strace
lsof -p `pidof telnet`
netstat -nap | grep PID
strace -o /tmp/output -f -r -s4096 -p `pidof telnet`
"Ctrl-a"
Flag | Description |
---|---|
o | ouput file |
f | Trace child processes as they are created by currently traced processes as a result of the fork(2) system call |
r | Print a relative timestamp upon entry to each system call. This records the time difference between the beginning of successive system calls |
p | PID |
s | string size (IMPORTANT - strings are truncated by default, sometimes you need to see larger string size to analyse correctly |
—————————-
*go back to telnet and press enter twice * * wait for http response * “Ctrl-a”
* go back to screen session with strace and close once http response etc)*
cat /tmp/output | cut -c12-16 | sort -rn | head
{ sleep 2; printf "GET / HTTP/1.1\n"; printf "Host: example.com\n" ; echo ""; sleep 2;} | telnet 127.0.0.1 80