Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how fgets() read the hexadecimal number #20

Closed
xiam0nd opened this issue Aug 12, 2015 · 2 comments
Closed

how fgets() read the hexadecimal number #20

xiam0nd opened this issue Aug 12, 2015 · 2 comments

Comments

@xiam0nd
Copy link

xiam0nd commented Aug 12, 2015

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.

@computerality
Copy link
Contributor

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

@xiam0nd
Copy link
Author

xiam0nd commented Aug 12, 2015

thank you very much!!!

@dguido dguido closed this as completed Aug 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants