..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 suite. We..
AntiFTP uses wordlists in order to bruteforce FTP user accounts
<?php
/* Creates a module form
Expects a structure for creating the form for modules
PARAMETERS:
$aData: array data that holds the structure for the module form
$aData['module'] = "";
$aData['form'] = array();
$aData['form']['name'] = "";
$aData['form']['class'] = "";
$aData['form']['id'] = "";
$aData['form']['target'] = "";
$aData['form']['method'] = "";
$aData['form']['action'] = "";
$aData['table'] = array();
$aData['table']['header'] = array();
$aData['table']['header']['name'] = "";
$aData['table']['header']['description'] = "";
$aData['table']['rows'] = array();
$aData['table']['rows'][$aData['currentrow']] = array();
$aData['table']['rows'][$aData['currentrow']]['class'] = "";
$aData['table']['rows'][$aData['currentrow']]['id'] = "";
$aData['table']['rows'][$aData['currentrow']]['value'] = "";
$aData['table']['rows'][$aData['currentrow']]['cells'] = array();
$aData['table']['rows'][$aData['currentrow']]['cells'][0] = array();
$aData['table']['rows'][$aData['currentrow']]['cells'][0]['class'] = "";
$aData['table']['rows'][$aData['currentrow']]['cells'][0]['id'] = "";
$aData['table']['rows'][$aData['currentrow']]['cells'][0]['value'] = "";
$aData['table']['rows'][$aData['currentrow']]['cells'][1] = array();
$aData['table']['rows'][$aData['currentrow']]['cells'][1]['class'] = "";
$aData['table']['rows'][$aData['currentrow']]['cells'][1]['id'] = "";
$aData['table']['rows'][$aData['currentrow']]['cells'][1]['value'] = "";
RETURNS:
STRING: html data for module form
BOOLEAN: FALSE
Author: Remco Kouw
Site: http://www.hacksuite.com
Last Edit: 23-03-2015
*/
function ModForm($aData){
if(!is_array($aData)){
$_CONTEXT['errors'][] = "No data set for structure of form in specified module";
return(false);
}
$sString = " <div class=\"modtable borderr10 border1pxstrans pad5 modglow\">\n";
$sString .= " <div class=\"moddesc modhdr modglow border1pxstrans borderr5\"><img src=\"./Modules/".$aData['module']."/".$aData['module'].".png\" width=\"90\" align=\"left\" /><h2>".$aData['table']['header']['name']."</h2>".$aData['table']['header']['description']."</div>\n";
if(isset($aData['form']['target']) && $aData['form']['target']=="screen"){
// if the target used is screen, we will load the attack in an iframe
$sString .= " <div class=\"modrow\"><iframe src=\"./Modules/".$aData['module']."/screen.php\" class=\"modglow borderr5 border1pxstrans\" width=\"800\" height=\"200\" name=\"".$aData['form']['target']."\"></iframe></div>\n";
}
for($x=0;$x<count($aData['table']['rows']);$x++){
$sString .= " <div class=\"".$aData['table']['rows'][$x]['class']."\"".(isset($aData['table']['rows'][$x]['id']) ? " id=\"".$aData['table']['rows'][$x]['id']."\"" : "").">\n";
if(!isset($aData['table']['rows'][$x]['cells'])){
// no cells available, content should be available in 'value'
$sString .= " ".$aData['table']['rows'][$x]['value']."\n";
}
else{
for($y=0;$y<count($aData['table']['rows'][$x]['cells']);$y++){
$sString .= " <div class=\"".$aData['table']['rows'][$x]['cells'][$y]['class']."\"".(isset($aData['table']['rows'][$x]['cells'][$y]['id']) ? " id=\"".$aData['table']['rows'][$x]['cells'][$y]['id']."\"" : "").">".$aData['table']['rows'][$x]['cells'][$y]['value']."</div>\n";
}
}
$sString .= " </div>\n";
}
$sString .= " </div>\n";
if(isset($aData['form'])){
// wrap a form around the table
$sStringWrap = "";
foreach($aData['form'] as $sKey=>$sValue){
$sStringWrap .= " ".$sKey."=\"".$sValue."\"";
}
$sStringWrap = " <form".$sStringWrap.">\n";
$sStringWrap .= $sString;
$sStringWrap .= " </form>\n";
}
return(isset($sStringWrap) ? $sStringWrap : $sString);
}
?>