elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Guía actualizada para evitar que un ransomware ataque tu empresa


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [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 1,557 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



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

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

Código
  1. #!usr/bin/perl
  2. #LocateIP 0.3 (C) Doddy Hackman 2012
  3.  
  4. use LWP::UserAgent;
  5. use IO::Socket;
  6.  
  7. my $nave = LWP::UserAgent->new();
  8. $nave->timeout(5);
  9. $nave->agent(
  10. "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"
  11. );
  12.  
  13. head();
  14. if ( $ARGV[0] ) {
  15.    start( $ARGV[0] );
  16. }
  17. else {
  18.    sintax();
  19. }
  20. copyright();
  21.  
  22. sub start {
  23.    print "\n[+] Target :  $_[0]\n";
  24.    infocon( $_[0] );
  25. }
  26.  
  27. sub sintax {
  28.    print "\n[+] sintax : $0 <web>\n";
  29. }
  30.  
  31. sub head {
  32.    print q(
  33.  
  34.  
  35.  
  36. @      @@@@    @@@@    @    @@@@@  @@@@@     @  @@@@@
  37. @     @    @  @    @   @      @    @         @  @    @
  38. @     @    @  @       @ @     @    @         @  @    @
  39. @     @    @  @       @ @     @    @         @  @    @
  40. @     @    @  @      @   @    @    @@@@      @  @@@@@
  41. @     @    @  @      @   @    @    @         @  @    
  42. @     @    @  @      @@@@@    @    @         @  @    
  43. @     @    @  @    @@     @   @    @         @  @    
  44. @@@@@  @@@@    @@@@ @     @   @    @@@@@     @  @    
  45.  
  46.  
  47.  
  48. );
  49. }
  50.  
  51. sub copyright {
  52.    print "\n\n== --(C) Doddy Hackman 2012 -- ==\n\n";
  53.    exit(1);
  54. }
  55.  
  56. sub infocon {
  57.    my $target = shift;
  58.  
  59.    my $get    = gethostbyname($target);
  60.    my $target = inet_ntoa($get);
  61.  
  62.    print "\n\n[+] Getting info\n\n\n";
  63.    $total =
  64.      "http://www.melissadata.com/lookups/iplocation.asp?ipaddress=$target";
  65.    $re = toma($total);
  66.  
  67.    if ( $re =~ /City<\/td><td align=(.*)><b>(.*)<\/b><\/td>/ ) {
  68.        print "[+] City : $2\n";
  69.    }
  70.    else {
  71.        print "[-] Not Found\n";
  72.        copyright();
  73.    }
  74.    if ( $re =~ /Country<\/td><td align=(.*)><b>(.*)<\/b><\/td>/ ) {
  75.        print "[+] Country : $2\n";
  76.    }
  77.    if ( $re =~ /State or Region<\/td><td align=(.*)><b>(.*)<\/b><\/td>/ ) {
  78.        print "[+] State or Region : $2\n";
  79.    }
  80.  
  81.    print "\n\n[+] Getting Hosts\n\n\n";
  82.  
  83.    my $code = toma( "http://www.ip-adress.com/reverse_ip/" . $target );
  84.  
  85.    while ( $code =~ /whois\/(.*?)\">Whois/g ) {
  86.        my $dns = $1;
  87.        chomp $dns;
  88.        print "[DNS] : $dns\n";
  89.    }
  90. }
  91.  
  92. sub toma {
  93.    return $nave->get( $_[0] )->content;
  94. }
  95.  
  96. # ¿ The End ?
  97.  


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

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Perl Tk] LocateIP 0.4
Scripting
BigBear 6 3,087 Último mensaje 1 Abril 2012, 01:02 am
por BigBear
[PyQT4] LocateIP 0.1
Scripting
BigBear 4 3,058 Último mensaje 29 Agosto 2012, 01:48 am
por -- KiLiaN --
[Java] LocateIP 0.1
Java
BigBear 0 1,435 Último mensaje 13 Enero 2013, 03:39 am
por BigBear
[Delphi] LocateIP 0.1
Programación General
BigBear 5 2,793 Último mensaje 12 Mayo 2013, 21:35 pm
por 0xFer
[Python-Android] LocateIP 0.1
Scripting
BigBear 0 1,758 Último mensaje 19 Agosto 2013, 20:19 pm
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines