Only works with NON https Website!!!!
Only works with apache

SCREEN 1

screen -S telnet
$ telnet localhost 80
GET / HTTP/1.1 
Host: example.com
*Press ENTER Once*
“Ctrl-a” *New Screen Session*

SCREEN 2

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

—————————-

SCREEN 1

*go back to telnet and press enter twice * * wait for http response * “Ctrl-a”

SCREEN 2

* go back to screen session with strace and close once http response etc)*

cat /tmp/output | cut -c12-16 | sort -rn | head




Start of Script

{ sleep 2;  printf "GET / HTTP/1.1\n"; printf "Host: example.com\n" ; echo ""; sleep 2;} | telnet 127.0.0.1 80