...

View Full Version : javascript conversion



tpeck
01-11-2007, 03:47 AM
Does anyone know how to convert this sort of javascript into readable code?

<script>
%3Cdiv%20id%3D%22mbutton%22%20STYLE%3D%22position%3Aabsolute%3Bvisibility%3Avisible%3B%20float%3Arig ht%22%3E%3Ctable%20border%3D%220%22%20cellspacing%3D%220%22%20cellpadding%3D%220%22%3E%3Ca%20target% 3D%22_self%22%20href%3D%22test2b.html%22onMouseover%3D%22window.status%3D%27Click%20The%20Button%27% 3Breturn%20true%22%3B%20onmouseout%3D%22window.status%3D%27%27%3Breturn%20true

etc.

</script>

6arredja
01-11-2007, 03:57 AM
%20=space

6arredja
01-11-2007, 04:13 AM
heres what that crap down there says


Cdiv id D mbutton STYLE D position Aabsolute Bvisibility Avisible B float Arig ht E Ctable border DÜÜcellspacing DÜcellpadding DÜ E C atarget D_self href D test2b.html onMouseover D window.status D Click The Button Breturn true B onmouseout D window.status Breturn true


more or less look man i dont know if you wrote this junk in the wrong text editor or if you were viewing the source of a website but if you need more help on this stuff you can either tell us where to find the source and ask specific questions about it or you can go to http://www.blooberry.com/indexdot/html/tagpages/text.htm
to figure out the rest of your "code" which wont run just like that your going to need some one with a lot of patience to piece that junk together plus all the location where some of it is pointing to is missing it would be impossible

tpeck
01-11-2007, 04:14 AM
Thanks, that's a start! I wonder if there is a decoder, the reverse of the one at:

http://www.stevenolte.com/docwriter.html

Any suggestions?

tpeck
01-11-2007, 04:17 AM
Actually, I think the "junk" is simply a way to try to hide the original code. But it interests me to see what the code is in the first place.

tpeck
01-11-2007, 04:24 AM
Just for the record, here is the whole thing. Place it between <body> and </body> and you'll see what happens.

I can edit it - sort of of - to add the correct image etc., but it's not so easy.

It is generated from a crappy piece of software, but - hey! - it does the job I want!


