nightmare
nightmare copied to clipboard
Add python3 example and update payload test code
I found an issue with an example that uses this code:
python -c 'print "\x00"*20 + "\x80\xa0\x04\x08"'
It didn't work for me with pythons 3:
python -c 'print "\x00"*20 + "\x80\xa0\x04\x08"'
$ hexdump -C test_binary
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000010 00 00 00 00 c2 80 c2 a0 04 08 0a |...........|
As we can see we have some bytes that we didn't add. The solution could be to use python2 or just use bash:
echo -n -e '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xa0\x04\x08' > ./just_do_it-56d11d5466611ad671ad47fba3d8bc5a5140046a2a28162eab9c82f98e352afa
I also updated the payload script, because for python3 it didn't work either.