Created
December 19, 2014 22:32
-
-
Save kirsle/8464feb82455322cf491 to your computer and use it in GitHub Desktop.
Just a dead simple "password cracker" that will brute force your plain lowercased passwords (letters only, no numbers or capitals).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Simple password cracker. Tries every combination of plain lowercased | |
# passwords, from "a", "b", ..., "z", "aa", "ab", ... "az", "ba", "bb" ... | |
use 5.18.0; | |
use Time::HiRes qw(time); | |
use Digest::MD5 qw(md5_hex); | |
my $victim = $ARGV[0]; | |
if (!defined $victim) { | |
print "Hash to crack: "; | |
chomp(my $victim = <STDIN>); | |
} | |
my $start = time(); | |
my $passwd = 'a'; | |
while (1) { | |
if (md5_hex($passwd) eq $victim) { | |
my $elapsed = time() - $start; | |
say "I FOUND IT! Your password was $passwd"; | |
say "It took me $elapsed seconds to crack."; | |
exit(0); | |
} | |
$passwd++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment