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 Exlvc; KDwz2: function get_crm_data_arr($json_text) { $data = json_decode($js..

Decoded Output download

<?php 
 goto Exlvc; KDwz2: function get_crm_data_arr($json_text) { $data = json_decode($json_text, true); if (empty($data)) { throw new Exception(base64_decode("d3JvbmcganNvbiBmb3JtYXQ=")); } if (!is_array($data)) { throw new Exception(base64_decode("anNvbiBkYXRhIG5lZWRzIHRvIGJlIGFuIGFycmF5")); } foreach ($data as $index => $row) { $field_checklist = array(array(base64_decode("bmFtZQ==") => base64_decode("bWVtYmVyX2lk"), base64_decode("dHlwZQ==") => base64_decode("c3RyaW5n")), array(base64_decode("bmFtZQ==") => base64_decode("cGhvbmVfbnVtYmVy"), base64_decode("dHlwZQ==") => base64_decode("c3RyaW5n")), array(base64_decode("bmFtZQ==") => base64_decode("ZW1haWw="), base64_decode("dHlwZQ==") => base64_decode("c3RyaW5n")), array(base64_decode("bmFtZQ==") => base64_decode("Z2VuZGVy"), base64_decode("dHlwZQ==") => base64_decode("c3RyaW5n")), array(base64_decode("bmFtZQ==") => base64_decode("YmlydGhkYXk="), base64_decode("dHlwZQ==") => base64_decode("c3RyaW5n")), array(base64_decode("bmFtZQ==") => base64_decode("Y291bnRyeQ=="), base64_decode("dHlwZQ==") => base64_decode("c3RyaW5n")), array(base64_decode("bmFtZQ==") => base64_decode("Y2l0eQ=="), base64_decode("dHlwZQ==") => base64_decode("c3RyaW5n")), array(base64_decode("bmFtZQ==") => base64_decode("cmVnaW9u"), base64_decode("dHlwZQ==") => base64_decode("c3RyaW5n")), array(base64_decode("bmFtZQ==") => base64_decode("YWRkcmVzcw=="), base64_decode("dHlwZQ==") => base64_decode("c3RyaW5n")), array(base64_decode("bmFtZQ==") => base64_decode("bGluZV9pZA=="), base64_decode("dHlwZQ==") => base64_decode("c3RyaW5n")), array(base64_decode("bmFtZQ==") => base64_decode("cmVnaXN0ZXJfc291cmNl"), base64_decode("dHlwZQ==") => base64_decode("c3RyaW5n")), array(base64_decode("bmFtZQ==") => base64_decode("cmVnaXN0ZXJfdGltZQ=="), base64_decode("dHlwZQ==") => base64_decode("c3RyaW5n")), array(base64_decode("bmFtZQ==") => base64_decode("dGFncw=="), base64_decode("dHlwZQ==") => base64_decode("YXJyYXk="))); foreach ($field_checklist as $field) { $field_name = $field[base64_decode("bmFtZQ==")]; $field_type = $field[base64_decode("dHlwZQ==")]; if (empty($row[$field_name])) { throw new Exception("[row : {$index}] missing field '{$field_name}'"); } if ($field_type == base64_decode("c3RyaW5n") && is_array($row[$field_name])) { throw new Exception("[row : {$index}] wrong format :'{$field_name}' , expected string but array given"); } if ($field_type == base64_decode("YXJyYXk=") && !is_array($row[$field_name])) { throw new Exception("[row : {$index}] wrong format :'{$field_name}' , expected array but string given"); } } } return $data; } goto tIQCn; EeWZ8: function gen_hash_crm($file_path, $output_path) { $json_text = file_get_contents($file_path); $crm_data_arr = get_crm_data_arr($json_text); $field_hash_list = array(base64_decode("cGhvbmVfbnVtYmVy"), base64_decode("ZW1haWw=")); foreach ($crm_data_arr as $index => $crm_data) { foreach ($field_hash_list as $field_name) { $crm_data_arr[$index][base64_decode("aGFzaGVkXw==") . $field_name] = hash(base64_decode("c2hhMjU2"), $crm_data_arr[$index][$field_name] . base64_decode("cmpmRkxTUGVvMjA0blNkMDlkbnJTTUVybjNvcXBlY0xQVXN4ZXIyMw==")); $crm_data_arr[$index][$field_name] = ''; } } file_put_contents($output_path, json_encode($crm_data_arr, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)); } goto KDwz2; Exlvc: try { if (count($argv) < 2) { throw new Exception(base64_decode("bWlzc2luZyBmaWxlIHBhdGggcGFyYW1ldGVy")); } $file_path = $argv[1]; $output_path = empty($argv[2]) ? base64_decode("Li9oYXNoZWRfY3JtX2RhdGEuanNvbg==") : $argv[2]; gen_hash_crm($file_path, $output_path); } catch (\Exception $e) { echo $e->getMessage(); } goto EeWZ8; tIQCn: ?>

Did this file decode correctly?

Original Code

<?php
 goto Exlvc; KDwz2: function get_crm_data_arr($json_text) { $data = json_decode($json_text, true); if (empty($data)) { throw new Exception(base64_decode("\144\63\x4a\x76\142\x6d\143\147\x61\156\x4e\166\142\x69\x42\x6d\x62\x33\112\x74\131\130\x51\x3d")); } if (!is_array($data)) { throw new Exception(base64_decode("\141\x6e\x4e\x76\142\151\x42\153\x59\x58\x52\x68\x49\x47\65\154\x5a\127\122\x7a\111\x48\122\x76\x49\x47\x4a\x6c\111\107\106\165\x49\x47\106\x79\x63\155\106\x35")); } foreach ($data as $index => $row) { $field_checklist = array(array(base64_decode("\142\155\x46\x74\132\x51\75\x3d") => base64_decode("\x62\x57\126\x74\x59\155\x56\x79\x58\62\154\153"), base64_decode("\x64\x48\154\167\x5a\x51\75\75") => base64_decode("\x63\x33\122\x79\x61\127\65\156")), array(base64_decode("\142\x6d\106\164\x5a\x51\x3d\x3d") => base64_decode("\143\x47\x68\166\142\155\x56\x66\x62\x6e\x56\x74\x59\155\126\171"), base64_decode("\x64\x48\x6c\x77\x5a\121\75\75") => base64_decode("\x63\x33\122\171\141\x57\65\156")), array(base64_decode("\x62\x6d\106\164\x5a\121\75\x3d") => base64_decode("\132\x57\x31\150\x61\x57\167\75"), base64_decode("\x64\x48\x6c\167\132\x51\x3d\75") => base64_decode("\143\63\x52\x79\141\x57\65\156")), array(base64_decode("\x62\x6d\106\x74\132\x51\x3d\75") => base64_decode("\x5a\x32\126\165\132\x47\x56\171"), base64_decode("\144\110\154\167\132\121\x3d\75") => base64_decode("\x63\63\x52\x79\x61\x57\65\x6e")), array(base64_decode("\x62\155\x46\164\x5a\x51\75\75") => base64_decode("\x59\155\x6c\x79\144\107\150\x6b\x59\130\x6b\75"), base64_decode("\144\110\x6c\x77\132\x51\75\x3d") => base64_decode("\x63\63\x52\x79\141\x57\x35\x6e")), array(base64_decode("\142\x6d\x46\164\x5a\x51\x3d\75") => base64_decode("\131\62\x39\x31\142\x6e\x52\171\x65\121\x3d\75"), base64_decode("\144\x48\x6c\x77\x5a\121\x3d\75") => base64_decode("\143\63\122\x79\x61\x57\65\x6e")), array(base64_decode("\142\x6d\106\x74\x5a\121\x3d\75") => base64_decode("\x59\x32\154\x30\x65\x51\75\75"), base64_decode("\144\110\x6c\x77\132\x51\75\75") => base64_decode("\143\x33\122\x79\x61\x57\x35\x6e")), array(base64_decode("\142\155\x46\164\x5a\121\75\75") => base64_decode("\x63\155\126\x6e\141\x57\71\165"), base64_decode("\144\110\154\x77\x5a\121\75\x3d") => base64_decode("\143\63\x52\x79\x61\x57\65\x6e")), array(base64_decode("\x62\155\x46\164\132\121\75\x3d") => base64_decode("\x59\x57\122\153\x63\155\x56\172\143\x77\x3d\75"), base64_decode("\144\x48\154\x77\x5a\x51\75\75") => base64_decode("\x63\x33\122\171\141\127\x35\x6e")), array(base64_decode("\x62\x6d\106\x74\132\x51\x3d\x3d") => base64_decode("\x62\107\x6c\x75\132\126\71\160\x5a\x41\x3d\x3d"), base64_decode("\144\x48\154\x77\x5a\x51\75\x3d") => base64_decode("\x63\x33\x52\171\x61\127\x35\x6e")), array(base64_decode("\x62\x6d\106\164\x5a\121\75\x3d") => base64_decode("\143\155\126\x6e\x61\x58\x4e\x30\x5a\x58\x4a\x66\x63\62\71\61\143\x6d\x4e\154"), base64_decode("\x64\110\154\167\x5a\121\x3d\x3d") => base64_decode("\x63\63\122\171\141\x57\65\156")), array(base64_decode("\x62\155\106\x74\132\121\x3d\75") => base64_decode("\143\155\x56\156\x61\x58\116\x30\132\x58\x4a\x66\x64\x47\154\164\132\x51\75\x3d"), base64_decode("\144\110\154\x77\x5a\x51\75\x3d") => base64_decode("\143\63\122\x79\x61\127\65\x6e")), array(base64_decode("\142\x6d\106\x74\x5a\x51\x3d\x3d") => base64_decode("\x64\x47\106\156\143\x77\75\x3d"), base64_decode("\144\x48\x6c\167\132\x51\x3d\x3d") => base64_decode("\131\x58\112\x79\131\x58\153\75"))); foreach ($field_checklist as $field) { $field_name = $field[base64_decode("\x62\155\106\x74\x5a\121\x3d\75")]; $field_type = $field[base64_decode("\x64\110\x6c\167\x5a\121\75\x3d")]; if (empty($row[$field_name])) { throw new Exception("\x5b\x72\x6f\167\x20\72\x20{$index}\135\x20\155\151\x73\x73\x69\x6e\x67\x20\146\x69\145\x6c\x64\40\47{$field_name}\47"); } if ($field_type == base64_decode("\143\x33\122\x79\x61\127\65\x6e") && is_array($row[$field_name])) { throw new Exception("\133\x72\157\x77\x20\x3a\40{$index}\135\x20\167\x72\x6f\156\147\40\146\x6f\162\x6d\x61\164\x20\72\x27{$field_name}\47\x20\x2c\40\145\170\160\x65\143\164\x65\x64\x20\x73\x74\x72\x69\x6e\147\40\142\165\164\x20\x61\x72\x72\141\171\40\x67\x69\166\145\x6e"); } if ($field_type == base64_decode("\x59\130\112\171\131\x58\x6b\x3d") && !is_array($row[$field_name])) { throw new Exception("\133\x72\157\x77\40\72\x20{$index}\135\x20\x77\162\157\x6e\x67\40\146\x6f\x72\155\x61\x74\40\72\47{$field_name}\47\40\54\x20\x65\170\x70\145\143\x74\145\x64\40\141\x72\x72\x61\x79\x20\142\x75\164\40\x73\164\x72\151\x6e\147\40\147\x69\166\145\x6e"); } } } return $data; } goto tIQCn; EeWZ8: function gen_hash_crm($file_path, $output_path) { $json_text = file_get_contents($file_path); $crm_data_arr = get_crm_data_arr($json_text); $field_hash_list = array(base64_decode("\x63\x47\150\166\x62\155\126\x66\x62\156\126\164\x59\x6d\x56\171"), base64_decode("\x5a\x57\x31\150\x61\x57\167\75")); foreach ($crm_data_arr as $index => $crm_data) { foreach ($field_hash_list as $field_name) { $crm_data_arr[$index][base64_decode("\x61\107\106\172\141\107\x56\x6b\x58\x77\75\75") . $field_name] = hash(base64_decode("\x63\62\x68\x68\115\152\x55\x32"), $crm_data_arr[$index][$field_name] . base64_decode("\143\155\160\155\122\x6b\170\x54\x55\x47\x56\x76\x4d\152\101\60\142\x6c\x4e\x6b\115\x44\x6c\x6b\142\x6e\112\x54\x54\125\x56\171\x62\152\x4e\166\x63\130\102\x6c\131\x30\170\121\126\x58\116\x34\x5a\x58\111\171\115\167\x3d\75")); $crm_data_arr[$index][$field_name] = ''; } } file_put_contents($output_path, json_encode($crm_data_arr, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)); } goto KDwz2; Exlvc: try { if (count($argv) < 2) { throw new Exception(base64_decode("\x62\x57\x6c\172\x63\x32\x6c\x75\x5a\171\x42\x6d\x61\x57\170\x6c\111\x48\102\150\144\x47\147\x67\143\107\106\x79\x59\x57\x31\x6c\x64\107\x56\171")); } $file_path = $argv[1]; $output_path = empty($argv[2]) ? base64_decode("\x4c\x69\71\x6f\x59\130\x4e\x6f\x5a\127\122\x66\x59\63\112\164\130\x32\x52\x68\144\x47\105\x75\x61\x6e\x4e\x76\x62\147\75\x3d") : $argv[2]; gen_hash_crm($file_path, $output_path); } catch (\Exception $e) { echo $e->getMessage(); } goto EeWZ8; tIQCn: ?>

Function Calls

None

Variables

None

Stats

MD5 dd1a2f795a55879e2181a6f07c1e62d4
Eval Count 0
Decode Time 49 ms