Login Register






[BATCH] Simple Password Cracker filter_list
Author
Message
[BATCH] Simple Password Cracker #1
There's a simple and complex version of the script I'll be releasing .. The simple version has a small error, but it shouldn't stop what the script was made for ..
Simple Script:
Code:
@echo off title Computer Cracking Simulation cls :pre set /a number=%random%%% 5 +1 if %number%==1 set number=A if %number%==2 set number=B if %number%==3 set number=C if %number%==4 set number=D if %number%==5 set number=E goto pre2 cls :pre2 set /a number2=%random%%% 5 +1 if %number2%==1 set number2=A if %number2%==2 set number2=B if %number2%==3 set number2=C if %number2%==4 set number2=D if %number2%==5 set number2=E goto pre3 cls :pre3 set /a number3=%random%%% 5 +1 if %number3%==1 set number3=A if %number3%==2 set number3=B if %number3%==3 set number3=C if %number3%==4 set number3=D if %number3%==5 set number3=E goto pre4 cls :pre4 set /a number4=%random%%% 5 +1 goto pre5 cls :pre5 set /a number5=%random%%% 5 +1 goto welcome cls :welcome echo GENERATING PASSWORD echo YOUR PASSWORD IS %number%%number2%%number3%%number4%%number5% echo CRACKING PASSWORD! pause cls :password1 echo LOOKING ... set /a n=%random%%% 5 +1 if %n%==1 set n=A if %n%==2 set n=B if %n%==3 set n=C if %n%==4 set n=D if %n%==5 set n=E set /a n2=%random%%% 5 +1 if %n2%==1 set n2=A if %n2%==2 set n2=B if %n2%==3 set n2=C if %n2%==4 set n2=D if %n2%==5 set n2=E set /a n3=%random%%% 5 +1 if %n3%==1 set n3=A if %n3%==2 set n3=B if %n3%==3 set n3=C if %n3%==4 set n3=D if %n3%==5 set n3=E set /a n4=%random%%% 5 +1 set /a n5=%random%%% 5 +1 set /a n6=%random%%% 5 +1 set /a how=%how% + 1 echo %n%%n2%%n3%%n4%%n5%%n6% if %n%%n2%%n3%%n4%%n5%==%number%%number2%%number3%%number4%%number5% goto cracked1 goto password1 :cracked1 echo COMPUTER HAS CRACKED THE PASSWORD! echo THE PASSWORD WAS %number%%number2%%number3%%number4%%number5%%number6% echo IT TOOK %how% RUN-THROUGHS! pause
The password is only five digits ..
Hope you enjoy! :Smile:

Reply

RE: [BATCH] Simple Password Cracker #2
What is the point of any of these goto calls or any of the cls lines that follow after them? All you do is skip the cls and go to the line after it, thus the script wouldn't change at all if you were to just remove all of the :pre blocks and the goto's and cls lines after each of them... You don't even use these blocks to go back to them, so they are useless. Half of the cls lines would've been redundant anyways too even if they did execute because nothing is written to the console by the second time you write cls... I also have no idea how this could be a cracker, it's more of a guesser here because you're not checking combinations, your testing luck on finding the password by probability, which is silly.

To give you an idea of how you could've made this much better:
Code:
@echo off & setlocal enabledelayedexpansion set len=5 set alpha=ABCDE set pass= for /l %%G in (1,1,3) do ( set /a i=!random! %% !len! call set pass=!pass!%%alpha:~!i!,1%% ) for /l %%G in (1,1,2) do ( set /a n=!random! %% !len! + 1 set pass=!pass!!n! ) echo PASS: !pass!&echo. pause

Here's my revision of the first part of your script.

What you had before is a linear batch disaster I have to admit... You should review my version and ask questions, you've got a lot to learn, but I'm not here to just criticize you if you want to learn. All you need to do is ask the questions. You posted this, I only gave my honest opinion of the script.

NOTE: To make my script above easier to work with, I could have added a function I created in batch to check the length of the variable instead of hardcoding a length to match.. But you'd likely not understand any of my code and it would only add an unnecessary layer of complexity to this for no reason.

For a better password generator, I would've done something like this:
Code:
@echo off & setlocal enabledelayedexpansion set len=92 set alpha=AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789012345678901234567890123456789 set passlen=10 set pass= for /l %%G in (1,1,!passlen!) do ( set /a i=!random! %% !len! call set pass=!pass!%%alpha:~!i!,1%% ) echo PASS: !pass!&echo. pause

There's no way in hell your version would crack anything like that though, even if you had the method to create the correct password as a possibility; it'd take ages.

