..modules you must have seen the iframes used for realtime result display. In this tutorial I'm going to show you how to insert them into your module and how they function. what we..
Attempts to find suspicious and evil files or code
<?php
/* Returns all filenames in a directory
Opens a directory and buffers all files in an array.
PARAMETERS:
$sDir: directory to get files from
RETURNS:
ARRAY: filenames in the target directory
FALSE: failed to open directory $sDir
Author: Remco Kouw
Site: http://www.hacksuite.com
Last Edit: 12-11-2014
*/
function GetFilesByDirectory($sDir){
global $_CONTEXT;
if(!$rHandle = @opendir($sDir)){
$_CONTEXT['errors'][] = "Failed to open directory <b>".$sDir."</b>";
return(false);
}
$aFileBuffer = array();
while(false!==($sFile = @readdir($rHandle))){
// buffer all files
if($sFile!="." && $sFile!=".."){
if(!is_dir($sDir."/".$sFile)){
$aFileBuffer[] .= $sFile;
}
}
}
@closedir($rHandle);
return $aFileBuffer;
}
?>