Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/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++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement