diff --git a/README.md b/README.md index 75caebda3..bf1e879f6 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@
- - + + diff --git a/inc/conf/configure.pl b/inc/conf/configure.pl index 8de4e9db5..8e051bd57 100644 --- a/inc/conf/configure.pl +++ b/inc/conf/configure.pl @@ -12,7 +12,7 @@ our ($Version, $logoVersion, $scriptUrl, $logUrl, $ipUrl, $conectUrl, $script, $scriptInstall, $script_bac, $scriptbash, $scriptv, $scriptCompletion, $scriptComplInstall, $readme, $uplog, $replace, $replaceFROM, $server, $geoServer); -$Version="15.0.9"; +$Version="16.0.0"; $logoVersion="V $Version"; $scriptUrl="https://raw.githubusercontent.com/AlisamTechnology/ATSCAN/master/atscan.pl"; $logUrl="https://raw.githubusercontent.com/AlisamTechnology/ATSCAN/master/inc/conf/version.log"; diff --git a/inc/conf/version.log b/inc/conf/version.log index 91aa2b0eb..0ff541330 100644 --- a/inc/conf/version.log +++ b/inc/conf/version.log @@ -1,6 +1,7 @@ -ATSCAN SCANNER VERSION 15.0.9 RELEASE +ATSCAN SCANNER VERSION 16.0.0 RELEASE ===================================================== - CHANGES: v15.0.9 10/02/2019 + CHANGES: v16.0.0 10/02/2019 - Optimize shoran process. + - Add shodan ports. - Enjoy! ================= diff --git a/inc/functions/shodan.pl b/inc/functions/shodan.pl index a3dcd74a2..5beb38a63 100644 --- a/inc/functions/shodan.pl +++ b/inc/functions/shodan.pl @@ -12,13 +12,13 @@ ## SHODAN our($ua, $limit, $shoapikey, $shoip, $shocount, $shosearch, $shoquery, $shoquerySearch, $shoqueryTags, $shoservices, $shoresolve, - $shoreverse, $shomyip, $shoapiInfo, $shofilters, $facets, $pages, $output, $V_IP, $V_RANG, @c); + $shoreverse, $shomyip, $shoapiInfo, $shofilters, $shoports, $facets, $pages, $output, $V_IP, $V_RANG, @c); my $nn=0; my $noshodanres="No results found|Invalid IP"; my $base="https://api.shodan.io"; my @sho_scans=($shoip, $shocount, $shosearch, $shoquery, $shoquerySearch, $shoqueryTags, $shoservices, $shoresolve, $shoreverse, - $shomyip, $shoapiInfo); + $shomyip, $shoapiInfo, $shoports); $facets="" if !$facets; $pages=1 if !$pages; @@ -50,6 +50,7 @@ sub check_host_validation { sho_ip($f, $nn) if $sub eq 1; sho_dns_resolve($f, $nn) if $sub eq 2; sho_dns_reverse($f, $nn) if $sub eq 3; + sho_ports($f, $nn) if $sub eq 4; }else{ invalid(); } @@ -149,7 +150,7 @@ sub build_sho_ip { ########################################################################################### ## JSON DECODE ###################################################################### sub _json { - my $shoRes =shift; + my $shoRes =$_[0]; my $json = JSON->new->allow_nonref; return $json->decode( $shoRes ); } @@ -285,6 +286,7 @@ sub sho_services { my $n=0; while ( $shoRes =~ /"(.*?)": "(.*?)"/migs ) { $n++; + sleep 1; sho_print("", "Port", $1, ""); sho_print("", "Name", $2, ""); print $c[10]."..........................................\n"; @@ -320,10 +322,10 @@ sub shoapinfo { if ($shoRes) { $shoRes=_json($shoRes); end_hash_print($shoRes); - ltak(); }else{ no_Result("your API Info"); } + ltak(); } ########################################################################################### @@ -364,6 +366,21 @@ sub sho_dns_reverse { ltak(); } +########################################################################################### +## SHODAN PORTS ######################################################################### +sub sho_ports { + my ($port, $nn)=@_; + sho_print("", "", "", "Getting all used shodan api Ports"); + sleep 1; + my $shoRes=getShoResults("$base/shodan/ports?key=$shoapikey"); + if ( $shoRes ) { + sho_print("", "Ports", $shoRes, ""); + }else{ + no_Result("ports"); + } + ltak(); +} + ########################################################################################### ## SEARCH COUNT ######################################################################### sub sho_count { @@ -381,6 +398,7 @@ sub sho_count { no_Result($query); } } + ltak(); } ########################################################################################### @@ -630,6 +648,10 @@ sub sho_ip { my @shoreverse=build_sho_ip($shoreverse); for my $f(@shoreverse) { $nn++; check_host_validation($f, $nn, "3"); } } + if ( $shoports ) { + my @shoports=build_sho_ip($shoports); + for my $f(@shoports) { $nn++; check_host_validation($f, $nn, "4"); } + } if ( $shoqueryTags ) { sho_query_tags(); } if ( $shoquery ) { sho_query(); } if ( $shoservices ) { sho_services(); }