[Chicago-talk] Converting HEX to ASCII
Andy_Bach at wiwb.uscourts.gov
Andy_Bach at wiwb.uscourts.gov
Mon Aug 31 11:19:35 PDT 2015
Hmm, not really all hex so (via perldoc -q decode):
$ echo '%#x3cIMG
SRC=javascript:alert(
'XSS')%#x3e
' | perl -pe 's/&#([[:xdigit:]]+);/chr $1/eg'
%#x3cIMG SRC=javascript:alert( 'XSS')%#x3e
if it were actually hex and not decimal ascii you'd add a call to "hex" in
there:
' | perl -pe 's/&#([[:xdigit:]]+);/chr hex $1/eg'
a
----------------------
Andy Bach
Systems Mangler
Internet: andy_bach at wiwb.uscourts.gov
Voice: (608) 261-5738, Cell: (608) 658-1890
“That which can be asserted without evidence, can be dismissed without
evidence.”
― Christopher Hitchens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/chicago-talk/attachments/20150831/88ae0776/attachment.html>
More information about the Chicago-talk
mailing list