..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..
AntiFTP uses wordlists in order to bruteforce FTP user accounts
<?php
/* Creates a select menu for selecting functions in THC_XC */
if(!defined('IN_SCRIPT')){
exit;
}
$_CONTEXT['xcselect'] = "\n <select name=\"sOption\" class=\"sOption\">\n";
// determine maximum amount of fields
$_CONTEXT['maxfields'] = 0;
// do we have js available
$_CONTEXT['xcselectjs'] = "";
if(false==($iOptions = @count($_CONVERT))){
$_CONTEXT['xcselect'] .= " <option value=\"\">no options available</option>\n";
}
else{
$_CONTEXT['xcselect'] .= " <option value=\"selected\" selected>select an option</option>\n";
// sort the data
$_CONVERT2 = array();
for($x=0;$x<count($_CONVERT);$x++){
// skip if it doesn't exist
if(!isset($_CONVERT[$x]['group'])){
continue;
}
$iFields = count($_CONVERT[$x]['fieldnames']);
$_CONTEXT['maxfields'] = ($iFields<=$_CONTEXT['maxfields'] ? $_CONTEXT['maxfields'] : $iFields);
// add it to a group or create a new one
$sGroupName = str_replace(" ","_",$_CONVERT[$x]['group']);
if(!isset($_CONVERT2[$sGroupName])){
$_CONVERT2[$sGroupName] = array();
}
// reposition and make the data easier accessible
$_CONVERT2[$sGroupName][$_CONVERT[$x]['position']] = array($x,$_CONVERT[$x]['label'],$_CONVERT[$x]['fieldnames'],$_CONVERT[$x]['function'],$_CONVERT[$x]['description'],$_CONVERT[$x]['type']);
}
// delete the old convert variable
$_CONVERT = "";
unset($_CONVERT);
foreach($_CONVERT2 as $sGroup=>$aItems){
// if there are no valid options available then there's no need to add the optgroup tag
$bHasOptions = false;
$sOptionsBuffer = "";
for($x=0;$x<count($aItems);$x++){
if(isset($aItems[$x])){
$bHasOptions = true;
$sOptionsBuffer .= " <option value=\"".$aItems[$x][3]."\" title=\"".$aItems[$x][4]."\">".$aItems[$x][1]."</option>\n";
}
}
$_CONTEXT['xcselect'] .= ($bHasOptions==true ? " <optgroup label=\"".str_replace("_"," ",$sGroup)."\">\n".$sOptionsBuffer." </optgroup>\n" : "");
}
}
$_CONTEXT['xcselect'] .= " </select>\n";
$_CONVERT2 = "";
unset($_CONVERT2);
?>