[lug] unescaping url encoded document

Jeffrey Haemer jeffrey.haemer at gmail.com
Fri Nov 6 16:29:40 MST 2009


This is well outside a browser:

printf "${s//%/\\x}\n"

The substitution, "${s//%.\\x}" turns every '%' symbol in $s into the
two-character string "\x".  Having done that, the shell's printf command
will just print the string as ASCII.

[ Sorry to be slow.  My day's been, um, unusually busy. :-) ]

On Fri, Nov 6, 2009 at 1:21 PM, Kenneth D Weinert <kenw at quarter-flash.com>wrote:

> Hash: SHA1
> This is sort of amusing. I got a scam email telling me that the IRS was
> going to give me a refund of $773.00 and all I had to do was fill in the
> form and send it off.
> I clicked on it just to see where they were really sending it and did a
> "View Source" in my browser.  Here are the first 4 lines (4th line
> truncated):
> <Script Language='Javascript'>
> <!-- HTML Encryption provided by IRS -->
> <!--
> document.write(unescape('%3C%21%44%4F%43%54%59%50%45%20%48%54%4D%4C%20%50
> It displays fine, but I'm just curious what the submit button does and
> wondered if anyone had an easy shortcut to translate the URL Encoding
> into plain text outside of a browser.
> An interesting variation, at least one I hadn't seen before.
> - --
> Ken
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> iEYEARECAAYFAkr0hUkACgkQH0OpnUzq8fBzQQCfdjGyBlm6mQf8K6iAT4/K9KBl
> fgkAoI892MpL5QZxYRs7vCBDj9G3BzUM
> =Ymw9
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#hackingsociety

Click to Call Me Now! --

Jeffrey Haemer <jeffrey.haemer at gmail.com>
720-837-8908 [cell],  @goyishekop [twitter]
http://www.youtube.com/user/goyishekop [vlog]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20091106/28459c99/attachment.html>

More information about the LUG mailing list