Spoiler to Python Challenge (help!!!)
Christos Georgiou
tzot at sil-tec.gr
Tue Oct 4 04:27:07 EDT 2005
On Tue, 27 Sep 2005 10:42:20 -0500, rumours say that Terry Hancock
<hancock at anansispaceworks.com> might have written:
>This works:
>
>>>> bz2.decompress(eval(repr(user)))
>'huge'
>This may have some security issues, though, since it evaluates essentially
>any expression given for user. I'd be interested to know if someone
>knows a more secure way.
given
a = "a tab\\x09between"
this is more secure than eval:
b= a.decode("string_escape")
--
TZOTZIOY, I speak England very best.
"Dear Paul,
please stop spamming us."
The Corinthians
More information about the Python-list
mailing list