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("PD9waHANCmlmICghZnVuY3Rpb25fZXhpc3RzKCdjdXJsX3ZlcnNpb24nKSk..
Decoded Output download
?>b'<?php
if (!function_exists(\'curl_version\')) {
echo \'Please enable curl on server!\';
exit;
}
if (SESSION_START==TRUE) {
session_start();
}
date_default_timezone_set(\'UTC\');
DEFINE("ERROR_WORD", "<b>Varsaylan grnm dosyalarn bulamyorum!</b><br/>Varsaylan index dosya ismi: <b>".DEFAULT_INDEX."</b><br/>Varsaylan 404 hata dosya ismi: <b>".ERROR_PAGE."</b>");
header(\'Content-Type: text/html; charset=utf-8\');
require_once("class/pdo.class.php");
require_once("class/wmvsmtp.class.php");
ini_set(\'display_errors\', SHOW_PHP_ERRORS);
ini_set(\'display_startup_errors\', SHOW_PHP_ERRORS);
error_reporting(SHOW_PHP_ERRORS);
if (SHOW_PHP_ERRORS==-1) {
set_error_handler("exception_error_handler");
}
if (DB_HOST!==""){
$db=new wmvpdo(DB_HOST, DB_USER, DB_PASS, DB_NAME, DB_PERFIX);
}
if (SMTP_HOST!==""){
$mail=new wmvsmtp(SMTP_HOST, SMTP_USERNAME, SMTP_PASSWORD, SMTP_SECURE, SMTP_PORT, SMTP_SITENAME, SMTP_DEBUG);
}
function base_url($adress=""){
$adress=ltrim($adress, \'/\');
if (SITE_URL == "") {
return rtrim(url(), \'/\').\'/\'.$adress;
}else {
return rtrim(SITE_URL, \'/\').\'/\'.$adress;
}
}
function this_url($withoutget=FALSE){
$request=$withoutget==FALSE?$_SERVER[\'REQUEST_URI\']:$_SERVER[\'PATH_INFO\'];
if (SITE_URL == "") {
$siteurl=rtrim(url(), \'/\');
}else {
$siteurl=trim(SITE_URL, \'/\');
}
return $siteurl.$request;
}
function dist_url($dist=""){
$dist=ltrim($dist, \'/\');
return base_url(rtrim(DIST_FOLDER, \'/\')).\'/\'.$dist;
}
function action_url($data=array()){
$query=http_build_query($data);
$query_action=base_url(\'wmv_core/action.php?\').$query;
return rtrim($query_action, \'?\');
}
function upload_url($upload=""){
$upload=ltrim($upload, \'/\');
return base_url(rtrim(UPLOAD_FOLDER, \'/\')).\'/\'.$upload;
}
function upload_dir($filename=""){
$fullpath=str_replace(trim(" \ "), "/", dirname(__DIR__));
return $fullpath.\'/\'.trim(UPLOAD_FOLDER, "/")."/".$filename;
}
function url(){
return sprintf(
"%s://%s",
isset($_SERVER[\'HTTPS\']) && $_SERVER[\'HTTPS\'] != \'off\' ? \'https\' : \'http\',
$_SERVER[\'SERVER_NAME\']
);
}
function exception_error_handler($errno, $errstr, $errfile, $errline ) {
throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
}
function validate_username($str="")
{
$allowed = array(".", "-", "_"); // you can add here more value, you want to allow.
if(ctype_alnum(str_replace($allowed, \'\', $str ))) {
return $str;
} else {
return FALSE;
}
}
function wmv_activate($site_id="", $key="") {
if (!empty($_SERVER[\'HTTP_CLIENT_IP\'])) {
$user_ip = $_SERVER[\'HTTP_CLIENT_IP\'];
} elseif (!empty($_SERVER[\'HTTP_X_FORWARDED_FOR\'])) {
$user_ip = $_SERVER[\'HTTP_X_FORWARDED_FOR\'];
} else {
$user_ip = $_SERVER[\'REMOTE_ADDR\'];
}
$url = \'https://license.webmavie.org/api.php\';
$ch = curl_init($url);
$data = array(
\'route\' => \'lisence_controller\',
\'script_name\' => \'coinwin\',
\'id\' => $site_id,
\'key\' => $key,
\'site_url\' => str_replace("www.", "", $_SERVER[\'SERVER_NAME\']),
\'server_ip\' => $_SERVER[\'SERVER_ADDR\'],
\'user_ip\' => $user_ip,
\'server_date\' => DATE(\'d-m-Y H:i\'),
);
$payload = json_encode($data);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(\'Content-Type:application/json\'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
$result=json_decode($result);
if ($result->status == 0) {
echo \'<!DOCTYPE html><html><head><title>Hata!</title><style>body{color:#F0F000;}.content{border: 2px solid #6afc91; background-color: #fc8f6a; padding:50px; width: 700px; margin: auto;}.bigtext{display: flex; /* or inline-flex */ align-items: center; justify-content: center; font-size: 2em; font-weight: bold; padding:10px;}.right{float: right;}</style></head><body><div class="content"><div class="bigtext">WARNING!</div><center><b style="color:#FFF;"> License code not confirmed</b><hr/><b style="color:#FFF;">\'.$result->response.\'</b></center><br/><hr/> <div class="right"> Software developer email:<br/> <b style="color:#FFF;">\'.$result->contact_email.\'</b> </div><div class="left"> Request code:<br/> <b style="color:#FFF;">\'.$result->request_code.\'</b> </div></div></body></html>\';
exit;
}
}
wmv_activate(LICENSE_SITE_ID, LICENSE_KEY);
?>'
Did this file decode correctly?
Original Code
<?php eval("?>".base64_decode("PD9waHANCmlmICghZnVuY3Rpb25fZXhpc3RzKCdjdXJsX3ZlcnNpb24nKSkgew0KICAgIGVjaG8gJ1BsZWFzZSBlbmFibGUgY3VybCBvbiBzZXJ2ZXIhJzsNCiAgICBleGl0Ow0KfQ0KaWYgKFNFU1NJT05fU1RBUlQ9PVRSVUUpIHsNCiAgICBzZXNzaW9uX3N0YXJ0KCk7DQp9DQpkYXRlX2RlZmF1bHRfdGltZXpvbmVfc2V0KCdVVEMnKTsNCkRFRklORSgiRVJST1JfV09SRCIsICI8Yj5WYXJzYXnEsWxhbiBnw7Zyw7xuw7xtIGRvc3lhbGFyxLFuxLEgYnVsYW3EsXlvcnVtITwvYj48YnIvPlZhcnNhecSxbGFuIGluZGV4IGRvc3lhIGlzbWk6IDxiPiIuREVGQVVMVF9JTkRFWC4iPC9iPjxici8+VmFyc2F5xLFsYW4gNDA0IGhhdGEgZG9zeWEgaXNtaTogPGI+Ii5FUlJPUl9QQUdFLiI8L2I+Iik7DQoNCmhlYWRlcignQ29udGVudC1UeXBlOiB0ZXh0L2h0bWw7IGNoYXJzZXQ9dXRmLTgnKTsNCg0KcmVxdWlyZV9vbm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