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 goto Cqoo7; Z754M: $system = mysqli_query($conn, "\123\105\x4c\105\x43\x54\40\x2a\..
Decoded Output download
<?php
goto Cqoo7; Z754M: $system = mysqli_query($conn, "SELECT * FROM `system`")->fetch_assoc(); goto uYjRN; RfgfH: include "db_conn.php"; goto c5qGE; crad2: $mtik = mysqli_query($conn, "SELECT * FROM `administrator`")->fetch_assoc(); goto IP75g; aC17r: $mt_pass = $mtik["password"]; goto iR35y; eugZf: date_default_timezone_set("Asia/Manila"); goto RfgfH; mGa22: $API->debug = false; goto Vu8CA; iR35y: $API = new RouterosAPI(); goto mGa22; miZiC: $system_mac = $system["mac_address"]; goto crad2; Vu8CA: $API->connect($mt_ip, $mt_user, decrypt($mt_pass)); goto arZU_; IP75g: $kitifi_token = $mtik["kitifi_token"]; goto l209d; Cqoo7: header("Content-Type:application/json"); goto eugZf; l209d: $kitifi_version = $mtik["version"]; goto HvVZ3; c5qGE: include "kitifi.php"; goto gcY8q; HvVZ3: $mt_user = $mtik["username"]; goto aC17r; arZU_: $count = 0; goto vsCdD; uYjRN: $mt_ip = $system["gateway"]; goto miZiC; gcY8q: include "routeros_api.class.php"; goto Z754M; vsCdD: while (true) { if ($API->connected) { $count = $count + 1; if ($count > 6) { die; } $resources = $API->comm("/system/resource/print")[0]; $identity = $API->comm("/system/identity/print")[0]["name"]; $router_id = $API->comm("/system/license/print")[0]["software-id"]; $mt_version = $resources["version"]; $board_name = $resources["board-name"]; if ($router_id === '') { $router_id = $API->comm("/system/license/print")[0]["system-id"]; } $params = array("architecture" => $resources["architecture-name"], "router_id" => $router_id, "alias" => $identity, "router_os" => $mt_version, "board" => $board_name, "last_seen_online" => date("m/d/y h:i:s a"), "token" => $kitifi_token, "version" => $kitifi_version, "mac" => $system_mac, "action" => "router"); $url = "https://api.kitifi.com"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $headers = array("Content-Type" => "application/json"); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); $response = json_decode(curl_exec($ch)); curl_close($ch); if ($response->status === "activated") { mysqli_query($conn, "UPDATE `administrator` SET `status`='2',`expiration`='{$response->expiration}',`license`='{$response->license}',`owner`='{$response->owner}',`contact`='{$response->contact}',`credits`='{$response->credits}',`update_message`='{$response->logs}',`update_status`='{$response->update_status}'"); } elseif ($response->status === "trial") { mysqli_query($conn, "UPDATE `administrator` SET `status`='1',`expiration`='{$response->expiration}',`license`='',`credits`='1'"); } elseif ($response->status === "expired") { mysqli_query($conn, "UPDATE `administrator` SET `status`='0'"); } sleep(10); } else { sleep(10); die; } } ?>
Did this file decode correctly?
Original Code
<?php
goto Cqoo7; Z754M: $system = mysqli_query($conn, "\123\105\x4c\105\x43\x54\40\x2a\40\106\122\x4f\x4d\40\140\x73\x79\163\x74\x65\x6d\x60")->fetch_assoc(); goto uYjRN; RfgfH: include "\144\142\137\143\157\x6e\156\56\160\x68\x70"; goto c5qGE; crad2: $mtik = mysqli_query($conn, "\x53\105\114\105\103\x54\x20\x2a\40\x46\122\x4f\115\40\x60\x61\144\155\151\x6e\151\163\x74\x72\x61\164\157\162\140")->fetch_assoc(); goto IP75g; aC17r: $mt_pass = $mtik["\160\141\x73\163\x77\x6f\162\x64"]; goto iR35y; eugZf: date_default_timezone_set("\101\163\x69\x61\x2f\115\x61\156\151\x6c\x61"); goto RfgfH; mGa22: $API->debug = false; goto Vu8CA; iR35y: $API = new RouterosAPI(); goto mGa22; miZiC: $system_mac = $system["\x6d\141\143\137\x61\x64\x64\x72\145\x73\x73"]; goto crad2; Vu8CA: $API->connect($mt_ip, $mt_user, decrypt($mt_pass)); goto arZU_; IP75g: $kitifi_token = $mtik["\153\151\x74\x69\x66\x69\x5f\x74\157\153\x65\x6e"]; goto l209d; Cqoo7: header("\103\157\x6e\x74\145\156\x74\55\124\x79\160\x65\x3a\141\x70\160\x6c\151\x63\141\164\151\157\156\x2f\152\163\157\x6e"); goto eugZf; l209d: $kitifi_version = $mtik["\x76\x65\162\x73\151\x6f\x6e"]; goto HvVZ3; c5qGE: include "\x6b\151\164\151\x66\151\56\x70\x68\x70"; goto gcY8q; HvVZ3: $mt_user = $mtik["\165\x73\145\162\x6e\x61\x6d\x65"]; goto aC17r; arZU_: $count = 0; goto vsCdD; uYjRN: $mt_ip = $system["\x67\x61\x74\x65\167\141\x79"]; goto miZiC; gcY8q: include "\x72\x6f\x75\x74\145\x72\157\163\x5f\x61\160\151\x2e\143\x6c\141\163\x73\56\x70\x68\160"; goto Z754M; vsCdD: while (true) { if ($API->connected) { $count = $count + 1; if ($count > 6) { die; } $resources = $API->comm("\x2f\163\x79\x73\x74\x65\x6d\57\162\145\163\157\165\162\143\x65\x2f\160\162\151\156\x74")[0]; $identity = $API->comm("\x2f\x73\x79\x73\164\145\155\57\x69\x64\145\156\164\151\x74\x79\57\160\162\151\x6e\x74")[0]["\156\141\155\145"]; $router_id = $API->comm("\57\163\x79\163\x74\x65\x6d\x2f\154\x69\x63\145\156\x73\145\x2f\160\162\x69\x6e\x74")[0]["\163\x6f\x66\164\167\x61\x72\x65\55\151\x64"]; $mt_version = $resources["\x76\145\x72\163\151\x6f\x6e"]; $board_name = $resources["\x62\x6f\141\x72\x64\55\x6e\141\x6d\145"]; if ($router_id === '') { $router_id = $API->comm("\57\163\171\163\x74\x65\155\57\154\x69\x63\145\x6e\x73\x65\57\x70\x72\x69\x6e\x74")[0]["\x73\x79\163\x74\145\155\55\151\x64"]; } $params = array("\141\x72\143\x68\151\164\145\x63\x74\x75\x72\145" => $resources["\141\162\x63\x68\151\x74\145\143\164\165\x72\145\55\156\141\155\145"], "\162\x6f\x75\164\145\162\x5f\151\144" => $router_id, "\141\x6c\151\x61\x73" => $identity, "\x72\157\165\x74\x65\x72\137\x6f\163" => $mt_version, "\x62\x6f\141\162\144" => $board_name, "\154\x61\163\164\x5f\163\145\x65\156\137\x6f\x6e\154\x69\156\x65" => date("\155\57\144\x2f\171\x20\x68\72\151\72\163\x20\x61"), "\164\157\153\x65\156" => $kitifi_token, "\x76\x65\x72\x73\151\157\x6e" => $kitifi_version, "\x6d\x61\143" => $system_mac, "\x61\143\x74\151\x6f\x6e" => "\162\x6f\x75\164\145\x72"); $url = "\150\164\164\160\x73\72\57\x2f\x61\160\x69\x2e\x6b\x69\164\151\x66\151\56\x63\x6f\x6d"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $headers = array("\x43\x6f\x6e\x74\145\156\x74\x2d\124\x79\160\145" => "\141\160\160\x6c\151\143\x61\164\x69\x6f\156\x2f\152\163\157\x6e"); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); $response = json_decode(curl_exec($ch)); curl_close($ch); if ($response->status === "\x61\x63\x74\151\166\x61\164\145\x64") { mysqli_query($conn, "\125\120\104\101\x54\105\x20\x60\141\144\x6d\151\x6e\x69\163\x74\x72\141\164\x6f\162\140\40\123\105\124\x20\x60\x73\x74\141\x74\x75\163\x60\75\47\62\x27\x2c\x60\145\170\160\x69\x72\x61\x74\151\x6f\x6e\140\75\47{$response->expiration}\47\54\x60\x6c\x69\x63\x65\156\163\145\x60\75\47{$response->license}\x27\54\x60\157\167\x6e\145\x72\x60\75\x27{$response->owner}\x27\x2c\x60\143\x6f\x6e\164\x61\143\164\x60\x3d\x27{$response->contact}\x27\54\x60\143\162\x65\144\x69\164\163\140\x3d\47{$response->credits}\47\54\x60\165\160\x64\141\164\145\137\155\145\x73\163\x61\147\x65\140\75\x27{$response->logs}\x27\54\x60\165\x70\144\141\164\x65\x5f\x73\164\141\164\165\x73\x60\75\x27{$response->update_status}\47"); } elseif ($response->status === "\x74\x72\151\141\x6c") { mysqli_query($conn, "\125\120\104\x41\x54\105\x20\140\x61\x64\x6d\x69\x6e\x69\x73\164\162\141\x74\157\162\x60\40\123\x45\x54\40\140\163\164\x61\164\x75\163\140\x3d\47\61\47\54\140\x65\x78\160\x69\162\141\x74\151\157\156\x60\75\47{$response->expiration}\47\x2c\140\x6c\151\x63\145\x6e\x73\145\x60\x3d\x27\47\54\140\x63\162\x65\x64\151\164\x73\x60\x3d\x27\61\x27"); } elseif ($response->status === "\145\170\160\x69\162\x65\144") { mysqli_query($conn, "\x55\x50\x44\x41\x54\105\40\140\x61\x64\x6d\151\156\151\163\x74\x72\141\x74\x6f\162\x60\40\123\x45\124\x20\x60\163\x74\x61\164\x75\163\140\75\47\x30\x27"); } sleep(10); } else { sleep(10); die; } }
Function Calls
None |
Stats
MD5 | 72ce2134fac0238dbc334a3a412cadba |
Eval Count | 0 |
Decode Time | 55 ms |