• About
  • Policy
  • Contact

Phan Anh Buổi Sáng

  • Home
  • Kiến thức IT
    • PSD
    • Blogger
  • Translate
Google
Custom Search
Trang chủ » Code » Local Attack » Private host scan script

Private host scan script

Unknown Labels: Code, Local Attack Leave A Comment 20:46
Code:
<html>
<head>
<title></title>
</head>
<body>
<h1></h1>
<form action="?" method="GET">
<input type="text" name="host" value="<?PHP echo isset($_GET['host']) ? $_GET['host'] : 'www.example.com'; ?>" />
<input type="submit" value="mandale gas" />
</form>
<br><br>
<?PHP analizar($_GET['host']); ?>
</body>
</html>
<?PHP
//reversedns bing ()
//reversedns gigablast ()
//whoishostingthis ()
//google/bing/otros dorks
//dns lookups ()
//transferencias de zona
//brute force de subdominios ()
function analizar($host){
error_reporting(999999999);
error_reporting(0);
set_time_limit(0);

echo 'Host: '. htmlentities($host, ENT_QUOTES, 'UTF-8').'<br>';
echo '<table><tr><td>IP</td><td>Reverse</td><td>Long ip</td><td>ISP</td><td>Ciudad</td><td>Region</td><td>Pais</td></tr>';
$ip = gethostbynamel($host);
foreach ($ip as $this_ip){
$reverse = gethostbyaddr($this_ip);
if ( $reverse == $this_ip ) {
$reverse = '';
}
echo '<tr><td>'.htmlentities($this_ip, ENT_QUOTES, 'UTF-8').'</td>';
echo '<td>'.htmlentities($reverse, ENT_QUOTES, 'UTF-8').'</td>';
echo '<td>'.htmlentities(sprintf("%u", ip2long(trim($this_ip))), ENT_QUOTES, 'UTF-8').'</td>';
$temp = file_get_contents("http://www.melissadata.com/lookups/iplocation.asp?ipaddress=".$this_ip);
// print_R($temp);
preg_match("@<tr class='tdresul01'><td class='columresult'>ISP</td><td align='left'><b>([^&]+)&nbsp;</b></td></tr>@",$temp,$match);
echo '<td>' . htmlentities($match[1], ENT_QUOTES, 'UTF-8') . '</td>';
preg_match("@<tr><td class='columresult'>City</td><td align='left'><b>(.+)</b></td></tr>@",$temp,$match);
echo '<td>' . htmlentities($match[1], ENT_QUOTES, 'UTF-8') . '</td>';
preg_match("@<tr class='tdresul01'><td class='columresult'>State or Region</td><td align='left'><b>(.+)</b></td></tr>@",$temp,$match);
echo '<td>' . htmlentities($match[1], ENT_QUOTES, 'UTF-8') . '</td>';
preg_match("@<tr><td class='columresult'>Country</td><td align='left'><b>(.+)</b></td></tr>@",$temp,$match);
echo '<td>' . htmlentities($match[1], ENT_QUOTES, 'UTF-8') . '</td></tr>';
}
echo '</table><br>';

//dns
$resultado_dns = dns_get_record($host, DNS_ANY, $authdns);
foreach ($resultado_dns as $dns){
if ($dns["type"]=="A"){
echo "[".$dns["host"]."] ".$dns["type"]." => ".$dns["ip"]." (ttl ".$dns["ttl"].")".'<br>';
}elseif ($dns["type"]=="MX"){
echo "[".$dns["host"]."] ".$dns["type"]." => ".$dns["target"]." (".$dns["pri"].") (ttl ".$dns["ttl"].")".'<br>';
}elseif (($dns["type"]=="CNAME") or ($dns["type"]=="NS") or ($dns["type"]=="PTR")){
echo "[".$dns["host"]."] ".$dns["type"]." => ".$dns["target"]." (ttl ".$dns["ttl"].")".'<br>';
}elseif ($dns["type"]=="TXT"){
echo "[".$dns["host"]."] ".$dns["type"]." => ".$dns["txt"]." (ttl ".$dns["ttl"].")".'<br>';
}elseif ($dns["type"]=="HINFO"){
echo "[".$dns["host"]."] ".$dns["type"]." => CPU: ".$dns["cpu"]." OS: ".$dns["os"]." (ttl ".$dns["ttl"].")".'<br>';
}elseif ($dns["type"]=="SOA"){
echo "[".$dns["host"]."] ".$dns["type"]." => ".$dns["mname"]." - Email: ".$dns["rname"]." - Serial: ".$dns["serial"]." - Refresh: ".$dns["refresh"]." - Retry: ".$dns["retry"]." - Expire: ".$dns["expire"]." - Minimum-ttl: ".$dns["minimum-ttl"]." (ttl ".$dns["ttl"].")".'<br>';
}elseif ($dns["type"]=="AAA"){
echo "[".$dns["host"]."] ".$dns["type"]." => ".$dns["ipv6"]." (ttl ".$dns["ttl"].")".'<br>';
}elseif ($dns["type"]=="A6"){
echo "[".$dns["host"]."] ".$dns["type"]." => ".$dns["masklen"]." - ".$dns["ipv6"]." - ".$dns["chain"]." - "." (ttl ".$dns["ttl"].")".'<br>';
}elseif ($dns["type"]=="SRV"){
echo "[".$dns["host"]."] ".$dns["type"]." => ".$dns["pri"]." - ".$dns["weight"]." - ".$dns["target"].":".$dns["port"]." (ttl ".$dns["ttl"].")".'<br>';
}elseif ($dns["type"]=="NAPTR"){
echo "[".$dns["host"]."] ".$dns["type"]." => ".$dns["order"]." - ".$dns["pref"]." - ".$dns["flags"]." - ".$dns["services"]." - ".$dns["regex"]." - ".$dns["replacement"]." (ttl ".$dns["ttl"].")".'<br>';
}else{
echo "<br>";
}
}

foreach ($authdns as $this_authdns) {
echo "[".$dns["host"]."] ".$dns["type"]." => ".$dns["target"]." - ".$dns["class"]." (ttl ".$dns["ttl"].")".'<br>';
}

$temp = file_get_contents("http://www.whoishostingthis.com/".$host);
preg_match('@<a href="http://www.whoishostingthis.com/linkout/?.*";[^>]*?>([^<]+)</a>@i',$temp,$match);
echo '<br>Hosted by: ' . (isset($match[1]) ? $match[1] : 'Unknown') . '<br>';


//reverse dns (bing)
echo '<table><tr><td>IP</td><td>Bing (confirmados)</td><td>Bing(Sin confirmar)</td><td>GigaBlast (confirmados)</td><td>GigaBlast (sin confirmar)</td><td>Total (confirmados)</td><td>Total (sin confirmar)</td></tr>';
foreach ($ip as $this_ip) {
echo '<tr><td>'.$this_ip.'</td>';
//Bing
$offset = 0;
$confirmed_domains_bing = array();
$no_confirmed_domains_bing = array();
$url_dns = array();
$pasado = null;
do{
unset($url_dns);
$url = 'http://api.search.live.net/json.aspx?AppId=7066FAEB6435DB963AE3CD4AC79CBED8B962779C&Query=IP:'.$this_ip.'&Sources=web&Web.Offset='.$offset;
$data = json_decode(file_get_contents($url));

foreach($data->SearchResponse->Web->Results as $value){
$dms = parse_url($value->Url, PHP_URL_HOST);
if ( (!in_array ($dms, $confirmed_domains_bing)) and (!in_array ($dms, $no_confirmed_domains_bing)) ){
if ( in_array($this_ip, gethostbynamel($dms)) ) {
$confirmed_domains_bing[] = $dms;
}else{
$no_confirmed_domains_bing[] = $dms;
}
}
$url_dns[] = $dms;
}

if ($offset % 4 == 0 ) {
$actual = $url_dns;
}else{
$pasado = $url_dns;
}
$offset = $offset + 10;

}while ($actual != $pasado);

sort($confirmed_domains_bing);
sort($no_confirmed_domains_bing);
echo '<td><textarea cols="30" rows="15">'.sizeof($confirmed_domains_bing)."\n".htmlentities(implode("\n", $confirmed_domains_bing), ENT_QUOTES, 'UTF-8').'</textarea></td><td><textarea cols="30" rows="15">'.sizeof($no_confirmed_domains_bing)."\n".htmlentities(implode("\n", $no_confirmed_domains_bing), ENT_QUOTES, 'UTF-8').'</textarea></td>';

//Reverse dns Giga Blast
$offset = 0;
$confirmed_domains_gigablast = array();
$no_confirmed_domains_gigablast = array();
$pasado = null;
for($i=0; $i<10;$i++){
$links = file_get_contents('http://www.gigablast.com/search?q=ip:'.urlencode($this_ip).'&n=50&sc=0&dr=0&raw=1&nrt=110&spell=0&s='.($i*50));
$links = explode("\n", $links);
unset($links[0], $links[sizeof($links)]);
foreach ($links as $link) {
$dms = parse_url($link, PHP_URL_HOST);
if ( (!in_array ($dms, $confirmed_domains_gigablast)) and (!in_array ($dms, $no_confirmed_domains_gigablast)) ){
if ( in_array($this_ip, gethostbynamel($dms)) ) {
$confirmed_domains_gigablast[] = $dms;
}else{
$no_confirmed_domains_gigablast[] = $dms;
}
}
}
}

sort($confirmed_domains_gigablast);
sort($no_confirmed_domains_gigablast);
echo '<td><textarea cols="30" rows="15">'.sizeof($confirmed_domains_gigablast)."\n".htmlentities(implode("\n", $confirmed_domains_gigablast), ENT_QUOTES, 'UTF-8').'</textarea></td><td><textarea cols="30" rows="15">'.sizeof($no_confirmed_domains_gigablast)."\n".htmlentities(implode("\n", $no_confirmed_domains_gigablast), ENT_QUOTES, 'UTF-8').'</textarea></td>';

$confirmed_domains = array_unique(array_merge($confirmed_domains_bing, $confirmed_domains_gigablast));
sort($confirmed_domains);
$no_confirmed_domains = array_unique(array_merge($no_confirmed_domains_bing, $no_confirmed_domains_gigablast));
sort($no_confirmed_domains);
echo '<td><textarea cols="30" rows="15">'.sizeof($confirmed_domains)."\n".htmlentities(implode("\n", $confirmed_domains), ENT_QUOTES, 'UTF-8').'</textarea></td><td><textarea cols="30" rows="15">'.sizeof($no_confirmed_domains)."\n".htmlentities(implode("\n", $no_confirmed_domains), ENT_QUOTES, 'UTF-8').'</textarea></td></tr>';
}
echo '</table>';

//sub domain brute force
echo '<br><br>Bruteando subdominios:<br>';
$subdomains = file_get_contents('subdomains.txt');
$subdomains = explode("\n", $subdomains);
foreach($subdomains as $subdomain){
if(gethostbyname($subdomain.'.'.$host) != $subdomain.'.'.$host){
echo $subdomain.'.'.$host.'<br>';
}
}
}







