how fgets() read the hexadecimal number
xiam0nd opened this issue · comments
Xiaomeng Tong commented
in the exploit easy ,i encounter a problem.
i want to overwrite the pikachy variable into 0xfa75beef,but fgets() cannot read 0xfa75beef.
although i used the escape char '',just like \xef\xbe\x75\xfa,fgets() cannot identify the escape char ''.
so ,how can i make fgets() read the hexadecimal number.
Jay Little commented
fgets() cannot read a hex number for you. You will want to make a script to print the binary value or a one line script like:
$ perl -e 'print "\xce\xfa\xed\xfe"' | nc ip port
Xiaomeng Tong commented
thank you very much!!!