..used one or more modules you must have seen the iframes used for realtime result display. In this tutorial I'm going to show you how to insert them into your module and how they..
xAnalyze is a module that can search through corrupt data and configuration files in order to find the exact position of errors
<?php
/* Resolves CloudFlare Addresses
Author: Remco Kouw
Site: http://www.hacksuite.com
Last Edit: 02-04-2015
*/
set_time_limit(0);
session_cache_limiter('nocache');
header('Expires: '.gmdate('r',0));
header('Content-type: application/json');
$_DYNAMIC_ROOT = "../..";
include_once("../../header.php");
$aDataR = array();
$aDataR['jresult'] = false;
$aDataR['jmessage'] = "Invalid post data";
// validate hostname
if(!isset($_POST['sInput']) || $_POST['sInput']==""){
die(json_encode($aDataR));
}
$sSite = "http://".$_POST['sInput'];
$aInput = @parse_url($sSite);
if(!isset($aInput['host']) || $aInput['host']==""){
$aDataR['jmessage'] = "Invalid hostname";
die(json_encode($aDataR));
}
// setup variables and start with resolving
$sSite = str_replace("www.","",$aInput['host']);
$aPre = array("www","cpanel","ftp","mail","webmail","direct","direct-connect","dns","host","ns","mx","api","dbserver");
$sRealIP = "";
$sCFIP = "";
$bCF = false;
$bOffline = false;
for($x=0;$x<count($aPre);$x++){
if($x==0){
// filter header response for url
$aHeader = @get_headers("http://".$aPre[$x].".".$aInput['host']);
if(isset($aHeader[1])){
// search the headers for the cloudflare string
for($y=0;$y<count($aHeader);$y++){
if(stripos($aHeader[$y],"cloudflare")!==false){
// found cloudflare on this server
$bCF = true;
$sCFIP = @gethostbyname($sSite);
break;
}
}
}
else{
// failed to get headers, host is offline
$bOffline = true;
break;
}
}
$sTarget = $aPre[$x].".".$sSite;
$sIP = @gethostbyname($sTarget);
if(!filter_var($sIP,FILTER_VALIDATE_IP)){
continue;
}
// if there's an ip address and it's not the same as cloudflare then we have success
if($sIP!=$sCFIP){
$sRealIP = $sIP;
}
}
$aDataR['jresult'] = true;
if($sRealIP!=""){
$aDataR['jmessage'] = "Cloudflare server on: ".$sCFIP."<br />\nReal ip address is: ".$sRealIP;
}
else{
if(!$bCF && !$bOffline){
$aDataR['jmessage'] = "No cloudflare installed";
}
elseif(!$bCF && $bOffline){
$aDataR['jmessage'] = "Host is offline";
}
else{
$aDataR['jmessage'] = "Failed to get real ip address";
}
}
echo json_encode($aDataR);
?>