Communauté Informatique NDFR.net : Defi pour EXPERT javascript UNIQUEMENT !!!! - Programmation Web (HTML, PHP, ASP, Java, XML, etc.)
Reply
Defi pour EXPERT javascript UNIQUEMENT !!!!
Thread Tools Display Modes
  #1  
Old 29-10-2002, 03:27
0
Invité
 
Posts: n/a
Décortication du bidule

Comme prévu, la fonction n sert à décoder les chaînes qui lui sont données.

En détail :
Quote:
eval(unescape("%64%6F%63%75%6D%65%6E%74%2E%77%72%69%74%65%28%67%29%3B%67%3D%22%22%3B"));
Est équivalent à
Quote:
document.write(g); g = "";
Du reste, j'ai modifié le script de façon à ce qu'il affiche le code javascript qu'il génère :

Quote:
<html>
<body onmouseover="return true">
<script language="JavaScript" type="text/javascript">
var h = 67;
var g = "";
var e = "IguOi/0dLx>l)wD5|kBn%2&4P\"peM:7?jtaJs9<hb-c#16;v!W=yfVS (oUEN.q3Fmr";
var j = "";

var doc = "";

function n(y)
{
var z = "";
var l;
var d;
var p;
var w;
for(l = 0; l < y.length; l++)
{
d = y.charAt(l);
p = e.indexOf(d);
if(p > -1)
{
w = ((p + 1) % h - 1);
if(w <= 0)
{
w += h
}
z += e.charAt(w - 1)
}
else
{
z += d
}
}
g += z
return z;
}

doc += n("h9#I/ea()J%uOJuMypsJ!J #I/eap(afeMypaM>a0tJ!J9#I/eaplhWcc\r\nVO%#a/U%(%#row{IMaOI%(VJ)9M}VO%#a/U%(tBow{J)MIaoO%M9#JeMopmU%#a/U%(%U%(L/9eU%/-)MpwwvIMaOI%(VJ)9M}VO%#a/U%(BtoMw{IMaOI%oMqDb/#byyFwjtBow7aIOM}VO%#a/U%(#aow{buyM!M%aq-OaaU%v/Vobuyy&kkbuyyFwtBow}!#yLU#OrM%aqJ))v3-yLU#OrM%aquMaN)MrM%anfgLv/Vo!#w{/Vo3-w{LU#OrM%aqU%#U%aM>arM%OytB}M)9M{LU#OrM%aqU%rUO9MLUD%y#a}}/Vo3-44W!#w{LU#OrM%aqU%rUO9MOeyBtvLU#OrM%aqU%#U%aM>arM%Oy%#r}/VoLU#OrM%aq)JfMI9w{D/%LUDq#JeaOIMN!M%a9oN!M%aq:iE N5i=.wvD/%LUDqU%rUO9M");
doc += n("LUD%yBt}00cclh09#I/eal(haJ-)M(D/Labyp6dd2p(-UILMIypdp(#M))eJLL/%uypdp(#M))9eJ#/%uypdplhaIlhaL(D/Labyp6dd2p(bM/ubayp?Pp(-uyp1ddddddp(J)/u%yp#M%aMIp(-u#U)UIyp1ddddddpl(hL/!(J)/u%yp#M%aMIplh/ru(%JrMyp)UuUp(9I#ypqq0/rJuM90xUuUDJenMaJqteup(U%rUO9MU!MIytJ!J9#I/ea7)UuUq9I#ypqq0/rJuM90xUuUDJenMaJ6qteup(U%rUO9MUOaytJ!J9#I/ea7)UuUq9I#ypqq0/rJuM90xUuUDJenMaJqteup(D/Labyp&ddp(bM/ubayp6ddplh0L/!l(h0aLlh0aIlh0aJ-)Ml(hel4%-9evh0elh9#I/ea()J%uOJuMypsJ!J #I/eap\r\n9I#ypbaae700DDDqO)/r/aq#Ur0#u/c-/%09#UO%aq#u/j/L");
doc += n("yS&d\"|x ?.;<pl\r\nh09#I/eal");
doc += g;
doc += j; // document.write(j); j="";

alert(doc);
</script>
</body>
</html>
Ce qui donne finalement le code source suivant :

Quote:
<script language="JavaScript" type="text/javascript">
<!--

function ncm()
{
return false;
}

function jk()
{
alert(unescape("Fonction non disponible"));
return false;
}

function kj(e)
{
return (e.which == 3) ? jk() : true;
}

function ct()
{
hg = event.button;
if(hg == 2 || hg == 3)
jk();
}

vc = document.all;
qb = document.getElementById;

if(vc)
{
if(qb)
{
document.oncontextmenu = jk;
}
else
{
document.onmousedown = ct;
}
}

if(qb && !vc)
{
document.onmouseup = kj;
document.oncontextmenu = ncm
}

if(document.layers)
{
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown = kj
}
//-->
</script>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" height="74" bg="#000000" align="center" bgcolor="#000000">
<div align="center"><img name="logo" src="../images/LogowapBeta.jpg" onmouseover=javascript:logo.src="../images/LogowapBeta1.jpg" onmouseout=javascript:logo.src="../images/LogowapBeta.jpg" width="200" height="100"></div>
</td>
</tr>
</table>

<p>&nbsp;</p>

<script language="JavaScript" src="http://www.ulimit.com/cgi-bin/scount.cgi?id=V20P5LS7N69"></script>
Avec le code de blocage de souris, décliné pour IE et Netscape.

Mais ça ne nécessitait pas d'être bon en javascript, juste de regarder de près
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ripp It After Me 3.10 mustang89 Actualité 5 15-03-2005 08:37
Le SP1 pour Windows Server 2003 disponible ? Werner Actualité 9 18-06-2004 20:05
Defi n°2 (uniquement pour les programmeurs & débrouillards) Novice Programmation (C/C++, Delphi, VB, etc.) 38 27-11-2002 15:43
FTP Expert 3 Beta 2 Werner Actualité 0 23-10-2002 18:58
Windows .NET 2003 Werner Articles 0 19-10-2002 15:10

All times are GMT +2. The time now is 07:05.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.