<?php
/*
* Author: Xt3mP
* Name: Dorks link grabber
* Version: 1.0 Bing
* Contact: xt3mp[at]null[dot]net
* Website: http://xt3mp.mx | http://backroot.org
*/
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dorks links Grabber (Bing version) | Xt3mP</title>
<style type="text/css">body{background-color:#2b2b2b;color:#777;font-family:Courier,"Courier New",monospace,sans-serif;font-size:12px}div#container{height:auto;margin:0 auto;width:600px}fieldset{background-color:#222;border:1px dashed #777;float:left;margin:5px;padding:5px;width:100%}legend{background-color:#555;border:1px dashed #777;color:#FFF;font-weight:700;margin:5px;padding:5px}label{float:left;margin-right:5px;padding-top:5px;text-align:right;width:100px}input,select{background-color:#E7E7E7;border:1px dashed #777;float:left;font-family:Courier,"Courier New",monospace,sans-serif;font-size:12px;margin-bottom:5px;padding:3px;width:490px}input[type=submit]{width:600px}h1{margin:0;padding:0}a{color:#CCC;font-weight:700}a:hover{color:#FFF;text-decoration:underline}</style>
</head>
<body>
<?php
class dorkGrabber
{
private $bing;
private $checkfile;
public function __construct()
{
$this->bing = 'http://www.bing.com/search?q=';
}
private function getSource($target)
{
$target = @You are not allowed to view links.
Register or
Login($target); return $target;
}
private function remakeUrl($url)
{
$url = You are not allowed to view links.
Register or
Login("/", $url); for($z = 0; $z < You are not allowed to view links.
Register or
Login($url) - 1; $z++) {
$new .= $url[$z].'/';
}
return $new;
}
private function checkUrl($url)
{
if(@You are not allowed to view links.
Register or
Login($this->remakeUrl($url).$this->checkfile, 'r')) return true;
else
return false;
}
private function parseLinks($target)
{
$data['rawlinks'] = You are not allowed to view links.
Register or
Login(); $data['correctlinks'] = You are not allowed to view links.
Register or
Login(); $data['badlinks'] = You are not allowed to view links.
Register or
Login(); for($i = 0; $i < 21; $i++)
{
$first = ($i == 0) ? 0 : ($i * 10) + 1;
$source = $this->getSource($target.'&first='.$first);
$pattern = "/<h3><a href=\"(.*?)\" onmousedown=/";
$preg = You are not allowed to view links.
Register or
Login($pattern, $source, $output, PREG_PATTERN_ORDER
);
if(You are not allowed to view links.
Register or
Login($output[1]) != 0) {
for($x = 0; $x<You are not allowed to view links.
Register or
Login($output[1]); $x++) {
if(!You are not allowed to view links.
Register or
Login($this->remakeUrl($output[1][$x]), $data['correctlinks'])) {
if($this->checkUrl($output[1][$x]))
{
$data['rawlinks'][] = $output[1][$x];
$data['correctlinks'][] = $this->remakeUrl($output[1][$x]);
}else{
$data['rawlinks'][] = $output[1][$x];
$data['badlinks'][] = $output[1][$x];
}
}
}
}else{
break;
}
}
return $data;
}
private function getLinks($target)
{
$newTarget = $this->getSource($target);
$check = "/<h1>No se han encontrado resultados para <strong>/";
if(@You are not allowed to view links.
Register or
Login($check, $newTarget)) return false;
else
return $this->parseLinks($target);
}
private function makeData($type, $links, $output = null)
{
switch($type)
{
case 'raw':
$title = '<h1>Raw links</h1>';
foreach($links['rawlinks'] as $link)
{
$linkdir .= $link."\r\n";
}
$data = $title.'<textarea rows="5" style="width: 600px; font-size: 11px;">'.$linkdir.'</textarea>';
break;
case 'correct':
$title = '<h1>Correct links</h1>';
foreach($links['correctlinks'] as $link)
{
$linkdir .= $link."$this->checkfile\r\n";
}
$data = $title.'<textarea rows="5" style="width: 600px; font-size: 11px;">'.$linkdir.'</textarea>';
break;
case 'bad':
$title = '<h1>Bad links</h1>';
if(You are not allowed to view links.
Register or
Login($links['badlinks'])) {
$data = $title.'<textarea rows="5" style="width: 600px; font-size: 11px;">None</textarea>';
}else{
foreach($links['badlinks'] as $link)
{
$linkdir .= $link."\r\n";
}
$data = $title.'<textarea rows="5" style="width: 600px; font-size: 11px;">'.$linkdir.'</textarea>';
}
break;
case 'txt':
$title = '<h1>Output file</h1>';
foreach($links['correctlinks'] as $link)
{
$linkdir .= $link.$this->checkfile;
}
$tot = You are not allowed to view links.
Register or
Login($links['correctlinks']) + You are not allowed to view links.
Register or
Login($links['badlinks']); $statistics = '
[Total links: <b>'.$tot.'</b>]
[Correct links: <b>'.You are not allowed to view links.
Register or
Login($links['correctlinks']).'</b>] [Bad links: <b>'.You are not allowed to view links.
Register or
Login($links['badlinks']).'</b>]'; $file = You are not allowed to view links.
Register or
Login($output, 'w+'); if($file)
{
You are not allowed to view links.
Register or
Login($file, $linkdir); $filedir = $output.' > http:/'.You are not allowed to view links.
Register or
Login($_SERVER["PHP_SELF"]).'/'.$output; $data = $title.'<textarea rows="5" style="width:600px;font-size:11px;margin-bottom:5px;">'.$filedir.'</textarea>';
$data .= $statistics.' <a href="./'.$output.'" target="_blank">[View output file]</a>';
}else{
$data = $title.$statistics.' [Can\'t make output file]';
}
break;
}
return $data;
}
public function makeDirective($dork, $output, $checkfile = null)
{
$dork = You are not allowed to view links.
Register or
Login($dork); $target = $this->bing.$dork;
$this->checkfile = $checkfile;
$grabber = $this->getLinks($target);
$result = '<fieldset style="text-align: justify"><legend>Result</legend>';
if($grabber === false)
{
$result .= 'The DORK (<b>'.You are not allowed to view links.
Register or
Login($dork).'</b>) doesn\'t return any results.'; }else{
$result .= $this->makeData('raw', $grabber);
$result .= $this->makeData('correct', $grabber);
$result .= $this->makeData('bad', $grabber);
$result .= $this->makeData('txt', $grabber, $output);
}
$result .= '</fieldset>';
return $result;
}
}
?>
<div id="container">
<fieldset>
<legend>Dorks links Grabber (Bing version) | <a href="http://xt3mp.mx" target="_blank">Xt3mP</a></legend>
<form action="" method="POST">
<label>Insert DORK:</label><input type="text" name="dork"/><br />
<label>Search eng.:</label><input type="text" name="engine" value="Bing" disabled="disabled"><br />
<label>Output file:</label><input type="text" name="output" /><br />
<label>Check file:</label><input type="text" name="check"/><br />
<input type="submit" name="get" value="Get Links!" />
</form>
</fieldset>
<?php
if(You are not allowed to view links.
Register or
Login($_POST['get'])) {
if(You are not allowed to view links.
Register or
Login($_POST['dork']) or You are not allowed to view links.
Register or
Login($_POST['output'])) {
echo '<script>alert("Some fields are empty!.");</script>';
}else{
$mtime = You are not allowed to view links.
Register or
Login(' ',$mtime); $mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;
$dorkGrabber = new dorkGrabber();
echo $dorkGrabber->makeDirective($_POST['dork'], $_POST['output'], $_POST['check']);
$mtime = You are not allowed to view links.
Register or
Login(' ',$mtime); $mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
echo 'This page took '.You are not allowed to view links.
Register or
Login($totaltime).' seconds to load.'; }
}
?>
</div>
</body>
</html>