Last active
July 28, 2021 10:28
-
-
Save herewithme/084d9501867e2c6eb495 to your computer and use it in GitHub Desktop.
Search files with PHP Script - Help for find malware in uploads folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$base_dir = dirname(__FILE__); | |
$extension_restriction = array( | |
'js', | |
'php' | |
); | |
$it = new RecursiveDirectoryIterator($base_dir); | |
foreach (new RecursiveIteratorIterator($it) as $file) { | |
if (in_array(strtolower(pathinfo( $file, PATHINFO_EXTENSION )), $extension_restriction)) { | |
echo $file . "<br/> \n"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sympa le snippet !