..I will show you how to create native tools. I'm not going to make a new tool though, instead I will show you what is required to create one. You can find all the native tools in the..
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);
?>