Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. # Simple password cracker. Tries every combination of plain lowercased
  4. # passwords, from "a", "b", ..., "z", "aa", "ab", ... "az", "ba", "bb" ...
  5.  
  6. use 5.18.0;
  7. use Time::HiRes qw(time);
  8. use Digest::MD5 qw(md5_hex);
  9.  
  10. my $victim = $ARGV[0];
  11. if (!defined $victim) {
  12. print "Hash to crack: ";
  13. chomp(my $victim = <STDIN>);
  14. }
  15.  
  16. my $start = time();
  17.  
  18. my $passwd = 'a';
  19. while (1) {
  20. if (md5_hex($passwd) eq $victim) {
  21. my $elapsed = time() - $start;
  22. say "I FOUND IT! Your password was $passwd";
  23. say "It took me $elapsed seconds to crack.";
  24. exit(0);
  25. }
  26. $passwd++;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement