Page 1 of 1

Brute Force KeyGen

Posted: 18 Jan 2012 12:33
by firebloodphoenix
I want to make a simple key gen with alphabetic and numeric keys
here is what i have:

Code: Select all

@echo off
set num=0
:loop
set /a num = %num% + 1
echo %num%
goto loop

Re: Brute Force KeyGen

Posted: 18 Jan 2012 14:31
by aGerman
There are 36^3 (=46656) possible combinations for a key of only 3 characters and a pool of 36 different characters. Batch is much too slow for real Brute Force as you will find out by yourself :lol:

Code: Select all

@echo off
set "chars=1234567890abcdefghijklmnopqrstuvwxyz"

setlocal EnableDelayedExpansion
for /l %%a in (0 1 35) do (
  for /l %%b in (0 1 35) do (
    for /l %%c in (0 1 35) do (
      echo(!chars:~%%a,1!!chars:~%%b,1!!chars:~%%c,1!
    )
  )
)

pause

Regards
aGerman

Re: Brute Force KeyGen

Posted: 18 Jan 2012 23:55
by firebloodphoenix
Thank you! since its only a 5 letter key it should not be a problem