Crackme en batch

Iniciado por jmetin2, 10 Junio 2011, 02:58 AM

0 Miembros y 1 Visitante están viendo este tema.

jmetin2

Espero que lo puedan resolver y no usen las "Batch Injection". Suerte

Código (dos) [Seleccionar]
@echo off
setlocal ENABLEDELAYEDEXPANSION
Title Ofuscacion 1KETI
:menu
echo.
set/p "str=Ingresa la clave correcta: "
set "pim=%str:~0,1%"
set "ele=9"
cls
set "e=%str:0=37%"
set "e=%e:a=10%"
set "e=%e:b=11%"
set "e=%e:c=12%"
set "e=%e:d=13%"
set "e=%e:e=14%"
set "e=%e:f=15%"
set "e=%e:g=16%"
set "e=%e:h=17%"
set "e=%e:i=18%"
set "e=%e:j=19%"
set "e=%e:k=20%"
set "e=%e:l=21%"
set "e=%e:m=22%"
set "e=%e:n=23%"
set "e=%e:ñ=24%"
set "e=%e:o=25%"
set "e=%e:p=26%"
set "e=%e:q=27%"
set "e=%e:r=28%"
set "e=%e:s=29%"
set "e=%e:t=30%"
set "e=%e:u=31%"
set "e=%e:v=32%"
set "e=%e:w=33%"
set "e=%e:x=34%"
set "e=%e:y=35%"
set "e=%e:z=36%"
set "e=%e: =40%"
set "e=%e:.=41%"
call:cont %e%
call:scd %e%
set "f=%pim:0=37%"
set "f=%f:a=10%"
set "f=%f:b=11%"
set "f=%f:c=12%"
set "f=%f:d=13%"
set "f=%f:e=14%"
set "f=%f:f=15%"
set "f=%f:g=16%"
set "f=%f:h=17%"
set "f=%f:i=18%"
set "f=%f:j=19%"
set "f=%f:k=20%"
set "f=%f:l=21%"
set "f=%f:m=22%"
set "f=%f:n=23%"
set "f=%f:ñ=24%"
set "f=%f:o=25%"
set "f=%f:p=26%"
set "f=%f:q=27%"
set "f=%f:r=28%"
set "f=%f:s=29%"
set "f=%f:t=30%"
set "f=%f:u=31%"
set "f=%f:v=32%"
set "f=%f:w=33%"
set "f=%f:x=34%"
set "f=%f:y=35%"
set "f=%f:z=36%"
set "f=%f: =40%"
set "f=%f:.=41%"
set/a e=%e% * (%f% + %e:~-1%)
call:reverse %e%
call:mot %e%
set "e=%e:a=10%"
set "e=%e:b=11%"
set "e=%e:c=12%"
set "e=%e:d=13%"
set "e=%e:e=14%"
set "e=%e:f=15%"
set "e=%e:g=16%"
set "e=%e:h=17%"
set "e=%e:i=18%"
set "e=%e:j=19%"
set "e=%e:k=20%"
set "e=%e:l=21%"
set "e=%e:m=22%"
set "e=%e:n=23%"
set "e=%e:o=24%"
set "e=%e:p=25%"
set "e=%e:q=26%"
set "e=%e:r=27%"
set "e=%e:s=28%"
set "e=%e:t=29%"
set "e=%e:u=30%"
set "e=%e:v=31%"
set "e=%e:w=32%"
set "e=%e:x=33%"
set "e=%e:y=34%"
set "e=%e:z=35%"
set "e=%e:0=01%"
set "e=%e:1=10%"
set "e=%e:2=100%"
set "e=%e:3=101%"
set "e=%e:4=110%"
set "e=%e:5=111%"
set "e=%e:6=1000%"
set "e=%e:7=1001%"
set "e=%e:8=1010%"
set "e=%e:9=1011%"
set "e=%e:01=a%"
set "e=%e:10=b%"
set "e=%e:11=c%"
set "e=%e:00=d%"
set "e=%e:1=u%"
set "e=%e:0=v%"
set "e=%e:aa=e%"
set "e=%e:ab=f%"
set "e=%e:ac=g%"
set "e=%e:ad=h%"
set "e=%e:ba=i%"
set "e=%e:bb=j%"
set "e=%e:bc=k%"
set "e=%e:bd=l%"
set "e=%e:ca=m%"
set "e=%e:cb=n%"
set "e=%e:cc=o%"
set "e=%e:cd=p%"
set "e=%e:da=q%"
set "e=%e:db=r%"
set "e=%e:dc=s%"
set "e=%e:dd=t%"
set "e=%e:a=10%"
set "e=%e:b=11%"
set "e=%e:c=12%"
set "e=%e:d=13%"
set "e=%e:e=14%"
set "e=%e:f=15%"
set "e=%e:g=16%"
set "e=%e:h=17%"
set "e=%e:i=18%"
set "e=%e:j=19%"
set "e=%e:k=20%"
set "e=%e:l=21%"
set "e=%e:m=22%"
set "e=%e:n=23%"
set "e=%e:o=24%"
set "e=%e:p=25%"
set "e=%e:q=26%"
set "e=%e:r=27%"
set "e=%e:s=28%"
set "e=%e:t=29%"
set "e=%e:u=30%"
set "e=%e:v=31%"
call:reverse %e%
set "e=%e:1=11%"
set "e=%e:2=12%"
set "e=%e:3=13%"
set "e=%e:4=21%"
set "e=%e:5=22%"
set "e=%e:6=23%"
set "e=%e:7=31%"
set "e=%e:8=32%"
set "e=%e:9=33%"
set "e=%e:11=A%"
set "e=%e:12=B%"
set "e=%e:13=C%"
set "e=%e:21=D%"
set "e=%e:22=E%"
set "e=%e:23=F%"
set "e=%e:31=G%"
set "e=%e:32=H%"
set "e=%e:33=I%"
set "e=%e:0=J%"
call:reverse %e%
set "ran=%random:~0,1%%random:~0,1%%random:~0,1%%random:~0,1%%random:~0,1%"
call:reverse %e%!ran!
call:revclav 3AAJCCJAFA2AA!ran!
if ["!e!"]==["!clave!"] (Echo Correcto&pause&exit) else (echo Incorrecto&pause&exit)

