News for hackers. Stuff that matters.
Re:Implementing a web server in a single printf() call by yohanes on Thursday March 13, 2014 @06:37AM (#7390978)
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.

Re:Implementing a web server in a single printf() call by evandrix on Thursday March 13, 2014 @08:21AM (#7391284)
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.
Re:Implementing a web server in a single printf() call by mvirkkunen on Thursday March 13, 2014 @09:55AM (#7391765)
Did you also post this reply using curl?