elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Buscar Ingresar Registrarse
29 Mayo 2012, 09:18  


Tema destacado: Recuerda que debes registrarte en el foro para poder participar (preguntar y responder)

+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting (Moderadores: Novlucker, Leo Gutiérrez., EleKtro H@cker)
| | |-+  [Perl] LocateIP 0.3
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Perl] LocateIP 0.3  (Leído 128 veces)
Doddy

Desconectado Desconectado

Mensajes: 220



Ver Perfil
[Perl] LocateIP 0.3
« en: 19 Enero 2012, 20:35 »

La nueva version de este programa para buscar informacion sobre un ip.

Código
#!usr/bin/perl
#LocateIP 0.3 (C) Doddy Hackman 2012
 
use LWP::UserAgent;
use IO::Socket;
 
my $nave = LWP::UserAgent->new();
$nave->timeout(5);
$nave->agent(
"Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"
);
 
head();
if ( $ARGV[0] ) {
   start( $ARGV[0] );
}
else {
   sintax();
}
copyright();
 
sub start {
   print "\n[+] Target :  $_[0]\n";
   infocon( $_[0] );
}
 
sub sintax {
   print "\n[+] sintax : $0 <web>\n";
}
 
sub head {
   print q(
 
 
 
@      @@@@    @@@@    @    @@@@@  @@@@@     @  @@@@@
@     @    @  @    @   @      @    @         @  @    @
@     @    @  @       @ @     @    @         @  @    @
@     @    @  @       @ @     @    @         @  @    @
@     @    @  @      @   @    @    @@@@      @  @@@@@
@     @    @  @      @   @    @    @         @  @    
@     @    @  @      @@@@@    @    @         @  @    
@     @    @  @    @@     @   @    @         @  @    
@@@@@  @@@@    @@@@ @     @   @    @@@@@     @  @    
 
 
 
);
}
 
sub copyright {
   print "\n\n== --(C) Doddy Hackman 2012 -- ==\n\n";
   exit(1);
}
 
sub infocon {
   my $target = shift;
 
   my $get    = gethostbyname($target);
   my $target = inet_ntoa($get);
 
   print "\n\n[+] Getting info\n\n\n";
   $total =
     "http://www.melissadata.com/lookups/iplocation.asp?ipaddress=$target";
   $re = toma($total);
 
   if ( $re =~ /City<\/td><td align=(.*)><b>(.*)<\/b><\/td>/ ) {
       print "[+] City : $2\n";
   }
   else {
       print "[-] Not Found\n";
       copyright();
   }
   if ( $re =~ /Country<\/td><td align=(.*)><b>(.*)<\/b><\/td>/ ) {
       print "[+] Country : $2\n";
   }
   if ( $re =~ /State or Region<\/td><td align=(.*)><b>(.*)<\/b><\/td>/ ) {
       print "[+] State or Region : $2\n";
   }
 
   print "\n\n[+] Getting Hosts\n\n\n";
 
   my $code = toma( "http://www.ip-adress.com/reverse_ip/" . $target );
 
   while ( $code =~ /whois\/(.*?)\">Whois/g ) {
       my $dns = $1;
       chomp $dns;
       print "[DNS] : $dns\n";
   }
}
 
sub toma {
   return $nave->get( $_[0] )->content;
}
 
# ¿ The End ?
 


« Última modificación: 19 Enero 2012, 20:37 por Doddy » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
perl
Desarrollo Web
chita_GB2 1 316 Último mensaje 4 Abril 2004, 05:34
por Morris
Ayuda con el Active Perl + Perl
Hacking Básico
Aironjack 3 926 Último mensaje 8 Marzo 2005, 07:52
por Aironjack
Que significa #!/usr/bin/perl ?? como ejecutamos un exploit en perl...
Bugs y Exploits
mousehack 7 2,198 Último mensaje 4 Noviembre 2005, 23:16
por BenRu
Libros de Perl online [PERL]
Scripting
madpitbull_99 0 854 Último mensaje 18 Mayo 2011, 21:49
por madpitbull_99
[Perl Tk] LocateIP 0.4
Scripting
Doddy 6 432 Último mensaje 1 Abril 2012, 01:02
por Doddy
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines