RE: Some fun with batch 02-25-2013, 07:14 AM
#2
You could make this a lot better if it didn't generate the same "Hashes" over and over again. Take for example what I just wrote a few minutes ago:
Code:
@ECHO OFF & SETLOCAL ENABLEDELAYEDEXPANSION
TITLE xHash Cracker & COLOR A
FOR /L %%G IN (1,1,3) DO (
CALL :Waiting "Finding hashes. Please wait"
)
SET hashCount=1
:A
CALL :WriteHash
SET /A hashCount+=1
GOTO :A
PAUSE > NUL & GOTO :EOF
:WriteHash
set alpha=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
SET hashSize=32
SET output=
SET count=0
:Iteration
SET /A tmp=%Random% %% 3 + 1
IF %tmp% == 1 (
SET /A num=%Random% %% 10
SET output=!output!!num!
) ELSE (
SET /A letter=!Random! %% 26
SET /A upperCase= !Random! %% 2
IF !upperCase! EQU 1 (
SET /A letter+=26
)
SET output=!output!!alpha:~%letter%,1!
)
SET /A count+=1
IF %count% LSS %hashSize% GOTO :Iteration
ECHO %hashCount%. ^>Hash Value: !output! (Length: %hashSize%)
GOTO :EOF
:Waiting
SET tmpString=%1
SET tmpString=%tmpString:"=%
SET dots=...
FOR /l %%G IN (1,1,3) DO (
CLS
ECHO !tmpString!!dots:~0,%%G!
PING localhost -n 2 -w 500 -l 5000 > NUL
)
GOTO :EOF
-- cxS
[ Haskell/.NET/C/C++ - Software Engineer ]
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)