Brute Force KeyGen

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
firebloodphoenix
Posts: 16
Joined: 16 Jul 2010 01:29

Brute Force KeyGen

#1 Post by firebloodphoenix » 18 Jan 2012 12:33

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

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Brute Force KeyGen

#2 Post by aGerman » 18 Jan 2012 14:31

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

firebloodphoenix
Posts: 16
Joined: 16 Jul 2010 01:29

Re: Brute Force KeyGen

#3 Post by firebloodphoenix » 18 Jan 2012 23:55

Thank you! since its only a 5 letter key it should not be a problem

Post Reply