:cont
set arg=%*
if not defined arg (goto :eof)
set word=%arg%
set/a cont=0
:loop
if not defined word (goto end)
set word=%word:~1%
set/a cont+=1
goto loop
:end
set cods=%cont%
goto:EoF

:revclav
set "clave=%*"
set "posad=%ele%"
:crptnn
if ["%posad%"]==["0"] (goto:eof)
set clave=%clave:~1,-1%%clave:~0,1%%clave:~-1%
set/a posad-=1
goto crptnn
goto:Eof

:scd
set var=%*
set/a num=%cods% - 1
for /l %%a in (%num%,-1,0) do (
call set/a a+=%var:~0,1% * !var:~%%a,1!
)
set e=%a%
goto:Eof

:reverse
set "e=%*"
set "pasad=%ele%"
:crptn
if ["%pasad%"]==["0"] (goto:eof)
set e=%e:~1,-1%%e:~0,1%%e:~-1%
set/a pasad-=1
goto crptn
goto:Eof

:mot
set "numero=%*"
set hex=36
:bucle
set /a resto=%numero%%%hex%
if %resto%==10 (set resto=A)
if %resto%==11 (set resto=B)
if %resto%==12 (set resto=C)
if %resto%==13 (set resto=D)
if %resto%==14 (set resto=E)
if %resto%==15 (set resto=F)
if %resto%==16 (set resto=G)
if %resto%==17 (set resto=H)
if %resto%==18 (set resto=I)
if %resto%==19 (set resto=J)
if %resto%==20 (set resto=K)
if %resto%==21 (set resto=L)
if %resto%==22 (set resto=M)
if %resto%==23 (set resto=N)
if %resto%==24 (set resto=O)
if %resto%==25 (set resto=P)
if %resto%==26 (set resto=Q)
if %resto%==27 (set resto=R)
if %resto%==28 (set resto=S)
if %resto%==29 (set resto=T)
if %resto%==30 (set resto=U)
if %resto%==31 (set resto=V)
if %resto%==32 (set resto=W)
if %resto%==33 (set resto=X)
if %resto%==34 (set resto=Y)
if %resto%==35 (set resto=Z)
set /a numero=numero/%hex%
set resultado=%resto%%resultado%
if %numero% GTR 0 (goto bucle)
set "e=%resultado%"
goto:eof
Empezando a programar en MASM32