Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

function aplParseServerNotifications($content_array, $ROOT_URL, $CLIENT_EMAIL, $LICENSE_CO..

Decoded Output download

<?  function aplParseServerNotifications($content_array, $ROOT_URL, $CLIENT_EMAIL, $LICENSE_CODE, $product = Null) 
{ 
  $notifications_array = array(); 
  if (!empty($content_array)) { 
    goto PJKqa; 
  } 
  $notifications_array["notification_case"] = "notification_no_connection"; 
  $notifications_array["notification_text"] = APL_NOTIFICATION_NO_CONNECTION; 
  goto K3rss; 
  PJKqa: 
  if (!empty($content_array["headers"]["notification_server_signature"]) && aplVerifyServerSignature($content_array["headers"]["notification_server_signature"], $ROOT_URL, $CLIENT_EMAIL, $LICENSE_CODE, $product)) { 
    goto iFg3n; 
  } 
  $notifications_array["notification_case"] = "notification_invalid_response"; 
  $notifications_array["notification_text"] = APL_NOTIFICATION_INVALID_RESPONSE; 
  goto w1rqy; 
  iFg3n: 
  $notifications_array["notification_case"] = $content_array["headers"]["notification_case"]; 
  $notifications_array["notification_text"] = $content_array["headers"]["notification_text"]; 
  if (empty($content_array["headers"]["notification_data"])) { 
    goto tDWxV; 
  } 
  $notifications_array["notification_data"] = json_decode($content_array["headers"]["notification_data"], true); 
  tDWxV: 
  w1rqy: 
  K3rss: 
  return $notifications_array; 
} 
function aplGenerateScriptSignature($ROOT_URL, $CLIENT_EMAIL, $LICENSE_CODE, $product = Null) 
{ 
  $script_signature = null; 
  $root_ips_array = gethostbynamel(aplGetRawDomain(APL_ROOT_URL)); 
  $product = $product == Null ? APL_PRODUCT_ID : $product; 
  if (!(!empty($ROOT_URL) && isset($CLIENT_EMAIL) && isset($LICENSE_CODE) && !empty($root_ips_array))) { 
    goto ZigdF; 
  } 
  $script_signature = hash("sha256", gmdate("Y-m-d") . $ROOT_URL . $CLIENT_EMAIL . $LICENSE_CODE . $product . implode('', $root_ips_array)); 
  ZigdF: 
  return $script_signature; 
} 
function aplVerifyServerSignature($notification_server_signature, $ROOT_URL, $CLIENT_EMAIL, $LICENSE_CODE, $product = Null) 
{ 
  $result = false; 
  $root_ips_array = gethostbynamel(aplGetRawDomain(APL_ROOT_URL)); 
  $product = $product == Null ? APL_PRODUCT_ID : $product; 
  if (!(!empty($notification_server_signature) && !empty($ROOT_URL) && isset($CLIENT_EMAIL) && isset($LICENSE_CODE) && !empty($root_ips_array))) { 
    goto XdoQS; 
  } 
  if (!(hash("sha256", implode('', $root_ips_array) . $product . $LICENSE_CODE . $CLIENT_EMAIL . $ROOT_URL . gmdate("Y-m-d")) == $notification_server_signature)) { 
    goto o2FTr; 
  } 
  $result = true; 
  o2FTr: 
  XdoQS: 
  return $result; 
} 
function aplCheckSettings() 
{ 
  $notifications_array = array(); 
  if (!(empty(APL_SALT) || APL_SALT == "some_random_text")) { 
    goto UdGjC; 
  } 
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_SALT; 
  UdGjC: 
  if (!(!filter_var(APL_ROOT_URL, FILTER_VALIDATE_URL) || !ctype_alnum(substr(APL_ROOT_URL, -1)))) { 
    goto vr9B9; 
  } 
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_ROOT_URL; 
  vr9B9: 
  if (filter_var(APL_PRODUCT_ID, FILTER_VALIDATE_INT)) { 
    goto tDa0v; 
  } 
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_PRODUCT_ID; 
  tDa0v: 
  if (aplValidateIntegerValue(APL_DAYS, 1, 365)) { 
    goto w7GHL; 
  } 
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_VERIFICATION_PERIOD; 
  w7GHL: 
  if (!(APL_STORAGE != "DATABASE" && APL_STORAGE != "FILE")) { 
    goto CbbqI; 
  } 
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_STORAGE; 
  CbbqI: 
  if (!(APL_STORAGE == "DATABASE" && !ctype_alnum(str_ireplace(array("_"), '', APL_DATABASE_TABLE)))) { 
    goto vddfq; 
  } 
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_TABLE; 
  vddfq: 
  if (!(APL_STORAGE == "FILE" && !@is_writable(APL_DIRECTORY . "/" . APL_LICENSE_FILE_LOCATION))) { 
    goto xMvlS; 
  } 
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_LICENSE_FILE; 
  xMvlS: 
  if (!(!empty(APL_ROOT_IP) && !filter_var(APL_ROOT_IP, FILTER_VALIDATE_IP))) { 
    goto niVur; 
  } 
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_ROOT_IP; 
  niVur: 
  if (!(!empty(APL_ROOT_IP) && !in_array(APL_ROOT_IP, gethostbynamel(aplGetRawDomain(APL_ROOT_URL))))) { 
    goto Zpxnn; 
  } 
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_DNS; 
  Zpxnn: 
  if (!(defined("APL_ROOT_NAMESERVERS") && !empty(APL_ROOT_NAMESERVERS))) { 
    goto TebkM; 
  } 
  foreach (APL_ROOT_NAMESERVERS as $nameserver) { 
    if (aplValidateRawDomain($nameserver)) { 
      goto TkBFA; 
    } 
    $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_ROOT_NAMESERVERS; 
    goto G2PV0; 
    TkBFA: 
    OAX5C: 
  } 
  G2PV0: 
  TebkM: 
  if (!(defined("APL_ROOT_NAMESERVERS") && !empty(APL_ROOT_NAMESERVERS))) { 
    goto bClUZ; 
  } 
  $apl_root_nameservers_array = APL_ROOT_NAMESERVERS; 
  $fetched_nameservers_array = array(); 
  $dns_records_array = dns_get_record(aplGetRawDomain(APL_ROOT_URL), DNS_NS); 
  foreach ($dns_records_array as $record) { 
    $fetched_nameservers_array[] = $record["target"]; 
    LT3qw: 
  } 
  ERSc1: 
  $apl_root_nameservers_array = array_map("strtolower", $apl_root_nameservers_array); 
  $fetched_nameservers_array = array_map("strtolower", $fetched_nameservers_array); 
  sort($apl_root_nameservers_array); 
  sort($fetched_nameservers_array); 
  if (!($apl_root_nameservers_array != $fetched_nameservers_array)) { 
    goto fJCs9; 
  } 
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_DNS; 
  fJCs9: 
  bClUZ: 
  return $notifications_array; 
} ?>

Did this file decode correctly?

Original Code

function aplParseServerNotifications($content_array, $ROOT_URL, $CLIENT_EMAIL, $LICENSE_CODE, $product = Null)
{
  $notifications_array = array();
  if (!empty($content_array)) {
    goto PJKqa;
  }
  $notifications_array["\x6e\157\x74\151\146\x69\143\141\164\151\157\x6e\137\143\x61\163\145"] = "\x6e\157\164\x69\x66\151\143\x61\164\x69\x6f\x6e\137\156\157\x5f\143\x6f\156\156\145\x63\x74\151\x6f\x6e";
  $notifications_array["\x6e\x6f\x74\x69\x66\x69\143\141\164\151\157\156\137\x74\145\170\164"] = APL_NOTIFICATION_NO_CONNECTION;
  goto K3rss;
  PJKqa:
  if (!empty($content_array["\150\x65\x61\144\x65\162\163"]["\x6e\157\x74\x69\146\x69\143\141\x74\x69\x6f\x6e\137\163\x65\x72\x76\145\x72\137\x73\151\x67\156\141\x74\x75\x72\145"]) && aplVerifyServerSignature($content_array["\x68\x65\x61\x64\145\162\x73"]["\x6e\157\164\x69\146\151\143\141\x74\151\x6f\156\x5f\x73\145\x72\x76\145\x72\x5f\x73\x69\x67\156\x61\164\165\x72\x65"], $ROOT_URL, $CLIENT_EMAIL, $LICENSE_CODE, $product)) {
    goto iFg3n;
  }
  $notifications_array["\156\157\x74\151\x66\x69\143\141\x74\151\157\156\x5f\143\141\163\145"] = "\156\x6f\164\x69\146\x69\143\141\x74\x69\x6f\x6e\x5f\x69\x6e\x76\x61\x6c\151\x64\137\x72\x65\x73\x70\x6f\x6e\x73\145";
  $notifications_array["\x6e\157\x74\x69\146\x69\143\141\x74\151\x6f\156\137\x74\145\x78\164"] = APL_NOTIFICATION_INVALID_RESPONSE;
  goto w1rqy;
  iFg3n:
  $notifications_array["\x6e\157\x74\x69\146\x69\x63\x61\x74\151\157\x6e\137\143\x61\x73\145"] = $content_array["\x68\x65\x61\x64\145\x72\163"]["\x6e\157\164\151\x66\151\143\x61\x74\151\157\x6e\x5f\143\141\x73\145"];
  $notifications_array["\156\157\164\151\x66\151\x63\141\164\x69\157\x6e\x5f\164\x65\170\164"] = $content_array["\150\x65\141\x64\145\x72\163"]["\156\x6f\164\x69\x66\x69\x63\x61\164\x69\x6f\x6e\137\164\x65\x78\x74"];
  if (empty($content_array["\150\x65\141\144\x65\x72\163"]["\x6e\x6f\x74\x69\146\x69\143\x61\164\x69\157\156\137\x64\141\x74\141"])) {
    goto tDWxV;
  }
  $notifications_array["\156\157\x74\151\x66\151\x63\141\164\151\157\156\x5f\x64\141\164\x61"] = json_decode($content_array["\x68\x65\141\144\145\162\163"]["\156\x6f\164\x69\x66\151\x63\141\164\x69\157\156\137\144\x61\x74\141"], true);
  tDWxV:
  w1rqy:
  K3rss:
  return $notifications_array;
}
function aplGenerateScriptSignature($ROOT_URL, $CLIENT_EMAIL, $LICENSE_CODE, $product = Null)
{
  $script_signature = null;
  $root_ips_array = gethostbynamel(aplGetRawDomain(APL_ROOT_URL));
  $product = $product == Null ? APL_PRODUCT_ID : $product;
  if (!(!empty($ROOT_URL) && isset($CLIENT_EMAIL) && isset($LICENSE_CODE) && !empty($root_ips_array))) {
    goto ZigdF;
  }
  $script_signature = hash("\163\x68\x61\62\x35\66", gmdate("\131\x2d\x6d\x2d\144") . $ROOT_URL . $CLIENT_EMAIL . $LICENSE_CODE . $product . implode('', $root_ips_array));
  ZigdF:
  return $script_signature;
}
function aplVerifyServerSignature($notification_server_signature, $ROOT_URL, $CLIENT_EMAIL, $LICENSE_CODE, $product = Null)
{
  $result = false;
  $root_ips_array = gethostbynamel(aplGetRawDomain(APL_ROOT_URL));
  $product = $product == Null ? APL_PRODUCT_ID : $product;
  if (!(!empty($notification_server_signature) && !empty($ROOT_URL) && isset($CLIENT_EMAIL) && isset($LICENSE_CODE) && !empty($root_ips_array))) {
    goto XdoQS;
  }
  if (!(hash("\163\x68\x61\62\x35\66", implode('', $root_ips_array) . $product . $LICENSE_CODE . $CLIENT_EMAIL . $ROOT_URL . gmdate("\131\55\155\55\x64")) == $notification_server_signature)) {
    goto o2FTr;
  }
  $result = true;
  o2FTr:
  XdoQS:
  return $result;
}
function aplCheckSettings()
{
  $notifications_array = array();
  if (!(empty(APL_SALT) || APL_SALT == "\x73\157\155\145\137\162\141\156\x64\x6f\155\x5f\x74\x65\x78\164")) {
    goto UdGjC;
  }
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_SALT;
  UdGjC:
  if (!(!filter_var(APL_ROOT_URL, FILTER_VALIDATE_URL) || !ctype_alnum(substr(APL_ROOT_URL, -1)))) {
    goto vr9B9;
  }
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_ROOT_URL;
  vr9B9:
  if (filter_var(APL_PRODUCT_ID, FILTER_VALIDATE_INT)) {
    goto tDa0v;
  }
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_PRODUCT_ID;
  tDa0v:
  if (aplValidateIntegerValue(APL_DAYS, 1, 365)) {
    goto w7GHL;
  }
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_VERIFICATION_PERIOD;
  w7GHL:
  if (!(APL_STORAGE != "\104\101\124\x41\102\x41\x53\105" && APL_STORAGE != "\x46\111\114\x45")) {
    goto CbbqI;
  }
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_STORAGE;
  CbbqI:
  if (!(APL_STORAGE == "\104\x41\124\x41\102\101\x53\105" && !ctype_alnum(str_ireplace(array("\137"), '', APL_DATABASE_TABLE)))) {
    goto vddfq;
  }
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_TABLE;
  vddfq:
  if (!(APL_STORAGE == "\x46\111\x4c\x45" && !@is_writable(APL_DIRECTORY . "\57" . APL_LICENSE_FILE_LOCATION))) {
    goto xMvlS;
  }
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_LICENSE_FILE;
  xMvlS:
  if (!(!empty(APL_ROOT_IP) && !filter_var(APL_ROOT_IP, FILTER_VALIDATE_IP))) {
    goto niVur;
  }
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_ROOT_IP;
  niVur:
  if (!(!empty(APL_ROOT_IP) && !in_array(APL_ROOT_IP, gethostbynamel(aplGetRawDomain(APL_ROOT_URL))))) {
    goto Zpxnn;
  }
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_DNS;
  Zpxnn:
  if (!(defined("\x41\120\114\x5f\x52\117\117\124\137\116\x41\115\x45\x53\x45\x52\x56\x45\x52\123") && !empty(APL_ROOT_NAMESERVERS))) {
    goto TebkM;
  }
  foreach (APL_ROOT_NAMESERVERS as $nameserver) {
    if (aplValidateRawDomain($nameserver)) {
      goto TkBFA;
    }
    $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_ROOT_NAMESERVERS;
    goto G2PV0;
    TkBFA:
    OAX5C:
  }
  G2PV0:
  TebkM:
  if (!(defined("\101\x50\x4c\x5f\x52\x4f\x4f\x54\137\116\x41\115\x45\x53\105\122\126\x45\122\x53") && !empty(APL_ROOT_NAMESERVERS))) {
    goto bClUZ;
  }
  $apl_root_nameservers_array = APL_ROOT_NAMESERVERS;
  $fetched_nameservers_array = array();
  $dns_records_array = dns_get_record(aplGetRawDomain(APL_ROOT_URL), DNS_NS);
  foreach ($dns_records_array as $record) {
    $fetched_nameservers_array[] = $record["\164\141\162\x67\x65\164"];
    LT3qw:
  }
  ERSc1:
  $apl_root_nameservers_array = array_map("\x73\x74\x72\x74\x6f\154\157\167\x65\x72", $apl_root_nameservers_array);
  $fetched_nameservers_array = array_map("\163\x74\x72\x74\x6f\x6c\x6f\x77\x65\x72", $fetched_nameservers_array);
  sort($apl_root_nameservers_array);
  sort($fetched_nameservers_array);
  if (!($apl_root_nameservers_array != $fetched_nameservers_array)) {
    goto fJCs9;
  }
  $notifications_array[] = APL_CORE_NOTIFICATION_INVALID_DNS;
  fJCs9:
  bClUZ:
  return $notifications_array;
}

Function Calls

None

Variables

None

Stats

MD5 c1ec4e0b2afacf901c3af19ab3d29a58
Eval Count 0
Decode Time 56 ms