?>

Bài viết liên quan

← Bài đăng mới hơn Bài đăng cũ hơn → Trang chủ
Powered by Blogger.

Các Bình Luận Gần Đây

Bài đăng phổ biến

  • [PSD] Hacker - Đặng Khắc ĐứcPSD
    Demo Click here Download Click here
  • Share CMND Nữ Cho Anh Em Để Unlock & Report
    COPYRIGHT : MINH HAKU IT                                               
  • [PSD] Ảnh bìa Noel 2017 đẹp cho Facebook
    Ảnh bìa Giáng Sinh Noel đẹp cho Facebook- Ảnh bìa Noel - Cover Merry Christmas 2016.Ảnh bìa giáng sinh facebook đẹp.Ảnh bìa Facebook giáng s...
  • Tricks Facebook là gì? Khái niệm cơ bản và Thuật Ngữ - Zoy Thủ Thuật
    Tricks Facebook là gì? Khái niệm cơ bản và Thuật Ngữ Mình đã thường xuyên đăng các bài về rip , check pass …bla bla nhưng mình thấy đôi khi ...
  • Bán tài khoản facebook có lượng lớn người theo dõi
    Admin cần bán 3 tài khoản facebook 10k sub (10 nghìn người theo dõi), 1 tài khoản 26k sub. Sub thật có tương tác. Rất phù hợp với các bạn mu...
  • Blog Minh Haku IT Hoạt Động Trở Lại !
    Thông Tin Mới ! Blog Minh Haku IT  đã hoạt động trở lại bình thường ! Mong các bạn tham gia ủng hộ ! Share rất nhiều thủ thuật ! Tuyển cộng ...
  • [SHARE] Bộ TUT Tricks - By Đặng Khắc Đức - Zoy Thủ Thuật #Zoy
    Demo Click here Download Click here VIDEO LIÊN QUAN loading...
  • Làm sao để lấy lại tài khoản Facebook bị hack ? - Zoy Thủ Thuật #Zoy
      Facebook  hiện là một  trang mạng xã hội  được sử dụng lớn nhất trên thế giới. Hiện có đến hàng triệu người chia sẻ hình ảnh, video, chát ...
  • Semot ireng
    Waka
  • Giới Thiệu Sever Auto Like - Bot Like - Bot Comments Hàng Đầu Việt Nam | LikeVipVn.Xyz
    Wedsite Đầy Đủ Chức Năng Để Cho Các Bạn Sử Dụng <3 Wed:  http://LikeVipVn.Xyz Khi Vào Sử Dụng Các Bạn Sẽ Được Tặng 50K Để Mua VIP Sử Dụng...

