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 if (!isset($_POST["captcha"])) { header('Location: /dhalsim.html'); die(..

Decoded Output download

<?php  
	 
	if (!isset($_POST["captcha"])) { 
		header('Location: /dhalsim.html'); 
		die(); 
	} 
		 
	if($_POST) { //<----- :D 
	    session_start(); 
	    if($_POST['captcha'] != $_SESSION['digit']) { 
		header('Location: captchafail.html'); 
		die(); 
	    } 
	    session_destroy(); 
	} 
 
	if(isset($_POST['flag'])) 
	{ 
		$flag = $_POST["flag"]; 
		eval(gzinflate(base64_decode(str_rot13('H8yYmR0gIeOIFZfiFZ3GHAYG00/YFHlCql5WH9WEHPcF0yGVY1WVlHmIHNeAF0mXFIHblIpNXIKFgNLN')))); 
		while(!feof($names)) { 
		    $cmp = fgets($names); 
		    $cmp = str_replace(array("
", "
"), '',$cmp); 
		    $val = strcmp($cmp , $flag); 
		    if($val == 0) { 
			break; 
		    } else { 
			continue; 
		    } 
		} 
		fclose($names); 
	} 
 
	if($val == 0) { 
		header('Location: flag_ok.html'); 
	 } else { 
		header('Location: loginfail.html'); 
	 } 
	 
?>

Did this file decode correctly?

Original Code

<?php 
	
	if (!isset($_POST["captcha"])) {
		header('Location: /dhalsim.html');
		die();
	}
		
	if($_POST) { //<----- :D
	    session_start();
	    if($_POST['captcha'] != $_SESSION['digit']) {
		header('Location: captchafail.html');
		die();
	    }
	    session_destroy();
	}

	if(isset($_POST['flag']))
	{
		$flag = $_POST["flag"];
		eval(gzinflate(base64_decode(str_rot13('H8yYmR0gIeOIFZfiFZ3GHAYG00/YFHlCql5WH9WEHPcF0yGVY1WVlHmIHNeAF0mXFIHblIpNXIKFgNLN'))));
		while(!feof($names)) {
		    $cmp = fgets($names);
		    $cmp = str_replace(array("\r", "\n"), '',$cmp);
		    $val = strcmp($cmp , $flag);
		    if($val == 0) {
			break;
		    } else {
			continue;
		    }
		}
		fclose($names);
	}

	if($val == 0) {
		header('Location: flag_ok.html');
	 } else {
		header('Location: loginfail.html');
	 }
	
?>

Function Calls

header 1

Variables

None

Stats

MD5 7a007232264d40df9d413f1a3728dd0c
Eval Count 0
Decode Time 102 ms