Olá queridos!
Aqui um script para reverse lookup utilizando como intermédio o Bing.
Um bom caminho para reverse sem a presença de falso positivos ( Esperamos , ahuah )
Use:
Code:
Video:
Aqui um script para reverse lookup utilizando como intermédio o Bing.
Um bom caminho para reverse sem a presença de falso positivos ( Esperamos , ahuah )
Use:
php reverse.php ip_file.txt output thread
Code:
- Código:
<?php
/*
* Bing reverse
* By n4sss.
*
* needz pcntl_fork;
* php reverse.php ip_file.txt output thread
*
* */
set_time_limit(0);
error_reporting(0);
function save($content, $file){
$fp = fopen($file, "a");
fwrite($fp, $content."\n");
fclose($fp);
}
function sec($site){
preg_match_all('{http://(.*?)(/)}siU',$site, $sites);
if(preg_match("/www/",@$sites[0][0])){
return $site;
}
else{
return $site=str_replace("http://","http://www.",str_replace("index.php","",@$sites[0][0]));
}
}
function reverse($dork){
global $log, $count;
$npages = 100;
$npage = 1;
$allLinks = array();
$count++;
while($npage <= $npages) {
print "[] +++ Reversing -> {$dork} \n";
$x=@file_get_contents("http://www.bing.com/search?q=ip:".$dork."&go=&filt=all&first=".$npage."");
flush();
if($x){
preg_match_all('(<div class="sb_tlst">.*<h3>.*<a href="(.*)".*>(.*)</a>.*</h3>.*</div>)siU', $x, $findlink);
foreach ($findlink[1] as $fl)
$allLinks[]=sec($fl);
$npage = $npage + 10;
if (preg_match('(first=' . $npage . '&)siU', $x, $linksuiv) == 0) break;
}else
break;
}
$allDmns = array();
foreach ($allLinks as $kk => $vv){
$allDmns[] = $vv;
}
foreach(array_unique($allDmns) as $h3h3){
save($h3h3,$log);
}
echo "[] Sites writed to -> $log\n";
}
function main($list, $threadsn)
{
$out = 0;
$thr = $threadsn;
$ini = 0;
$fin = $thr - 1;
while(1){
$childs = array();
for ($count = $ini; $count <= $fin; $count++){
if(empty($list[$count])){
$out = 1;
continue;
}
$pid = pcntl_fork();
if ( $pid == -1 ) {
echo "Fork error\n";
exit(1);
} else if ($pid) {
array_push($childs, $pid);
} else {
reverse($list[$count]);
exit(0);
}
}
foreach($childs as $key => $pid){
pcntl_waitpid($pid, $status);
}
if($out == 1){
return;
}
$ini = $fin + 1;
$fin = $fin + $thr;
}
}
if(isset($argv[1], $argv[2], $argv[3])){
$dorks = array_filter(explode("\n", file_get_contents("$argv[1]")));
$log = trim("$argv[2]");
$thread = trim("$argv[3]");
$count = 1;
$time1 = time();
main($dorks, $thread);
$to_parse = array_filter(explode("\n", file_get_contents("$log")));
@unlink($log);
foreach($to_parse as $parse){
$regex = "#http://(.*?)/#";
preg_match_all($regex, $parse, $value);
foreach($value[1] as $url);
save("http://{$url}", $log);
}
$link = array_unique(array_filter(explode("\n", file_get_contents("$log"))));
@unlink($log);
foreach($link as $final_content){
save("{$final_content}", $log);
}
$time2 = time();
print "FINISHED!\nTOTAL SITES IN OUR LOG -> ".count(explode("\n", file_get_contents(($log))))." ({$log})\nTime Elapsed: ".($time1-$time2)." Seconds\n";
}else{print "BING REVERSE BY N4SSS\nphp $argv[0] ips_.txt log thread\n";}
?>
Video: