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

 

 


Tema destacado: Tutorial básico de Quickjs


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [Perl] Shodan Tool 0.6
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Perl] Shodan Tool 0.6  (Leído 2,530 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Perl] Shodan Tool 0.6
« en: 10 Abril 2015, 16:01 pm »

Un simple script para hacer busquedas en Shodan con las siguientes opciones :

  • Buscar resultados por IP
  • Buscar resultados por cantidad
  • Busqueda normal
  • Listar los query guardados
  • Busca los query guardados que ya fueron buscados
  • Lista los tags mas populares
  • Lista todos los servicios que shodan encuentra
  • DNS Lookup
  • Reverse DNS Lookup
  • Te devuelve tu IP
  • Te da informacion sobre tu API

Es necesario que tengan una API Key suya para poder usar la API de Shodan.

Un video con ejemplos de uso :



El codigo :

Código
  1. #!usr/bin/perl
  2. #Shodan Tool 0.6
  3. #(C) Doddy Hackman 2015
  4. #Based on : https://developer.shodan.io/api
  5. #ppm install http://www.eekboek.nl/dl/ppms/Crypt-SSLeay.ppd
  6. #ppm install http://www.bribes.org/perl/ppm/JSON.ppd
  7.  
  8. use LWP::UserAgent;
  9. use JSON;
  10. use Getopt::Long;
  11. use Color::Output;
  12. Color::Output::Init;
  13. use IO::Socket;
  14.  
  15. my $nave = LWP::UserAgent->new( ssl_opts => { verify_hostname => 1 } );
  16. $nave->agent(
  17. "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0"
  18. );
  19. $nave->timeout(5);
  20.  
  21. my $api_key = "LY10TuYViggY3GXRzLOUxdp6Kk3Lu9sa";
  22.  
  23. GetOptions(
  24.    "ip=s"           => \$ip,
  25.    "count=s"        => \$count,
  26.    "search=s"       => \$search,
  27.    "query"          => \$query,
  28.    "query_search=s" => \$query_search,
  29.    "query_tags"     => \$query_tags,
  30.    "services"       => \$services,
  31.    "resolve=s"      => \$resolve,
  32.    "reverse=s"      => \$reverse,
  33.    "myip"           => \$myip,
  34.    "api_info"       => \$api_info
  35. );
  36.  
  37. head();
  38.  
  39. if ( $ip ne "" ) {
  40.    if ( $ip =~ /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/ ) {
  41.        print by_ip($ip);
  42.    }
  43.    else {
  44.        my $get = gethostbyname($ip);
  45.        my $ip  = inet_ntoa($get);
  46.        by_ip($ip);
  47.    }
  48. }
  49. elsif ( $count ne "" ) {
  50.    by_count($count);
  51. }
  52. elsif ( $search ne "" ) {
  53.    by_search($search);
  54. }
  55. elsif ( $query ne "" ) {
  56.    by_query();
  57. }
  58. elsif ($query_search) {
  59.    by_query_search($query_search);
  60. }
  61. elsif ($query_tags) {
  62.  
  63.    by_query_tags($query_tags);
  64.  
  65. }
  66. elsif ( $services ne "" ) {
  67.    list_services();
  68. }
  69. elsif ( $resolve ne "" ) {
  70.    resolve($resolve);
  71. }
  72. elsif ( $reverse ne "" ) {
  73.    reverse_now($reverse);
  74. }
  75. elsif ( $myip ne "" ) {
  76.    my_ip();
  77. }
  78. elsif ( $api_info ne "" ) {
  79.    api_info();
  80. }
  81. else {
  82.    sintax();
  83. }
  84.  
  85. copyright();
  86.  
  87. # Functions
  88.  
  89. sub by_query_tags {
  90.  
  91.    printear_titulo("\n[+] Listening the most popular tags  ...\n\n");
  92.  
  93.    my $code =
  94.      toma( "https://api.shodan.io/shodan/query/tags?key=" . $api_key );
  95.  
  96.    $resultado = JSON->new->decode($code);
  97.  
  98.    my $total = $resultado->{'total'};
  99.  
  100.    if ( $total ne "" ) {
  101.        printear("[+] Total : ");
  102.        print $total. "\n\n";
  103.    }
  104.    else {
  105.        printear("[-] WTF !");
  106.    }
  107.  
  108.    my $i = 0;
  109.  
  110.    my @encontrados = @{ $resultado->{'matches'} };
  111.    foreach my $encontrado (@encontrados) {
  112.        my $value = $encontrado->{"value"};
  113.        my $count = $encontrado->{"count"};
  114.  
  115.        $i++;
  116.        print "-------------------------------------\n\n";
  117.        if ( $value ne "" ) {
  118.            printear("[+] Value : ");
  119.            print $value. "\n";
  120.        }
  121.  
  122.        if ( $count ne "" ) {
  123.            printear("[+] Count : ");
  124.            print $count. "\n";
  125.        }
  126.  
  127.        print "\n-------------------------------------\n";
  128.  
  129.        if ( $i % 5 == 0 ) {
  130.            printear("\n[+] Press enter to show more\n");
  131.            <STDIN>;
  132.        }
  133.  
  134.    }
  135.  
  136. }
  137.  
  138. sub by_query_search {
  139.  
  140.    my $query = $_[0];
  141.  
  142.    printear_titulo(
  143.        "\n[+] Searching in the directory of saved search queries ...\n\n");
  144.  
  145.    my $code =
  146.      toma( "https://api.shodan.io/shodan/query/search?key="
  147.          . $api_key
  148.          . "&query="
  149.          . $query );
  150.  
  151.    $resultado = JSON->new->decode($code);
  152.  
  153.    my $total = $resultado->{'total'};
  154.  
  155.    if ( $total ne "" ) {
  156.        printear("[+] Total : ");
  157.        print $total. "\n\n";
  158.    }
  159.    else {
  160.        printear("[-] WTF !");
  161.    }
  162.  
  163.    my $i = 0;
  164.  
  165.    my @encontrados = @{ $resultado->{'matches'} };
  166.    foreach my $encontrado (@encontrados) {
  167.        $i++;
  168.        print "-------------------------------------\n\n";
  169.        my $votes       = $encontrado->{"votes"};
  170.        my $description = $encontrado->{"description"};
  171.        my $title       = $encontrados->{"title"};
  172.        my $timestamp   = $encontrados->{"timestamp"};
  173.        my $query       = $encontrados->{"query"};
  174.  
  175.        if ( $votes ne "" ) {
  176.            printear("[+] Votes : ");
  177.            print $votes. "\n";
  178.        }
  179.  
  180.        if ( $description ne "" ) {
  181.            printear("[+] Description : ");
  182.            print $description. "\n\n";
  183.        }
  184.  
  185.        if ( $title ne "" ) {
  186.            printear("[+] Title : ");
  187.            print $title. "\n";
  188.        }
  189.  
  190.        if ( $timestamp ne "" ) {
  191.            printear("[+] Timestamp : ");
  192.            print $timestamp. "\n";
  193.        }
  194.  
  195.        if ( $query ne "" ) {
  196.            printear("[+] Query : ");
  197.            print $query. "\n";
  198.        }
  199.  
  200.        printear("[+] Tags : ");
  201.        my @tags = @{ $encontrado->{'tags'} };
  202.        foreach my $tag (@tags) {
  203.            print $tag. "\t";
  204.        }
  205.        print "\n";
  206.  
  207.        print "\n-------------------------------------\n";
  208.  
  209.        if ( $i % 5 == 0 ) {
  210.            printear("\n[+] Press enter to show more\n");
  211.            <STDIN>;
  212.        }
  213.  
  214.    }
  215.  
  216. }
  217.  
  218. sub by_query {
  219.  
  220.    printear_titulo("\n[+] Listening the saved search queries ...\n\n");
  221.  
  222.    my $code = toma( "https://api.shodan.io/shodan/query?key=" . $api_key );
  223.    $resultado = JSON->new->decode($code);
  224.  
  225.    my $total = $resultado->{'total'};
  226.  
  227.    if ( $total ne "" ) {
  228.        printear("[+] Total : ");
  229.        print $total. "\n\n";
  230.    }
  231.    else {
  232.        printear("[-] WTF !");
  233.    }
  234.  
  235.    my $i = 0;
  236.  
  237.    my @encontrados = @{ $resultado->{'matches'} };
  238.    foreach my $encontrado (@encontrados) {
  239.        $i++;
  240.        print "-------------------------------------\n\n";
  241.        my $votes       = $encontrado->{"votes"};
  242.        my $description = $encontrado->{"description"};
  243.        my $title       = $encontrados->{"title"};
  244.        my $timestamp   = $encontrados->{"timestamp"};
  245.        my $query       = $encontrados->{"query"};
  246.  
  247.        if ( $votes ne "" ) {
  248.            printear("[+] Votes : ");
  249.            print $votes. "\n";
  250.        }
  251.  
  252.        if ( $description ne "" ) {
  253.            printear("[+] Description : ");
  254.            print $description. "\n\n";
  255.        }
  256.  
  257.        if ( $title ne "" ) {
  258.            printear("[+] Title : ");
  259.            print $title. "\n";
  260.        }
  261.  
  262.        if ( $timestamp ne "" ) {
  263.            printear("[+] Timestamp : ");
  264.            print $timestamp. "\n";
  265.        }
  266.  
  267.        if ( $query ne "" ) {
  268.            printear("[+] Query : ");
  269.            print $query. "\n";
  270.        }
  271.  
  272.        printear("[+] Tags : ");
  273.        my @tags = @{ $encontrado->{'tags'} };
  274.        foreach my $tag (@tags) {
  275.            print $tag. "\t";
  276.        }
  277.        print "\n";
  278.  
  279.        print "\n-------------------------------------\n";
  280.  
  281.        if ( $i % 5 == 0 ) {
  282.            printear("\n[+] Press enter to show more\n");
  283.            <STDIN>;
  284.        }
  285.  
  286.    }
  287.  
  288. }
  289.  
  290. sub list_services {
  291.  
  292.    printear_titulo("\n[+] Listening all services that Shodan crawls ...\n\n");
  293.  
  294.    my $code = toma( "https://api.shodan.io/shodan/services?key=" . $api_key );
  295.    if ( $code ne "" ) {
  296.        my $i = 0;
  297.        while ( $code =~ /"(.*?)": "(.*?)"/migs ) {
  298.            $i++;
  299.            my $port = $1;
  300.            my $name = $2;
  301.            printear("[+] Port : ");
  302.            print $port. "\n";
  303.            printear("[+] Name : ");
  304.            print $name. "\n\n";
  305.  
  306.            if ( $i % 20 == 0 ) {
  307.                printear("\n[+] Press enter to show more\n");
  308.                <STDIN>;
  309.            }
  310.  
  311.        }
  312.    }
  313.    else {
  314.        print "[-] WTF !" . "\n";
  315.    }
  316.  
  317. }
  318.  
  319. sub resolve {
  320.  
  321.    my $hostnames = $_[0];
  322.  
  323.    printear_titulo("\n[+] Working in DNS Lookup ...\n\n");
  324.  
  325.    my $code =
  326.      toma( "https://api.shodan.io/dns/resolve?hostnames="
  327.          . $hostnames . "&key="
  328.          . $api_key );
  329.    if ( $code ne "" ) {
  330.        while ( $code =~ /"(.*?)": "(.*?)"/migs ) {
  331.            my $host = $1;
  332.            my $ip   = $2;
  333.            printear("[+] Hostname : ");
  334.            print $host. "\n";
  335.            printear("[+] IP : ");
  336.            print $ip. "\n";
  337.        }
  338.    }
  339.    else {
  340.        printear( "[-] WTF !" . "\n" );
  341.    }
  342.  
  343. }
  344.  
  345. sub reverse_now {
  346.  
  347.    $ips = $_[0];
  348.  
  349.    printear_titulo("\n[+] Working in Reverse DNS Lookup ...\n\n");
  350.  
  351.    my $code = toma(
  352.        "https://api.shodan.io/dns/reverse?ips=" . $ips . "&key=" . $api_key );
  353.    if ( $code ne "" ) {
  354.        while ( $code =~ /"(.*?)": \["(.*?)"\]/migs ) {
  355.            my $ip   = $1;
  356.            my $host = $2;
  357.            printear("[+] IP : ");
  358.            print $ip. "\n";
  359.            printear("[+] Hostname : ");
  360.            print $host. "\n";
  361.        }
  362.    }
  363.    else {
  364.        printear( "[-] WTF !" . "\n" );
  365.    }
  366. }
  367.  
  368. sub my_ip {
  369.    printear_titulo("\n[+] Getting your IP ...\n\n");
  370.    my $code = toma( "https://api.shodan.io/tools/myip?key=" . $api_key );
  371.    if ( $code =~ /"(.*)"/ ) {
  372.        my $ip = $1;
  373.        printear("[+] IP : ");
  374.        print $ip. "\n";
  375.    }
  376.    else {
  377.        printear( "[-] WTF !" . "\n" );
  378.    }
  379. }
  380.  
  381. sub api_info {
  382.  
  383.    printear_titulo("\n[+] Getting your API Info ...\n\n");
  384.  
  385.    my $code = toma( "https://api.shodan.io/api-info?key=" . $api_key );
  386.  
  387.    $resultado = JSON->new->decode($code);
  388.    my $unlock_left = $resultado->{"unlocked_left"};
  389.    my $telnet      = $resultado->{"telnet"};
  390.    my $plan        = $resultado->{"plan"};
  391.    my $http        = $resultado->{"https"};
  392.    my $unlocked    = $resultado->{"unlocked"};
  393.  
  394.    if ( $unlock_left ne "" ) {
  395.        printear("[+] Unlocked left : ");
  396.        print $unlock_left. "\n";
  397.    }
  398.    if ( $telnet ne "" ) {
  399.        printear("[+] Telnet : ");
  400.        print $telnet. "\n";
  401.    }
  402.    if ( $plan ne "" ) {
  403.        printear("[+] Plan : ");
  404.        print $plan. "\n";
  405.    }
  406.    if ( $http ne "" ) {
  407.        printear("[+] HTTPS : ");
  408.        print $http. "\n";
  409.    }
  410.    if ( $unlocked ne "" ) {
  411.        printear("[+] Unlocked : ");
  412.        print $unlocked. "\n";
  413.    }
  414.  
  415. }
  416.  
  417. sub by_count {
  418.  
  419.    my $query  = $_[0];
  420.    my $fecets = "";
  421.  
  422.    printear_titulo("\n[+] Searching in Shodan without Results ...\n\n");
  423.  
  424.    my $code =
  425.      toma( "https://api.shodan.io/shodan/host/count?key="
  426.          . $api_key
  427.          . "&query="
  428.          . $query
  429.          . "&facets="
  430.          . $facets );
  431.  
  432.    $resultado = JSON->new->decode($code);
  433.    my $total = $resultado->{"total"};
  434.    if ( $total ne "" ) {
  435.        printear("[+] Total : ");
  436.        print $total. "\n";
  437.    }
  438.    else {
  439.        printear( "[-] WTF !" . "\n" );
  440.    }
  441.  
  442. }
  443.  
  444. sub by_ip {
  445.  
  446.    my $target = $_[0];
  447.  
  448.    printear("\n[+] Target : ");
  449.    print $target. "\n";
  450.  
  451.    printear_titulo("\n[+] Getting Host Information ...\n\n");
  452.  
  453.    my $code = toma(
  454.        "https://api.shodan.io/shodan/host/" . $target . "?key=" . $api_key );
  455.    $resultado = JSON->new->decode($code);
  456.  
  457.    my $ip           = $resultado->{'ip'};
  458.    my $country_name = $resultado->{'country_name'};
  459.    my $country_code = $resultado->{'country_code'};
  460.    my $region_name  = $resultado->{'region_name'};
  461.    my $postal_code  = $resultado->{'postal_code'};
  462.  
  463.    if ( $ip ne "" ) {
  464.        printear("[+] IP : ");
  465.        print $ip. "\n";
  466.    }
  467.    if ( $country_name ne "" ) {
  468.        printear("[+] Country Name : ");
  469.        print $country_name. "\n";
  470.    }
  471.    if ( $country_code ne "" ) {
  472.        printear("[+] Country Code : ");
  473.        print $country_code. "\n";
  474.    }
  475.    if ( $region_name ne "" ) {
  476.        printear("[+] Area Code : ");
  477.        print $region_name. "\n";
  478.    }
  479.    if ( $postal_code ne "" ) {
  480.        printear("[+] Postal Code : ");
  481.        print $postal_code. "\n";
  482.    }
  483.    printear("[+] Hostnames : ");
  484.    my @hostnames = @{ $resultado->{'hostnames'} };
  485.    foreach my $host (@hostnames) {
  486.        print $host. "\t";
  487.    }
  488.    print "\n";
  489.    printear_titulo("\n[+] Getting Data ...\n\n");
  490.    my $i           = 0;
  491.    my @encontrados = @{ $resultado->{'data'} };
  492.    foreach my $encontrado (@encontrados) {
  493.        $i++;
  494.        print "-------------------------------------\n\n";
  495.        my $ip           = $encontrado->{"ip_str"};
  496.        my $country      = $encontrado->{"location"}{"country_name"};
  497.        my $product      = $encontrado->{"product"};
  498.        my $version      = $encontrado->{"version"};
  499.        my $data         = $encontrado->{"data"};
  500.        my $cpe          = $encontrado->{"cpe"};
  501.        my $time         = $encontrado->{"timestamp"};
  502.        my $last_updated = $encontrado->{"last_update"};
  503.        my $port         = $encontrado->{"port"};
  504.        my $os           = $encontrado->{"os"};
  505.        my $isp          = $encontrado->{"isp"};
  506.        my $ans          = $encontrado->{"ans"};
  507.        my $banner       = $encontrado->{"banner"};
  508.  
  509.        if ( $ip ne "" ) {
  510.            printear("[+] IP : ");
  511.            print $ip. "\n";
  512.        }
  513.        if ( $port ne "" ) {
  514.            printear("[+] Port : ");
  515.            print $port. "\n";
  516.        }
  517.        printear("[+] Hostnames : ");
  518.        my @hostnames2 = @{ $encontrado->{'hostnames'} };
  519.        foreach my $host2 (@hostnames2) {
  520.            print $host2. "\t";
  521.        }
  522.        print "\n";
  523.        if ( $country ne "" ) {
  524.            printear("[+] Country : ");
  525.            print $country. "\n";
  526.        }
  527.        if ( $product ne "" ) {
  528.            printear("[+] Product : ");
  529.            print $product. "\n";
  530.        }
  531.        if ( $version ne "" ) {
  532.            printear("[+] Version : ");
  533.            print $version. "\n";
  534.        }
  535.        if ( $data ne "" ) {
  536.            printear("[+] Data : ");
  537.            print "\n\n" . $data . "\n";
  538.        }
  539.        if ( $time ne "" ) {
  540.            printear("[+] Time : ");
  541.            print $time. "\n";
  542.        }
  543.        if ( $last_updated ne "" ) {
  544.            printear("[+] Last Updated : ");
  545.            print $last_updated. "\n";
  546.        }
  547.        if ( $cpe ne "" ) {
  548.            printear("[+] CPE : ");
  549.            print $cpe. "\n";
  550.        }
  551.        if ( $os ne "" ) {
  552.            printear("[+] OS : ");
  553.            print $os. "\n";
  554.        }
  555.        if ( $isp ne "" ) {
  556.            printear("[+] ISP : ");
  557.            print $isp. "\n";
  558.        }
  559.        if ( $asn ne "" ) {
  560.            printear("[+] ASN : ");
  561.            print $ans. "\n";
  562.        }
  563.        if ( $banner ne "" ) {
  564.            printear("[+] Banner : ");
  565.            print $banner. "\n";
  566.        }
  567.        print "\n-------------------------------------\n";
  568.  
  569.        if ( $i % 5 == 0 ) {
  570.            printear("\n[+] Press enter to show more\n");
  571.            <STDIN>;
  572.        }
  573.  
  574.    }
  575.  
  576. }
  577.  
  578. sub by_search {
  579.  
  580.    my $target = $_[0];
  581.  
  582.    printear("[+] Target : ");
  583.    print $target. "\n";
  584.  
  585.    printear_titulo("\n[+] Searching in Shodan ...\n\n");
  586.  
  587.    my $code =
  588.      toma( "https://api.shodan.io/shodan/host/search?key="
  589.          . $api_key
  590.          . "&query="
  591.          . $target
  592.          . "&facets=" );
  593.  
  594.    $resultado = JSON->new->decode($code);
  595.  
  596.    my $total = $resultado->{'total'};
  597.  
  598.    if ( $total ne "" ) {
  599.        printear("[+] Total : ");
  600.        print $total. "\n";
  601.    }
  602.    else {
  603.        printear("[-] WTF !");
  604.    }
  605.  
  606.    my $ip           = $resultado->{'ip'};
  607.    my $country_name = $resultado->{'country_name'};
  608.    my $country_code = $resultado->{'country_code'};
  609.    my $region_name  = $resultado->{'region_name'};
  610.    my $postal_code  = $resultado->{'postal_code'};
  611.  
  612.    if ( $ip ne "" ) {
  613.        printear("[+] IP : ");
  614.        print $ip. "\n";
  615.    }
  616.    if ( $country_name ne "" ) {
  617.        printear("[+] Country Name : ");
  618.        print $country_name. "\n";
  619.    }
  620.    if ( $country_code ne "" ) {
  621.        printear("[+] Country Code : ");
  622.        print $country_code. "\n";
  623.    }
  624.    if ( $region_name ne "" ) {
  625.        printear("[+] Area Code : ");
  626.        print $region_name. "\n";
  627.    }
  628.    if ( $postal_code ne "" ) {
  629.        printear("[+] Postal Code : ");
  630.        print $postal_code. "\n";
  631.    }
  632.  
  633.    if ( $resultado->{'hostnames'}[0] ne "" ) {
  634.        printear("[+] Hostnames : ");
  635.        my @hostnames = @{ $resultado->{'hostnames'} };
  636.        foreach my $host (@hostnames) {
  637.            print $host. "\t";
  638.        }
  639.        print "\n";
  640.    }
  641.  
  642.    printear_titulo("\n[+] Getting Data ...\n\n");
  643.  
  644.    my $i = 0;
  645.  
  646.    my @encontrados = @{ $resultado->{'matches'} };
  647.    foreach my $encontrado (@encontrados) {
  648.        $i++;
  649.        print "-------------------------------------\n\n";
  650.        my $ip           = $encontrado->{"ip_str"};
  651.        my $country      = $encontrado->{"location"}{"country_name"};
  652.        my $product      = $encontrado->{"product"};
  653.        my $version      = $encontrado->{"version"};
  654.        my $data         = $encontrado->{"data"};
  655.        my $cpe          = $encontrado->{"cpe"};
  656.        my $time         = $encontrado->{"timestamp"};
  657.        my $last_updated = $encontrado->{"last_update"};
  658.        my $port         = $encontrado->{"port"};
  659.        my $os           = $encontrado->{"os"};
  660.        my $isp          = $encontrado->{"isp"};
  661.        my $ans          = $encontrado->{"ans"};
  662.        my $banner       = $encontrado->{"banner"};
  663.  
  664.        if ( $ip ne "" ) {
  665.            printear("[+] IP : ");
  666.            print $ip. "\n";
  667.        }
  668.        if ( $port ne "" ) {
  669.            printear("[+] Port : ");
  670.            print $port. "\n";
  671.        }
  672.        printear("[+] Hostnames : ");
  673.        my @hostnames2 = @{ $encontrado->{'hostnames'} };
  674.        foreach my $host2 (@hostnames2) {
  675.            print $host2. "\t";
  676.        }
  677.        print "\n";
  678.        if ( $country ne "" ) {
  679.            printear("[+] Country : ");
  680.            print $country. "\n";
  681.        }
  682.        if ( $product ne "" ) {
  683.            printear("[+] Product : ");
  684.            print $product. "\n";
  685.        }
  686.        if ( $version ne "" ) {
  687.            printear("[+] Version : ");
  688.            print $version. "\n";
  689.        }
  690.        if ( $data ne "" ) {
  691.            printear("[+] Data : ");
  692.            print "\n\n" . $data . "\n";
  693.        }
  694.        if ( $time ne "" ) {
  695.            printear("[+] Time : ");
  696.            print $time. "\n";
  697.        }
  698.        if ( $last_updated ne "" ) {
  699.            printear("[+] Last Updated : ");
  700.            print $last_updated. "\n";
  701.        }
  702.        if ( $cpe ne "" ) {
  703.            printear("[+] CPE : ");
  704.            print $cpe. "\n";
  705.        }
  706.        if ( $os ne "" ) {
  707.            printear("[+] OS : ");
  708.            print $os. "\n";
  709.        }
  710.        if ( $isp ne "" ) {
  711.            printear("[+] ISP : ");
  712.            print $isp. "\n";
  713.        }
  714.        if ( $asn ne "" ) {
  715.            printear("[+] ASN : ");
  716.            print $ans. "\n";
  717.        }
  718.        if ( $banner ne "" ) {
  719.            printear("[+] Banner : ");
  720.            print $banner. "\n";
  721.        }
  722.        print "\n-------------------------------------\n";
  723.  
  724.        if ( $i % 5 == 0 ) {
  725.            printear("\n[+] Press enter to show more\n");
  726.            <STDIN>;
  727.        }
  728.  
  729.    }
  730.  
  731. }
  732.  
  733. sub printear {
  734.    cprint( "\x036" . $_[0] . "\x030" );
  735. }
  736.  
  737. sub printear_logo {
  738.    cprint( "\x037" . $_[0] . "\x030" );
  739. }
  740.  
  741. sub printear_titulo {
  742.    cprint( "\x0310" . $_[0] . "\x030" );
  743. }
  744.  
  745. sub toma {
  746.    return $nave->get( $_[0] )->content;
  747. }
  748.  
  749. sub sintax {
  750.    printear("\n[+] Sintax : ");
  751.    print "perl $0 <option> <value>\n";
  752.    printear("\n[+] Options : \n\n");
  753.    print "-ip <ip> : Host Information\n";
  754.    print "-count <query> : Search Shodan without Results\n";
  755.    print "-search <query> : Search Shodan\n";
  756.    print "-query : List the saved search queries\n";
  757.    print
  758.      "-query_search <query> : Search the directory of saved search queries\n";
  759.    print "-query_tags : List the most popular tags\n";
  760.    print "-services : List all services that Shodan crawls\n";
  761.    print "-resolve <host> : DNS Lookup\n";
  762.    print "-reverse <ip> : Reverse DNS Lookup\n";
  763.    print "-myip : My IP Address\n";
  764.    print "-api_info : API Plan Information\n";
  765.    printear("\n[+] Example : ");
  766.    print "perl shodan.pl -search petardas\n";
  767.    copyright();
  768. }
  769.  
  770. sub head {
  771.    printear_logo("\n-- == Shodan Tool 0.6 == --\n\n");
  772. }
  773.  
  774. sub copyright {
  775.    printear_logo("\n\n-- == (C) Doddy Hackman 2015 == --\n\n");
  776.    exit(1);
  777. }
  778.  
  779. # The End ?
  780.  