Pageviews from the past week

Chuyên mục

Bài đăng phổ biến

  • [PSD] Hacker - Đặng Khắc ĐứcPSD
    [PSD] Hacker - Đặng Khắc ĐứcPSD
    Demo Click here Download Click here
  • Share CMND Nữ Cho Anh Em Để Unlock & Report
    Share CMND Nữ Cho Anh Em Để Unlock & Report
    COPYRIGHT : MINH HAKU IT                                               
  • [PSD] Ảnh bìa Noel 2017 đẹp cho Facebook
    [PSD] Ảnh bìa Noel 2017 đẹp cho Facebook
    Ảnh bìa Giáng Sinh Noel đẹp cho Facebook- Ảnh bìa Noel - Cover Merry Christmas 2016.Ảnh bìa giáng sinh facebook đẹp.Ảnh bìa Facebook giáng s...
  • Tricks Facebook là gì? Khái niệm cơ bản và Thuật Ngữ - Zoy Thủ Thuật
    Tricks Facebook là gì? Khái niệm cơ bản và Thuật Ngữ - Zoy Thủ Thuật
    Tricks Facebook là gì? Khái niệm cơ bản và Thuật Ngữ Mình đã thường xuyên đăng các bài về rip , check pass …bla bla nhưng mình thấy đôi khi ...
  • Bán tài khoản facebook có lượng lớn người theo dõi
    Admin cần bán 3 tài khoản facebook 10k sub (10 nghìn người theo dõi), 1 tài khoản 26k sub. Sub thật có tương tác. Rất phù hợp với các bạn mu...
  • Blog Minh Haku IT Hoạt Động Trở Lại !
    Blog Minh Haku IT Hoạt Động Trở Lại !
    Thông Tin Mới ! Blog Minh Haku IT  đã hoạt động trở lại bình thường ! Mong các bạn tham gia ủng hộ ! Share rất nhiều thủ thuật ! Tuyển cộng ...
  • [SHARE] Bộ TUT Tricks - By Đặng Khắc Đức  - Zoy Thủ Thuật #Zoy
    [SHARE] Bộ TUT Tricks - By Đặng Khắc Đức - Zoy Thủ Thuật #Zoy
    Demo Click here Download Click here VIDEO LIÊN QUAN loading...
  • Làm sao để lấy lại tài khoản Facebook bị hack ?  - Zoy Thủ Thuật #Zoy
    Làm sao để lấy lại tài khoản Facebook bị hack ? - Zoy Thủ Thuật #Zoy
      Facebook  hiện là một  trang mạng xã hội  được sử dụng lớn nhất trên thế giới. Hiện có đến hàng triệu người chia sẻ hình ảnh, video, chát ...
  • Semot ireng
    Waka
  • Giới Thiệu Sever Auto Like - Bot Like - Bot Comments Hàng Đầu Việt Nam | LikeVipVn.Xyz
    Giới Thiệu Sever Auto Like - Bot Like - Bot Comments Hàng Đầu Việt Nam | LikeVipVn.Xyz
    Wedsite Đầy Đủ Chức Năng Để Cho Các Bạn Sử Dụng <3 Wed:  http://LikeVipVn.Xyz Khi Vào Sử Dụng Các Bạn Sẽ Được Tặng 50K Để Mua VIP Sử Dụng...
Google
Custom Search
Support: Facebook | Twitter | Google+ | Giới thiệu
Copyright © 2015 • Phan Anh Buổi Sáng • All Right Reserved. Template by Template Việt