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 /* This file is protected by copyright law and provided under license. Reverse engin..

Decoded Output download


require_once 'conn.php';
require_once 'license-functions.php';
$msg['code']	= 300;
$msg['msgs']	= 'Error: ';
$setup	= isset( $_POST['setup'] ) ?$_POST['setup'] : false;
$status	= $_POST['status'];
if ( $setup &&$status == 'offline') {
$msg['msgs']	= 'Error: System Offline';
echo json_encode( $msg );
return false;
}
if ( $setup &&$status == 'online') {
$key	= $_POST['key'];
$phone	= $_POST['phone'];
$mail	= $_POST['mail'];
$ssid	= getDeviceLabel();
$uri	= 'https://license.blinx.lk/setup.php?key='.$key .'&phone='.$phone .'&mail='.$mail .'&ssid='.$ssid;
$output	= file( $uri );
$json	= $output[0];
$json	= json_decode( $json,true );
if ( $json['code'] == 200 ) {
$cus_ID	= encrypt( $json['ccid'],$enc_key );
$xpDate	= encrypt( $json['kxpd'],$enc_key );
$sign	= encrypt( $ssid,$enc_key );
$actDt	= date( 'Y-m-d');
$synced	= time();
$sql = $link->prepare( "UPDATE exp_data SET customer_ID = ?, license_number = ?, storage_signature = ?, activation_date = ?, expired_date = ?, cust_phone = ?, cust_mail = ?, sync_stamp = ?");
$sql->bind_param( 'ssssssss',$cus_ID,$key,$sign,$actDt,$xpDate,$phone,$mail,$synced );
$sql->execute();
$msg['code']	= 200;
$msg['msgs']	= 'Success: Activation Complete';
}
else {
$msg['code']	= 300;
$msg['msgs']	= 'Error: Activation Failed';
}
echo json_encode( $msg );
return;
}
if ( !$setup &&$status == 'offline') {
$sql = $link->prepare( "SELECT * FROM exp_data");
$sql->execute();
$res = $sql->get_result();
if ( $res->num_rows == 0 ) {
$msg['msgs']	= 'Error: No License Key Exist';
}
else {
$row = $res->fetch_assoc();
$timestamp	= time();
$lik['syn'] = $row['sync_stamp'];
if ( $timestamp >$lik['syn'] +3600 ) {
$lik['sig'] = decrypt( $row['storage_signature'],$enc_key );
$lik['xpd'] = decrypt( $row['expired_date'],$enc_key );
$lik['xpd']	= strtotime( $lik['xpd'] );
$ssid		= getDeviceLabel();
$current	= strtotime( date( 'Y-m-d') );
if ( $ssid == $lik['sig'] ) {
if ( $lik['xpd'] >= $current ) {
$msg['code']	= 200;
$msg['msgs']	= 'Success: Valid License';
}
else {
$msg['msgs']	= 'Error: License Expired';
}
}
else {
$msg['msgs']	= 'Error: Invalid Device ID';
}
}
else {
$msg['code']	= 200;
$msg['msgs']	= 'Info: Ticker';
}
}
echo json_encode( $msg );
return false;
}
if ( !$setup &&$status == 'online') {
$sql = $link->prepare( "SELECT * FROM exp_data");
$sql->execute();
$res = $sql->get_result();
if ( $res->num_rows == 0 ) {
$msg['msgs']	= 'Error: No License Key Exist';
}
else {
$row = $res->fetch_assoc();
$timestamp	= time();
$lik['syn'] = $row['sync_stamp'];
if ( $timestamp >$lik['syn'] +3600 ) {
$lik['cid'] = decrypt( $row['customer_ID'],$enc_key );
$lik['key'] = $row['license_number'];
$lik['sig'] = decrypt( $row['storage_signature'],$enc_key );
$lik['xpd'] = decrypt( $row['expired_date'],$enc_key );
$lik['phn'] = $row['cust_phone'];
$lik['eml'] = $row['cust_mail'];
$lik['xpd']	= strtotime( $lik['xpd'] );
$ssid		= getDeviceLabel();
$current	= strtotime( date( 'Y-m-d') );
if ( $ssid == $lik['sig'] ) {
if ( $lik['xpd'] >= $current ) {
$uri	= 'https://license.blinx.lk/validate.php?key='.$lik['key'] .'&phone='.$lik['phn'] .'&mail='.$lik['eml'] .'&ssid='.$ssid .'&ccid='.$lik['cid'] .'&exp='.$lik['xpd'];
$output	= file( $uri );
$json	= $output[0];
$json	= json_decode( $json,true );
if ( $json['code'] == 200 ) {
$sql = $link->prepare( "UPDATE exp_data SET sync_stamp = ?");
$sql->bind_param( 's',$timestamp );
$sql->execute();
$msg['code']	= 200;
$msg['msgs']	= 'Success: Valid License';
}
else {
$msg['code']	= 300;
$msg['msgs']	= 'Success: Invalid License';
}
}
else {
$msg['msgs']	= 'Error: License Expired';
}
}
else {
$msg['msgs']	= 'Error: Invalid Device ID';
}
}
else {
$msg['code']	= 200;
$msg['msgs']	= 'Info: Ticker';
}
}
echo json_encode( $msg );
return false;
}
;

Did this file decode correctly?

Original Code

<?php /* This file is protected by copyright law and provided under license. Reverse engineering of this file is strictly prohibited. */$OOO000000=urldecode('%66%67%36%73%62%65%68%70%72%61%34%63%6f%5f%74%6e%64');$OOO0000O0=$OOO000000{4}.$OOO000000{9}.$OOO000000{3}.$OOO000000{5};$OOO0000O0.=$OOO000000{2}.$OOO000000{10}.$OOO000000{13}.$OOO000000{16};$OOO0000O0.=$OOO0000O0{3}.$OOO000000{11}.$OOO000000{12}.$OOO0000O0{7}.$OOO000000{5};$OOO000O00=$OOO000000{0}.$OOO000000{12}.$OOO000000{7}.$OOO000000{5}.$OOO000000{15};$O0O000O00=$OOO000000{0}.$OOO000000{1}.$OOO000000{5}.$OOO000000{14};$O0O000O0O=$O0O000O00.$OOO000000{11};$O0O000O00=$O0O000O00.$OOO000000{3};$O0O00OO00=$OOO000000{0}.$OOO000000{8}.$OOO000000{5}.$OOO000000{9}.$OOO000000{16};$OOO00000O=$OOO000000{3}.$OOO000000{14}.$OOO000000{8}.$OOO000000{14}.$OOO000000{8};$OOO0O0O00=__FILE__;$OO00O0000=0x1374;eval($OOO0000O0('JE8wMDBPME8wMD0kT09PMDAwTzAwKCRPT08wTzBPMDAsJ3JiJyk7JE8wTzAwT08wMCgkTzAwME8wTzAwLDB4NGZjKTskT08wME8wME8wPSRPT08wMDAwTzAoJE9PTzAwMDAwTygkTzBPMDBPTzAwKCRPMDAwTzBPMDAsMHgxN2MpLCdFbnRlcnlvdXdraFJIWUtOV09VVEFhQmJDY0RkRmZHZ0lpSmpMbE1tUHBRcVNzVnZYeFp6MDEyMzQ1Njc4OSsvPScsJ0FCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5Ky8nKSk7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B54RMxqR3cidolLCbOlRmnPFe9qcbL9kZ4LdolqBZfqcbLmbUEVkZcXDo9VcT0mRJOSDBsdk3nPdJffwt4mkM1iDBX9kZ4LdolqBZfldBXmbUEVkZczF2lLNUFVkuYzDBWIRJFMC2Ypce0mRJOSDBsdk2Ypctffwt4mkMa4Fe0mRJOSDBsdk3iXctffKXPLd3a0Fua0tT0IcMlScUIIkuaZDUEpKXPLDmYvdIL9wtOvfbOXfbOdHy07tJOQF29VtT0IDmYvdl9LcBYvcoAPwtOQF29VRuOZfBAIhTShDBCIhtELDmYvdlSmC29LcUffwe09wewXHtEpwuShkuYxdtE9wtOSDB5qRT5XFMaXCbklhtEJaanrWaOywoa4Fy9LCbOiwyYyatnzGB5jb3Y0CB1Xwe0INZwpKXPLF3ySRT5JDB5Lb3niFMyshtEmFZFSkuOpdBazfoysFtEpKXPLF3ySRT5lGoajfbOlhtL7tJOsF2fdk2YvcoAmbWL9wewXHeShko1zc1SmdbYmFZfftT0Ik1Y1C2YlF3H6wycidolLwrxpC2aVF2AmKXp9tMaSF2AIGXPLdbYmBZfjd2Olk10kNUEzHeE7tJOsF2fdk21zc3HmbWL9wtfTfBYjcbYzKJnkdmcidolLwrxpC2aVF2AmKXp9tm0hcBxzcUn7tJOsF2fdk21zc3HmbWL9wtfyFmkvFjPIToljcB5zcUnyGunpFMaLkzShgWp9tMaSF2AIGXPLdbYmBZfsF2fzk10kNUEmObkZd3w6wrlVfMySDBWIOoa2DBYlwrlrkzShgWp9tMaSF2AIGXPLdbYmBZfjd2Olk10kNUEZHeE7tJOsF2fdk21zc3HmbWL9wtfkdMcvKJnADBYqcbwmKXp9tm0hcBYPdZnQF29Vb2aVC29LcUIIko1zcZEpKXpZcbO1FM4IcMySF2A7tm0hKX==bQ]aK_ZpJYByr]Il@~EY

Function Calls

fopen 1
fread 3
strtr 2
fclose 1
urldecode 1
str_replace 1
base64_decode 3

Variables

$O000O0O00 True
$O0O000O00 fgets
$O0O000O0O fgetc
$O0O00OO00 fread
$OO00O0000 4980
$OO00O00O0 require_once 'conn.php'; require_once 'license-functions.ph..
$OOO000000 fg6sbehpra4co_tnd
$OOO00000O strtr
$OOO0000O0 base64_decode
$OOO000O00 fopen
$OOO0O0O00 index.php

Stats

MD5 8e07954bc138563688808a1e22fb654e
Eval Count 3
Decode Time 102 ms