Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.
X

Cpfinder.pl

Questa variante di Admin CP Finder scritto in perl dall’amico Razor4x (che non sono sempre io nel caso ve lo stiate chiedendo, ma è un nuovo amico di recente conoscenza a cui piace dare il suo umile contributo attraverso esempi concreti) si differenzia dai soliti code di ricerca del pannello amministrativo (anche dal precedente postato pochi giorni fà) perchè prevede l’utilizzo di un file di paths esterno. Un altra cosa interessante è la creazione del file di log che lavora sul singolo output in shell. Tradotto: anche se avviene il blocco dello scan in corso (Ctrl-c) l’output è stato loggato. Chiaramente è un esempio, anche il file con i paths è da considerarsi come tale.

#!/usr/bin/perl
# Admin CP Finder by Razor4x
use HTTP::Request::Common;
use LWP::UserAgent;
use LWP::Simple;
sub usage(){
    print "Admin CP finder by Razor4x\n";
    print "Usage: perl cpfinder.pl [host] [pathfile]\n";
    exit;
}
if (@ARGV!=2){
    &usage;
}
open (FILE,"<$ARGV[1]") or die ("can't open the pathfile: $!");
@paths=<FILE>;
close (FILE);
$url=$ARGV[0];
if ($url!~/^http:\/\//){
    $url="http://".$url;
    $mylol=$url;
}
foreach $l(@paths){
    chomp($l);
    if ($l!~/^\//){                            
            $l="/".$l;
    }      
    $url=$url.$l;
    #print $url."\n";
    $ua = LWP::UserAgent->new;
    $responde = HTTP::Request->new(GET => $url);
    if($ua->request($responde)->as_string){
        if ($ua->request($responde)->as_string=~/200 OK/){
            print "Found something good ---> $url\n";
            open (IMG,">>log_cp_finder.txt");
            print IMG "Found something...$url\n";
            close (IMG);
        }elsif($ua->request($responde)->as_string=~/404 Not Found/){
            open (IMG,">>log_cp_finder.txt");                        
            print "Not found....$url\n";
            print IMG "Not found....$url\n";
            close (IMG);
        }elsif($ua->request($responde)->as_string=~/406 Not Acceptable/){
            open (IMG,">>log_cp_finder.txt");
            print "Found but not acceptable...$url\n";
            print IMG "Found but not acceptable...$url\n";
            close (IMG);
        }elsif($ua->request($responde)->as_string=~/403 Forbidden/){
            open (IMG,">>log_cp_finder.txt");
            print "Found but forbidden...$url\n";
            print IMG "Found but forbidden...$url\n";
            close (IMG);
        }elsif($ua->request($responde)->as_string=~/400 Bad Request/){
            open (IMG,">>log_cp_finder.txt");
            print "This link is damaged!...$url\n";
            print IMG "This link is damaged!...$url\n";
            close (IMG);
        }elsif($ua->request($responde)->as_string=~/500 Internal Server Error/){
            open (IMG,">>log_cp_finder.txt");
            print "Found but internal server error...$url\n";
            print IMG "Found but internal server error...$url\n";
            close (IMG);
        }elsif($ua->request($responde)->as_string=~/302 Found/){
            open (IMG,">>log_cp_finder.txt");
            print "Found somthing...$url\n";
            print IMG "Found somthing...$url\n";
            close (IMG);
        }else{
            print "The site does not respond at the request\n";
        }
        #print $ua->request($responde)->as_string."\n";
        $url=$mylol;
    }
}
Pathfile: QUI

Articoli correlati:

Lascia un commento  

nome*

e-mail*

Indirizzo web

Invia commento

Powered by AlterVista