<script>
<!--
document.write(unescape("%3Cdiv%20id%3D%22mbutton%22%20STYLE%3D%22position%3Aabsolute%3Bvisibility%3Avisible%3B%20float%3Arig ht%22%3E%3Ctable%20border%3D%220%22%20cellspacing%3D%220%22%20cellpadding%3D%220%22%3E%3Ca%20target% 3D%22_self%22%20href%3D%22http%3A//www.your-site.com/page.htm%22onMouseover%3D%22window.status%3D%27Click%20The%20Button%27%3Breturn%20true%22%3B%20onmou seout%3D%22window.status%3D%27%27%3Breturn%20true%22%3E%3Cimg%20src%3D%22http%3A//www.your-site.com/images/image.jpg%22width%3D90%20height%3D50%20alt%3D%22Click%20Here%22%20border%3D%220%22%20align%3D%22midd le%22%3E%3Ccenter%3E%3Cb%3E%3Cfont%20face%3D%22Verdana%22%20size%3D%222%22%20color%3D%22black%22%3E% 3Ca%20target%3D%22_self%22%20href%3D%22http%3A//www.your-site.com/page.htm%22%20onMouseover%3D%22window.status%3D%27Click%20The%20Link%27%3Breturn%20true%22onmouseout %3D%22window.status%3D%27%27%3Breturn%20true%22%3EClick%20Here%3C/a%3E%3C/font%3E%3C/a%3E%3C/font%3E%3Ccenter%3E%3Cb%3E%3Cfont%20face%3D%22Verdana%22%20size%3D%222%22%20color%3D%22black%22%3E%3 C/table%3E%3C/div%3E%0D%0A%0D%0A%3Cscript%20LANGUAGE%3D%22JavaScript%22%3E%20%0D%0A%0D%0Avar%20XX%3D20%3B%20%20%20 %0D%0Avar%20xstep%3D1%20%3B%20%20%20%0D%0Avar%20delay_time%3D20%3B%20%20%20%0D%0Avar%20YY%3D0%3B%20% 20%20%0D%0Avar%20ch%3D0%3B%20%20%20%0D%0Avar%20oh%3D0%3B%20%0D%0Avar%20yon%3D0%3B%20%20%20%0D%0Avar% 20ns4%3Ddocument.layers%3F1%3A0%20%20%20%0D%0Avar%20ie%3Ddocument.all%3F1%3A0%20%20%20%0D%0Avar%20ns 6%3Ddocument.getElementById%26%26%21document.all%3F1%3A0%20%20%20%0D%0Aif%28ie%29%7B%20%20%20%0D%0AY Y%3Ddocument.body.clientHeight%3Bmbutton.style.top%3DYY%3B%20%20%20%0D%0A%7D%20%20%20%0D%0Aelse%20if %20%28ns4%29%7B%20%20%20%0D%0AYY%3Dwindow.innerHeight%3B%20%20%20%0D%0Adocument.mbutton.pageY%3DYY%3 B%20%20%20%0D%0Adocument.mbutton.visibility%3D%22hidden%22%3B%20%20%20%0D%0A%7D%20%20%20%0D%0Aelse%2 0if%20%28ns6%29%7B%20%20%20%0D%0AYY%3Dwindow.innerHeight%20%20%20%0D%0Adocument.getElementById%28%27 mbutton%27%29.style.top%3DYY%20%20%20%0D%0A%7D%20%20%20%0D%0Afunction%20reloc1%28%29%20%20%20%0D%0A% 7B%20%20%20%0D%0Aif%28yon%3D%3D0%29%7BYY%3DYY-xstep%3B%7D%20%20%20%0D%0Aelse%7BYY%3DYY+xstep%3B%7D%20%20%20%0D%0Aif%20%28ie%29%7B%20%20%20%0D%0Ach %3Ddocument.body.clientHeight%3B%20%20%20%0D%0Aoh%3Dmbutton.offsetHeight%3B%20%20%20%0D%0A%7D%20%20% 20%0D%0Aelse%20if%20%28ns4%29%7B%20%20%20%0D%0Ach%3Dwindow.innerHeight%3B%20%20%20%0D%0Aoh%3Ddocumen t.mbutton.clip.height%3B%20%20%20%0D%0A%7D%20%20%20%0D%0Aelse%20if%20%28ns6%29%7B%20%20%20%0D%0Ach%3 Dwindow.innerHeight%20%20%20%0D%0Aoh%3Ddocument.getElementById%28%22mbutton%22%29.offsetHeight%20%20 %20%0D%0A%7D%20%20%20%0D%0Aif%28YY%3C0%29%7Byon%3D1%3BYY%3D0%3B%7D%20%20%20%0D%0Aif%28YY%3E%3D%28ch-oh%29%29%7Byon%3D0%3BYY%3D%28ch-oh%29%3B%7D%20%20%20%0D%0Aif%28ie%29%7B%20%20%20%0D%0Ambutton.style.right%3DXX%3B%20%20%20%0D%0Ambut ton.style.top%3DYY+document.body.scrollTop%3B%20%20%20%0D%0A%7D%20%20%20%0D%0Aelse%20if%20%28ns4%29% 7B%20%20%20%0D%0Adocument.mbutton.pageX%3DXX%3B%20%20%20%0D%0Adocument.mbutton.pageY%3DYY+window.pag eYOffset%3B%20%20%20%0D%0A%7D%20%20%20%0D%0Aelse%20if%20%28ns6%29%7B%20%20%20%0D%0Adocument.getEleme ntById%28%22mbutton%22%29.style.right%3DXX%20%0D%0Adocument.getElementById%28%22mbutton%22%29.style. top%3DYY+window.pageYOffset%20%20%20%0D%0A%7D%20%20%20%0D%0A%7D%20%20%20%0D%0Afunction%20onad%28%29% 20%20%20%0D%0A%7B%20%20%20%0D%0Aif%28ns4%29%20%20%20%0D%0Adocument.mbutton.visibility%3D%22visible%2 2%3B%20%20%20%0D%0Aloopfunc%28%29%3B%20%20%20%0D%0A%7D%20%20%20%0D%0Afunction%20loopfunc%28%29%20%20 %20%0D%0A%7B%20%20%20%0D%0Areloc1%28%29%3B%20%20%20%0D%0AsetTimeout%28%27loopfunc%28%29%27%2Cdelay_t ime%29%3B%20%20%20%0D%0A%7D%20%20%20%0D%0Aif%20%28ie%7C%7Cns4%7C%7Cns6%29%20%20%20%0D%0Awindow.onloa d%3Donad%20%20%20%0D%0A%3C/script%3E%20%20%20%0D%0A"));
//-->
</script>

