Loading...
 

TogggDeletorPhp

VERY DANGEROUS SCRIPT TO REMOVE FILES AND FOLDERS
evilDon't let this script in your public areaevil

It's only for tiky installers not root not in apache group Tiki02777People confused
It's a very rough script, will clean only what server access.
So you need eventually to help yourself from other way FTP or shell.
A few tries side after side and you will clean everything reachable.

Copy to clipboard
<?php function delfil($fil) { if (!is_dir($fil)) { return unlink($fil); } $dh=opendir($fil); while ($subfil=readdir($dh)) { if ($subfil!="." && $subfil!="..") { $fullpath=$fil."/".$subfil; if (!delfil($fullpath)) { die("error by {$fullpath}"); } } } closedir($dh); if(rmdir($fil)) { return true; } else { die("cannot remove dir {$fil}"); return false; } } function out($txt, $nl = FALSE) { static $len = 0; $tl = strlen($txt); $ret = ''; if ($nl or ($len + $tl > 80)) { $ret = "<br>\n"; $len = 0; } $len += $tl; return $ret.htmlentities($txt); } function lisfil($fil) { if (!is_dir($fil)) { return out(basename($fil).' '); } $ret = out($fil, TRUE) . out('', TRUE); $dh=opendir($fil); while ($subfil=readdir($dh)) { if ($subfil!="." && $subfil!="..") { $fullpath=$fil."/".$subfil; $ret .= lisfil($fullpath); } } closedir($dh); return $ret; } if (isset($_POST['fil'])) { $fil = $_POST['fil']; } else { $fil = ''; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Toggg's Deletor</title> </head> <body> <FORM method="POST" name="deletor"> <INPUT type="text" name="fil" value="<?php echo $fil; ?>" > <INPUT type="submit" name="list" value='list'> <?php if (!isset($_POST['fil'])) { exit('</FORM></body>'); } $out = lisfil($fil); $md5 = md5($out); echo '<INPUT type="hidden" name="md5" value="'.$md5.'">'; if ($_POST['md5'] == $md5) { if (isset($_POST['clean']) && $_POST['clean']) { delfil($fil); $out = lisfil($fil); } else { echo '<INPUT type="submit" name="clean" value="delete">'; } } echo '</FORM>'.$out; ?> </BODY>

Page last modified on Thursday 10 February 2005 22:35:55 GMT-0000

Upcoming Events

1)  21 Mar 2024 18:00 GMT-0000
Tiki Roundtable Meeting
2)  25 Mar 2024 17:00 GMT-0000
29th anniversary WikiBirthday (With Ward Cunningham)
3)  18 Apr 2024 18:00 GMT-0000
Tiki Roundtable Meeting
4)  16 May 2024 18:00 GMT-0000
Tiki Roundtable Meeting
5)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
8)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9) 
Tiki birthday
10)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting