fahim420

md5 perl upgraded

May 30th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.26 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # __ _ __ _
  3. # / /_ __ __ ______________ _____ __ __ (_)_ ______ / /__(_)__
  4. # / __ \/ / / / / ___/ ___/ __ `/_ / / / / / / / / / / __ \/ //_/ / _ \
  5. # / /_/ / /_/ / / /__/ / / /_/ / / /_/ /_/ / / / /_/ / / / / ,< / / __/
  6. # /_.___/\__, / \___/_/ \__,_/ /___/\__, /_/ /\__,_/_/ /_/_/|_/_/\___/
  7. # /____/ /____/___/
  8. #
  9. ###############################################################################
  10. # Download huge collections of wordlist:#
  11. #http://ul.to/folder/j7gmyz#
  12. ##########################################################################
  13. #
  14. ####################################################################
  15. # Need daylie updated proxies?#
  16. #http://j.mp/Y7ZZq9#
  17. ################################################################
  18. #
  19. ######################################################
  20. #### MD5 Hash Brute Force Cracker ######
  21. ###################################################
  22. # 03-03-14
  23. # v.0.0.2
  24.  
  25.  
  26.  
  27. $dbgtmr = "1"; #Intervall of showing the current speed + lastpassword in seconds.
  28.  
  29.  
  30.  
  31. if ($dbgtmr<=0){ die "Set dbgtmr to a value >=1 !\n";};
  32.  
  33. use Digest::MD5 qw(md5_hex);
  34.  
  35. use Time::HiRes qw(gettimeofday);
  36.  
  37.  
  38.  
  39. if ($ARGV[0]=~"a") {
  40.  
  41. $alpha = "abcdefghijklmnopqrstuvwxyz";}
  42.  
  43. if ($ARGV[0]=~"A") {
  44.  
  45. $alpha = $alpha. "ABCDEFGHIJKLMNOPQRSTUVWXYZ";}
  46.  
  47. if ($ARGV[0]=~"n") {
  48.  
  49. $alpha = $alpha."1234567890";}
  50.  
  51. if ($ARGV[0]=~"s") {
  52.  
  53. $alpha = $alpha. "!\"\$%&/()=?-.:\\*'-_:.;,";}
  54.  
  55.  
  56.  
  57. if ($alpha eq "" or $ARGV[3] eq "") {usage();};
  58.  
  59. if (length($ARGV[3]) != 32) { die "Sorry but it seems that the MD5 is not valid!\n";};
  60.  
  61.  
  62.  
  63. print "Selected charset for attack: '$alpha\'\n";
  64.  
  65. print "Going to Crack '$ARGV[3]'...\n";
  66.  
  67.  
  68.  
  69. for (my $t=$ARGV[1];$t<=$ARGV[2];$t++){
  70.  
  71. crack ($t);
  72.  
  73. }
  74.  
  75.  
  76.  
  77. sub usage{
  78.  
  79. print "\n";
  80. print " #############################################################################\n";
  81. print " # MD5 Hash Brute Force Cracker - v 0.0.2 | 03-03-14 #\n";
  82. print " # #\n";
  83. print " # find me on: twitter: @crazyjunkie1 #\n";
  84. print " # github/gist.github: eye9poop #\n";
  85. print " # pastebin: gelbeseiten #\n";
  86. print " # google +: crazyjunkie #\n";
  87. print " # youtube: crazyjunkie (old artikel08) #\n";
  88. print " # (channel not up to date | no time sorry) #\n";
  89. print " # by ..:: crazyjunkie ::.. #\n";
  90. print " # good source from good people for your profit working #\n";
  91. print " # #\n";
  92. print " # Usage: ./md5crack.pl <setkarakter> <minkarakter> <maxkarakter> <hashMD5> #\n";
  93. print " # Character options: a - small letters # a,b,c #\n";
  94. print " # A - big letters # A,B,C #\n";
  95. print " # n - numbers # 1,2,3 #\n";
  96. print " # s - symbols # !,#,@ #\n";
  97. print " # Example: ./md5crack.pl an 1 3 1bc29b36f623ba82aaf6724fd3b16718 #\n";
  98. print " # #\n";
  99. print " #############################################################################\n";
  100. sys.exit(1)
  101.  
  102. }
  103.  
  104.  
  105.  
  106. sub crack{
  107.  
  108. $CharSet = shift;
  109.  
  110. @RawString = ();
  111.  
  112. for (my $i =0;$i<$CharSet;$i++){ $RawString[i] = 0;}
  113.  
  114. $Start = gettimeofday();
  115.  
  116. do{
  117.  
  118. for (my $i =0;$i<$CharSet;$i++){
  119.  
  120. if ($RawString[$i] > length($alpha)-1){
  121.  
  122. if ($i==$CharSet-1){
  123.  
  124. print "Bruteforcing done with $CharSet Chars. No Results.\n";
  125.  
  126. $cnt=0;
  127.  
  128. return false;
  129.  
  130. }
  131.  
  132. $RawString[$i+1]++;
  133.  
  134. $RawString[$i]=0;
  135.  
  136. }
  137.  
  138. }
  139.  
  140. ###################################################
  141.  
  142. $ret = "";
  143.  
  144. for (my $i =0;$i<$CharSet;$i++){ $ret = $ret . substr($alpha,$RawString[$i],1);}
  145.  
  146. $hash = md5_hex($ret);
  147.  
  148. $cnt++;
  149.  
  150. $Stop = gettimeofday();
  151.  
  152. if ($Stop-$Start>$dbgtmr){
  153.  
  154. $cnt = int($cnt/$dbgtmr);
  155.  
  156. #print "$cnt hashes\\second.\tLast Pass '$ret\'\n";
  157.  
  158. $cnt=0;
  159.  
  160. $Start = gettimeofday();
  161.  
  162. }
  163.  
  164. #print "$ARGV[3] != $hash ($ret)\n";
  165.  
  166. if ($ARGV[3] eq $hash){
  167. print "\nPassword Cracked! => $ret\n";
  168. die "\nPassword Cracked! => $ret\n";
  169.  
  170. }
  171.  
  172. ###################################################
  173.  
  174. #checkhash($CharSet)."\n";
  175.  
  176.  
  177.  
  178. $RawString[0]++;
  179.  
  180. }while($RawString[$CharSet-1]<length($alpha));
  181.  
  182. }
  183.  
  184.  
  185.  
  186. sub checkhash{
  187.  
  188. $CharSet = shift;
  189.  
  190. $ret = "";
  191.  
  192. for (my $i =0;$i<$CharSet;$i++){ $ret = $ret . substr($alpha,$RawString[$i],1);}
  193.  
  194. $hash = md5_hex($ret);
  195.  
  196. $cnt++;
  197.  
  198. $Stop = gettimeofday();
  199.  
  200. if ($Stop-$Start>$dbgtmr){
  201.  
  202. $cnt = int($cnt/$dbgtmr);
  203.  
  204. #print "$cnt hashes\\second.\tLast Pass '$ret\'\n";
  205.  
  206. $cnt=0;
  207.  
  208. $Start = gettimeofday();
  209.  
  210. }
  211.  
  212.  
  213.  
  214. if ($ARGV[3] eq $hash){
  215.  
  216. die "\nPassword Cracked! => $ret\n";
  217.  
  218. }
  219.  
  220.  
  221.  
  222.  
  223. }
Add Comment
Please, Sign In to add comment