[Image: nbwXALV.png]
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: [BATCH] Simple Password Cracker #3
(01-08-2014, 06:10 AM)ArkPhaze Wrote: What is the point of any of these goto calls or any of the cls lines that follow after them? All you do is skip the cls and go to the line after it, thus the script wouldn't change at all if you were to just remove all of the :pre blocks and the goto's and cls lines after each of them... You don't even use these blocks to go back to them, so they are useless. Half of the cls lines would've been redundant anyways too even if they did execute because nothing is written to the console by the second time you write cls... I also have no idea how this could be a cracker, it's more of a guesser here because you're not checking combinations, your testing luck on finding the password by probability, which is silly.

To give you an idea of how you could've made this much better:
Code:
@echo off & setlocal enabledelayedexpansion set len=5 set alpha=ABCDE set pass= for /l %%G in (1,1,3) do ( set /a i=!random! %% !len! call set pass=!pass!%%alpha:~!i!,1%% ) for /l %%G in (1,1,2) do ( set /a n=!random! %% !len! + 1 set pass=!pass!!n! ) echo PASS: !pass!&echo. pause

Here's my revision of the first part of your script.

What you had before is a linear batch disaster I have to admit... You should review my version and ask questions, you've got a lot to learn, but I'm not here to just criticize you if you want to learn. All you need to do is ask the questions. You posted this, I only gave my honest opinion of the script.

NOTE: To make my script above easier to work with, I could have added a function I created in batch to check the length of the variable instead of hardcoding a length to match.. But you'd likely not understand any of my code and it would only add an unnecessary layer of complexity to this for no reason.

For a better password generator, I would've done something like this:
Code:
@echo off & setlocal enabledelayedexpansion set len=92 set alpha=AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789012345678901234567890123456789 set passlen=10 set pass= for /l %%G in (1,1,!passlen!) do ( set /a i=!random! %% !len! call set pass=!pass!%%alpha:~!i!,1%% ) echo PASS: !pass!&echo. pause

There's no way in hell your version would crack anything like that though, even if you had the method to create the correct password as a possibility; it'd take ages.

[Image: nbwXALV.png]

Ah, thanks for your suggestion. I understand the code that you posted, as I've stated above this is just a simple generator/cracker .. I have a few genuine crack simulators, it's just my complex version was having a few bugs. Thanks for your suggestion though! :Smile:

Reply

RE: [BATCH] Simple Password Cracker #4
(01-08-2014, 04:29 PM)ninja805 Wrote: Ah, thanks for your suggestion. I understand the code that you posted, as I've stated above this is just a simple generator/cracker .. I have a few genuine crack simulators, it's just my complex version was having a few bugs. Thanks for your suggestion though! :Smile:

No problem for the suggestions, but based on the code I seen, I think you're bluffing and it's not hard to tell. Simple, doesn't mean it has to be poor code, this demonstrates both of those features, not just simplicity alone...

For my own curiosity, explain my code then. You put yourself on the spot here, but I want to see if you can describe it.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: [BATCH] Simple Password Cracker #5
I know this sounds a bit ocd but to clean up your code, you can (and should) put the cls command after the marker
It's often the outcasts, the iconoclasts ... those who have the least to lose because they
don't have much in the first place, who feel the new currents and ride them the farthest.

Reply

RE: [BATCH] Simple Password Cracker #6
I know this sounds a bit ocd but to clean up your code, you can (and should) put the cls command after the marker
It's often the outcasts, the iconoclasts ... those who have the least to lose because they
don't have much in the first place, who feel the new currents and ride them the farthest.

Reply

RE: [BATCH] Simple Password Cracker #7
(02-22-2014, 12:23 AM)Zev Turner Wrote: I know this sounds a bit ocd but to clean up your code, you can (and should) put the cls command after the marker
The marker? What exactly do you mean by that? And usually I do if you're referring to
Code:
:Example

Reply

RE: [BATCH] Simple Password Cracker #8
(02-22-2014, 12:23 AM)Zev Turner Wrote: I know this sounds a bit ocd but to clean up your code, you can (and should) put the cls command after the marker
The marker? What exactly do you mean by that? And usually I do if you're referring to
Code:
:Example

Reply

RE: [BATCH] Simple Password Cracker #9
Something like
Code:
cls :a
instead of
Code:
cls :a
It's often the outcasts, the iconoclasts ... those who have the least to lose because they
don't have much in the first place, who feel the new currents and ride them the farthest.

Reply

RE: [BATCH] Simple Password Cracker #10
Something like
Code:
cls :a
instead of
Code:
cls :a
It's often the outcasts, the iconoclasts ... those who have the least to lose because they
don't have much in the first place, who feel the new currents and ride them the farthest.

Reply