View Single Post
Posts: 3 | Thanked: 2 times | Joined on Oct 2012
#214
Originally Posted by soryuuha View Post
any tips on how to put the zero bytes ?
Just put a \x00 escape code where you want the output to end (anything beyond it will be ignored, including the forced newline), like so:

print "this string ends here\x00(and this is ignored)"