Si quieren bajar el programa lo pueden hacer de aca :

SourceForge.


En línea

Pablo Videla


Desconectado Desconectado

Mensajes: 2.274



Ver Perfil WWW
Re: [Perl] Shodan Tool 0.6
« Respuesta #1 en: 10 Abril 2015, 16:04 pm »

Tus scripts siempre son interesantes, deberías tenerlo en github pero no comprimidos , de esta forma podemos clonarlos o comentar sobre ellos, o corregir problemas ,etc.

Saludos y gracias por compartir!.


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Tool][Perl] search-vul 0.4
Nivel Web
~ Yoya ~ 0 2,712 Último mensaje 7 Enero 2010, 20:58 pm
por ~ Yoya ~
[Perl] Iframe DDos Attack Tool
Scripting
BigBear 0 2,761 Último mensaje 7 Octubre 2011, 01:15 am
por BigBear
[Perl] BingHack Tool 0.1
Scripting
BigBear 0 1,484 Último mensaje 26 Mayo 2012, 16:02 pm
por BigBear
[Perl Tk] BingHack Tool 0.1 « 1 2 »
Scripting
BigBear 10 4,681 Último mensaje 28 Mayo 2012, 23:23 pm
por BigBear
[Perl] Shodan Tool 0.2
Scripting
BigBear 0 2,001 Último mensaje 21 Diciembre 2013, 00:30 am
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines