..tutorial 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..
THC Sscan is a very versatile tool for scanning (html) files
<?php
/* Returns all filenames and directories in a directory
Opens a directory and buffers all files in a string.
PARAMETERS:
$sDir: directory to get files from
$bEditable: make development targets
RETURNS:
STRING: filenames in the target directory
Author: Remco Kouw
Site: http://www.hacksuite.com
Last Edit: 12-11-2014
*/
function RecurseDir($sPath,$bEditable=false){
$sContent = "";
$rOpen = @opendir($sPath);
while(false!==($sFile = @readdir($rOpen))){
if($sFile!="." && $sFile!=".."){
$sDest = $sPath."/".$sFile;
if($bEditable){
if(is_dir($sDest)){
$sContent .= "<b><a href=\"#\" title=\"".$sDest."\" id=\"dir\">".$sFile."</a></b><br />\n";
$sContent .= "<blockquote>".RecurseDir($sDest,true)."</blockquote>";
}
else{
$sContent .= "<a href=\"#\" title=\"".$sDest."\" id=\"file\">".$sFile."</a><br />\n";
}
}
else{
if(is_dir($sDest)){
$sContent .= "<b>".$sFile."</b><br />\n";
$sContent .= "<blockquote>".RecurseDir($sDest)."</blockquote>";
}
else{
$sContent .= $sFile."<br />\n";
}
}
}
}
@closedir($rOpen);
return($sContent);
}
?>