...

View Full Version : printing unescaped characters



jeddi
12-09-2007, 03:37 PM
Hello
I want to print the unescaped characters in this sequence:
unescape('%66%75%6E%63%74%69%6F%6E%20%')

so I tried to do this on a page, but it did not display anything.

What have I missed out ?



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Untitled</title>
</head>
<body>
<script type="text/javascript">
<!--

print unescape('%66%75%6E%63%74%69%6F%6E%20%')


// -->
</script>
</body>
</html>

Philip M
12-09-2007, 03:56 PM
document.write(unescape('%66%75%6E%63%74%69%6F%6E%20%'))

function %

jeddi
12-09-2007, 04:23 PM
Thanks
That has helped somewhat but I guess tha eval() works differently from document.write() becuase I can only display some of the code

eg

document.write(unescape('%66%75%6E%63%74%69%6F%6E%20%64%32%37%28%73%74%72%31%29%7B%0D%0A%76%61%72%20 %73%74%72%32%3D%75%6E%65%73%63%61%70%65%28%73%74%72%31%2E%73%75%62%73%74%72%28%30%2C%73%74%72%31%2E% 6C%65%6E%67%74%68%2D%31%29%29%3B%20%76%61%72%20%73%74%72%33%3D%27%27%3B%0D%0A%66%6F%72%28%6A%3D%30%3 B%6A%3C%73%74%72%32%2E%6C%65%6E%67%74%68%3B%6A%2B%2B%29%73%74%72%33%2B%3D%53%74%72%69%6E%67%2E%66%72 %6F%6D%43%68%61%72%43%6F%64%65%28%73%74%72%32%2E%63%68%61%72%43%6F%64%65%41%74%28%6A%29%2D%73%74%72% 31%2E%73%75%62%73%74%72%28%73%74%72%31%2E%6C%65%6E%67%74%68%2D%31%2C%31%29%29%3B%0D%0A%64%6F%63%75%6 D%65%6E%74%2E%77%72%69%74%65%28%75%6E%65%73%63%61%70%65%28%73%74%72%33%29%29%3B%0D%0A%7D'));d27('&4Dtdsjqu&31mbohvbhf&4E&33kbwbtdsjqu&33&4F%261E%261Bwbs%2631est%264E1%263Dnpwjoh%264E1%263Dsftj%7Bjoh%264E1%263Dtig%263Defg%263Dsti%263Deti% 263Dceg%264E1%263Dtiu%264E1%263Dtmu%264E1%263Dcb6%264E1%263Dqmb%26'))

will only work as far as the "));d27" (4th line from bottom)

I dont know what ;d27 does but all the characters after that point dont seem to be escape characters :confused:

how do I print out the rest?

Philip M
12-10-2007, 08:27 AM
Thanks
That has helped somewhat but I guess tha eval() works differently from document.write() becuase I can only display some of the code

eg

document.write(unescape('%66%75%6E%63%74%69%6F%6E%20%64%32%37%28%73%74%72%31%29%7B%0D%0A%76%61%72%20 %73%74%72%32%3D%75%6E%65%73%63%61%70%65%28%73%74%72%31%2E%73%75%62%73%74%72%28%30%2C%73%74%72%31%2E% 6C%65%6E%67%74%68%2D%31%29%29%3B%20%76%61%72%20%73%74%72%33%3D%27%27%3B%0D%0A%66%6F%72%28%6A%3D%30%3 B%6A%3C%73%74%72%32%2E%6C%65%6E%67%74%68%3B%6A%2B%2B%29%73%74%72%33%2B%3D%53%74%72%69%6E%67%2E%66%72 %6F%6D%43%68%61%72%43%6F%64%65%28%73%74%72%32%2E%63%68%61%72%43%6F%64%65%41%74%28%6A%29%2D%73%74%72% 31%2E%73%75%62%73%74%72%28%73%74%72%31%2E%6C%65%6E%67%74%68%2D%31%2C%31%29%29%3B%0D%0A%64%6F%63%75%6 D%65%6E%74%2E%77%72%69%74%65%28%75%6E%65%73%63%61%70%65%28%73%74%72%33%29%29%3B%0D%0A%7D'));d27('&4Dtdsjqu&31mbohvbhf&4E&33kbwbtdsjqu&33&4F%261E%261Bwbs%2631est%264E1%263Dnpwjoh%264E1%263Dsftj%7Bjoh%264E1%263Dtig%263Defg%263Dsti%263Deti% 263Dceg%264E1%263Dtiu%264E1%263Dtmu%264E1%263Dcb6%264E1%263Dqmb%26'))

will only work as far as the "));d27" (4th line from bottom)

I dont know what ;d27 does but all the characters after that point dont seem to be escape characters :confused:

how do I print out the rest?

The document.write statement ends at )); All the rest is garbage or obfuscated code. I guess that you are trying to peek where someone does to wish you to.

rnd me
12-10-2007, 05:19 PM
you must eval the first part, which gives you a function: "function d27(str1)"

you then pass the second part to d27 and it un-ciphers the text.

i am not sure exactly where the key versus where the text is passed, i think it might work on itself going backwards.

jeddi
12-12-2007, 02:53 PM
Hi thanks for the input.

I have read in several places - this forum included probably - that you can NOT hide your code - well if that is true, I should be able to see this bit of code, understand it and make the some changes.

However I can not see how to evaluate this code without first decoding it.
I am a bit stuck :confused:

jeddi
12-22-2007, 05:29 PM
How do I unravel this function
- any ideas ?


document.write(unescape('%66%75%6E%63%74%69%6F%6E%20%64%32%37%28%73%74%72%31%29%7B%0D%0A%76%61%72%20 %73%74%72%32%3D%75%6E%65%73%63%61%70%65%28%73%74%72%31%2E%73%75%62%73%74%72%28%30%2C%73%74%72%31%2E% 6C%65%6E%67%74%68%2D%31%29%29%3B%20%76%61%72%20%73%74%72%33%3D%27%27%3B%0D%0A%66%6F%72%28%6A%3D%30%3 B%6A%3C%73%74%72%32%2E%6C%65%6E%67%74%68%3B%6A%2B%2B%29%73%74%72%33%2B%3D%53%74%72%69%6E%67%2E%66%72 %6F%6D%43%68%61%72%43%6F%64%65%28%73%74%72%32%2E%63%68%61%72%43%6F%64%65%41%74%28%6A%29%2D%73%74%72% 31%2E%73%75%62%73%74%72%28%73%74%72%31%2E%6C%65%6E%67%74%68%2D%31%2C%31%29%29%3B%0D%0A%64%6F%63%75%6 D%65%6E%74%2E%77%72%69%74%65%28%75%6E%65%73%63%61%70%65%28%73%74%72%33%29%29%3B%0D%0A%7D'));d27('&4D tdsjqu&31mbohvbhf&4E&33kbwbtdsjqu&33&4F%261E%261Bwbs%2631est%264E1%263Dnpwjoh%264E1%263Dsftj%7Bjoh%2 64E1%263Dtig%263Defg%263Dsti%263Deti%263Dceg%264E1%263Dtiu%264E1%263Dtmu%264E1%263Dcb6%264E1%263Dqmb %26'))

When unescaped it reads:
function d27(str1)

but thats as far as I can get :confused:

Philip M
12-22-2007, 05:48 PM
One more time ....

The document.write statement ends at )); All the rest is garbage or obfuscated code. I guess that you are trying to peek where someone does to wish you to.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum