Hack Forums
How can i find the I.P Adress of a Website hiding behind Cloudflare ? [Please help] - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449)
+---- Forum: Website Hacking (https://hackforums.net/forumdisplay.php?fid=43)
+---- Thread: How can i find the I.P Adress of a Website hiding behind Cloudflare ? [Please help] (/showthread.php?tid=2233039)



How can i find the I.P Adress of a Website hiding behind Cloudflare ? [Please help] - DDoSerrs - Feb 20, 2012

Title is pretty Self explanitory. How can i find the I.P Adress of a Website hiding behind Cloudflare ??

-If Anyone can Link me to a tutorial it would be Kindly Appreciated <3



* - The Ion - Feb 20, 2012

you can use this php script for finding it

Code
<?php

/*
* getCF.php
* I got tired of looking up the DNS records of these various hosts
* to find the real IP of a CloudFlare protected Server.
* www.bigkesh.com
* orgy[at]bigkesh[dot]com
* Usage: php getCF.php domain.com
* Usage2: www.yoursite.com/getCF.php?find=domain.com
*/

if (!isset($argv[1]) && !isset($_GET['find']))
{
    die("Argument needs to be a valid hostname.\n");
}

$lookupArr = array("mail.", "direct.", "direct-connect.", "cpanel.", "ftp.");

foreach ($lookupArr as $lookupKey)
{

    if (isset($_GET['find']))
    {
        $newline = "<br />";
        $lookupHost = $lookupKey . $_GET['find'];
    }
    else
    {
        $newline = "\n";
        $lookupHost = $lookupKey . $argv[1];
    }

    $foundHost = gethostbyname($lookupHost);

    if ($foundHost == $lookupHost)
    {
        echo "{$lookupHost} had no DNS record.{$newline}";
    }
    else
    {
        echo "{$lookupHost} = {$foundHost}{$newline}";
    }
}

?>

good luck