一个简陋的同ip域名查询脚本
一个简陋的同ip域名查询脚本,实在简陋,丢出来想要的拿走。
可以同时查询google page rank。
#!/usr/bin/perl
# Same IP / Reverse IP Lookup
# Code by c4rp3nt3r#0x50sec.org
#use POSIX;
use LWP::UserAgent;$lwp = new LWP::UserAgent or die;
print “ [*] Same IP / Reverse IP Lookup ”;
print ‘[*] by c4rp3nt3r@0x50sec.org’.” ”;$api = ‘http://sameip.org/ip/’;
$host = $ARGV[0];
$api .= $host;$res = $lwp->get($api);
$myres=$res->content;
#printf($myres) ; #for test
$i=0;
@hosts=();
$len=@hosts;#get_pr(‘www.0x50sec.org’);
while($myres =~ /<ashref=”http://(.+?)”\srel/i)
{
$qq=$&;
$host=$1;
$len=@hosts;
$hosts[$len]=$host;
$myres =~ s/$qq//mg;}
$len=@hosts;if($len != 0)
{
# print “[+] Domains Result: ”;
# for($i=0;$i<$len;$i++)
# {
# print “[$i] ”.$hosts[$i].” ”;
# }
print “[+] Google PageRank Result: ”;
for($i=0;$i<$len;$i++)
{
print “[$i] ”.substr(get_pr($hosts[$i]),0,1).” ”.$hosts[$i].” ”;
}}else
{
print “[-] Result Not Found ! ”;
exit;
}print “ [+] Found $len Domains! ”;
sub get_pr
{
@suburl= @_;
my $url = $suburl[0];
$prapi=’http://www.0x50sec.org/pr.php?h=’;
$prapi .= $url;
$prlwp = new LWP::UserAgent or die;
$prres = $prlwp->get($prapi);
$pr = $prres->content;
return $pr;
}
补充:软件开发 , 其他 ,