Hacker News new | past | comments | ask | show | jobs | submit login

Ah, you have found a bug in my code (I made an error in computing the string length, and didn't notice it because it displayed fine on Chrome). I have fixed my code in git and the blog post.

As for the stray output displayed on the stdout: it is to be expected. The %n format outputs the numbers of character that is written by printf, so it must have written something to the stdout.




Ah! that explains so much (and also why i've wasted a whole hour figuring out why what I observed was happening) I'm a CLI curl guy, rather than relying on these browsers which randomly would add a 0x0d 0x0a to my form submissions, for example. I also noticed that compiling (assembling-linking) the .S to execute it would not print anything (just hang there like a normal webserver), but I was getting stuff written to stdout with the final.c/webserver.c version using its shellcode.


Did you also post this reply using curl?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: