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 eval(base64_decode('DQoJZnVuY3Rpb24gZGVjb2RlICggJGtleSApIHsNCiAgICAJJGFycmF5ID0gc..

Decoded Output download


	function decode ( $key ) {
    	$array = split('-', $key);
    	$first = hexdec($array[0]);
    	$second = hexdec($array[1]);
    	$index = ($first+$second)/10000;
    	if ( !in_array($index, array(1,2,3,4)) ) {
    		return 0;
    	}
    	for ( $i = 2; $i < 5; $i++ ) {
    	    $sum += hexdec($array[$i]);
    	}
    	if ( $sum != hexdec($array[5]) ) {
    	    return 0;
    	}
    	//$date = date('d.m.Y H:i:s', hexdec($array[$index]));
    	return hexdec($array[$index]);
    	//return $date;
	}
function check_license ( $license_key ) {
	$ins = decode($license_key);
	$d = time() - $ins;
	if ( $d > 86400*30 ) {
		return '   ';
	}
	return '';
}
	

Did this file decode correctly?

Original Code

<?php

eval(base64_decode('DQoJZnVuY3Rpb24gZGVjb2RlICggJGtleSApIHsNCiAgICAJJGFycmF5ID0gc3BsaXQoJy0nLCAka2V5KTsNCiAgICAJJGZpcnN0ID0gaGV4ZGVjKCRhcnJheVswXSk7DQogICAgCSRzZWNvbmQgPSBoZXhkZWMoJGFycmF5WzFdKTsNCiAgICAJJGluZGV4ID0gKCRmaXJzdCskc2Vjb25kKS8xMDAwMDsNCiAgICAJaWYgKCAhaW5fYXJyYXkoJGluZGV4LCBhcnJheSgxLDIsMyw0KSkgKSB7DQogICAgCQlyZXR1cm4gMDsNCiAgICAJfQ0KICAgIAlmb3IgKCAkaSA9IDI7ICRpIDwgNTsgJGkrKyApIHsNCiAgICAJICAgICRzdW0gKz0gaGV4ZGVjKCRhcnJheVskaV0pOw0KICAgIAl9DQogICAgCWlmICggJHN1bSAhPSBoZXhkZWMoJGFycmF5WzVdKSApIHsNCiAgICAJICAgIHJldHVybiAwOw0KICAgIAl9DQogICAgCS8vJGRhdGUgPSBkYXRlKCdkLm0uWSBIOmk6cycsIGhleGRlYygkYXJyYXlbJGluZGV4XSkpOw0KICAgIAlyZXR1cm4gaGV4ZGVjKCRhcnJheVskaW5kZXhdKTsNCiAgICAJLy9yZXR1cm4gJGRhdGU7DQoJfQ0KZnVuY3Rpb24gY2hlY2tfbGljZW5zZSAoICRsaWNlbnNlX2tleSApIHsNCgkkaW5zID0gZGVjb2RlKCRsaWNlbnNlX2tleSk7DQoJJGQgPSB0aW1lKCkgLSAkaW5zOw0KCWlmICggJGQgPiA4NjQwMCozMCApIHsNCgkJcmV0dXJuICfC4uXk5e0g7eXi5fDt++kg6+j25e3n6O7t7fvpIOrr/vcnOw0KCX0NCglyZXR1cm4gJyc7DQp9DQoJDQo=')); 

Function Calls

base64_decode 1

Variables

None

Stats

MD5 348843e6ec5fc2feefb1966dca67c867
Eval Count 1
Decode Time 107 ms