..we are going to create a new app for the hacksuite. We're not going to do anything fancy here, we will make a simple app to get familiar how to write compatible scripts for the..
THC xConverter is a tool that makes use of (php) functions in order to calculate, fetch, convert and encrypt data
<?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;
}
?>