6arredja
01-11-2007, 04:43 AM
ohhhhh.. ok now i see why didnt u say so before here is the code ive extracted



<div id="mbutton" STYLE="position:absolute;visibility:visible; float:right"><table border="0" cellspacing="0" cellpadding="0"><a target="_self" href="http://www.your-site.com/page.htm"onMouseover="window.status='Click The Button';return true"; onmouseout="window.status='';return true"><img src="http://www.your-site.com/images/image.jpg"width=90 height=50 alt="Click Here" border="0" align="middle"><center><b><font face="Verdana" size="2" color="black"><a target="_self" href="http://www.your-site.com/page.htm" onMouseover="window.status='Click The Link';return true"onmouseout="window.status='';return true">Click Here</a></font></a></font><center><b><font face="Verdana" size="2" color="black"></table></div>

<script LANGUAGE="JavaScript">

var XX=20;
var xstep=1 ;
var delay_time=20;
var YY=0;
var ch=0;
var oh=0;
var yon=0;
var ns4=document.layers?1:0
var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
if(ie){
YY=document.body.clientHeight;mbutton.style.top=YY;
}
else if (ns4){
YY=window.innerHeight;
document.mbutton.pageY=YY;
document.mbutton.visibility="hidden";
}
else if (ns6){
YY=window.innerHeight
document.getElementById('mbutton').style.top=YY
}
function reloc1() %0
{
if(yon==0){YY=YY-xstep;}
else{YY=YY+xstep;}
if (ie){
ch=document.body.clientHeight;
oh=mbutton.offsetHeight;
}
else if (ns4){
ch=window.innerHeight;
oh=document.mbutton.clip.height;
}
else if (ns6){
ch=window.innerHeight
oh=document.getElementById("mbutton").offsetHeight
}
if(YY<0){yon=1;YY=0;}
if(YY>=(ch-oh)){yon=0;YY=(ch-oh);}
if(ie){
mbutton.style.right=XX;
mbutton.style.top=YY+document.body.scrollTop;
}
else if (ns4){
document.mbutton.pageX=XX;
document.mbutton.pageY=YY+window.pageYOffset;
}
else if (ns6){
document.getElementById("mbutton").style.right=XX
document.getElementById("mbutton").style.top=YY+window.pageYOffset
}
}
function onad()
{
if(ns4)
document.mbutton.visibility="visible";
loopfunc();
}
function loopfunc()
{
reloc1();
setTimeout('loopfunc()',delay_time);
}
if (ie||ns4||ns6)
window.onload=onad
</script>

tpeck
01-11-2007, 04:48 AM
You're a genius! OK - you don't have to say how you did it if you want to go for the Nobel!

Cheers and thanks!

6arredja
01-11-2007, 04:56 AM
come on do you think im some kinda jerk

heres how i did it now stay with me on this because it could get a bit tricky



<textarea id="output" cols=100 rows=25></textarea>
<script language="javascript">
document.getElementById('output').value=unescape('thatjunkstuff');
</script>


theres nothing better than a tall glass of %3Ckno%20%3Cledge%3E

tpeck
01-11-2007, 05:05 AM
Can't argue with that!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum