HEX
Server: LiteSpeed
System: Linux 111n6.sieutocviet.page 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
User: nhathuocat (1048)
PHP: 7.4.30
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/nhathuocat/public_html/wp-content/plugins/duplicator-pro/classes/utilities/class.u.import.php
<?php
defined("ABSPATH") or die("");
class DUP_PRO_Import_U
{
    public static function PurgeOldImports() 
    {
		if(file_exists(DUPLICATOR_PRO_PATH_IMPORTS)) {
			$files = scandir(DUPLICATOR_PRO_PATH_IMPORTS);

			if($files !== false) {
				foreach ($files as $file) {
					$filepath = DUPLICATOR_PRO_PATH_IMPORTS . "/{$file}";
					DUP_PRO_LOG::trace("checking {$filepath}");
					if(is_file($filepath)) {
						if (filemtime($filepath) <= time() - DUP_PRO_Constants::IMPORTS_CLEANUP_SECS) {
							@unlink($filepath);
						}
					}
				}
			} else {
				DUP_PRO_LOG::trace("Couldn't get list of files in " . DUPLICATOR_PRO_PATH_IMPORTS);
			}
		}
    }
    
    public static function PurgeAllImports()
    {
        $files = scandir(DUPLICATOR_PRO_PATH_IMPORTS);
        
        if($files !== false) {
            foreach ($files as $file) {
                $filepath = DUPLICATOR_PRO_PATH_IMPORTS . "/{$file}";
                @unlink($filepath);
            }
        } else {
            DUP_PRO_LOG::trace("Couldn't get list of files in " . DUPLICATOR_PRO_PATH_IMPORTS);
        }
    }
}