random gallery image
random tutorial
preview

..more 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..

read more

random other
xConverter

THC xConverter is a tool that makes use of (php) functions in order to calculate, fetch, convert and encrypt data

more about this module
more of this category
more modules

HackSuite File Library
File Library
Here you can find the latest files and structure of the THC HackSuite, note that if you have an earlier version of the suite it's not recommended to update files manually. Instead you should overwrite your existing HackSuite environment.
<?php
/* THC xAnalyze GUI

Author: Remco Kouw
Site: http://www.hacksuite.com
Last Edit: 29-03-2015
*/
if(!defined("IN_SCRIPT")){
    exit;
}
$sCode "";
// make sure we have the groups file
$sDest $_PATHS['module_default_root']."/groups.php";
(!
IsThere($sDest) ? include_once($_PATHS['end']) : include_once($sDest));
if(!isset(
$_POST['submit'])){
    if(!isset(
$_ANALYZE)){
        
$_ERROR "Analyze array isn't available";
        include_once(
$_PATHS['end']);
    }
    if(!
function_exists("getfilesbydirectory")){
        
// should be here, but do a check nevertheless
        
$sDest $_PATHS['functions_root']."/getfilebydir.php";
        (!
IsThere($sDest) ? include_once($_PATHS['end']) : include_once($sDest));
    }
    
$_CONTEXT['mfs'] = array();
    
/* keeps track of the current row when defining properties, which makes it easier to add and remove new rows */
    
$_CONTEXT['mfs']['currentrow'] = 0;
    
/* form properties */
    
$_CONTEXT['mfs']['module'] = $_CONTEXT['module_current'];
    
$_CONTEXT['mfs']['form'] = array();
    
$_CONTEXT['mfs']['form']['method'] = "post";
    
/* table */
    
$_CONTEXT['mfs']['table'] = array();
    
/* table header */
    
$_CONTEXT['mfs']['table']['header'] = array();
    
$_CONTEXT['mfs']['table']['header']['name'] = $_CONTEXT['modules'][$_CONTEXT['mfs']['module']]['name'];
    
$_CONTEXT['mfs']['table']['header']['description'] = $_CONTEXT['modules'][$_CONTEXT['mfs']['module']]['description'];
    
/* table rows */
    
$_CONTEXT['mfs']['table']['rows'] = array();
    
$_CONTEXT['mfs']['table']['rows'][$_CONTEXT['mfs']['currentrow']] = array();
    
$_CONTEXT['mfs']['table']['rows'][$_CONTEXT['mfs']['currentrow']]['class'] = "modrow";
    
$_CONTEXT['mfs']['table']['rows'][$_CONTEXT['mfs']['currentrow']]['cells'] = array();
    
$_CONTEXT['mfs']['table']['rows'][$_CONTEXT['mfs']['currentrow']]['cells'][0] = array();
    
$_CONTEXT['mfs']['table']['rows'][$_CONTEXT['mfs']['currentrow']]['cells'][0]['class'] = "modleft";
    
$_CONTEXT['mfs']['table']['rows'][$_CONTEXT['mfs']['currentrow']]['cells'][0]['value'] = "choose file:";
    
$_CONTEXT['mfs']['table']['rows'][$_CONTEXT['mfs']['currentrow']]['cells'][1] = array();
    
$_CONTEXT['mfs']['table']['rows'][$_CONTEXT['mfs']['currentrow']]['cells'][1]['class'] = "modright";
    
$sSelect "<select name=\"sSelect\">";
    foreach(
$_ANALYZE as $sKey=>$sValue){
        if(
false!=($aFiles GetFilesByDirectory("./".ucfirst($sKey)))){
            
$sSelect .= "<optgroup label=\"".$sValue."\">\n";
            for(
$x=0;$x<count($aFiles);$x++){
                if(
$aFiles[$x]!="index.php"){
                    
$sSelect .= "<option value=\"".$aFiles[$x].":".$sKey."\">".$aFiles[$x]."</option>\n";
                }
            }
            
$sSelect .= "</optgroup>\n";
        }
    }
    
$sSelect .= "</select>\n";
    
$_CONTEXT['mfs']['table']['rows'][$_CONTEXT['mfs']['currentrow']]['cells'][1]['value'] = $sSelect;
    
$_CONTEXT['mfs']['currentrow']++;
    
$_CONTEXT['mfs']['table']['rows'][$_CONTEXT['mfs']['currentrow']] = array();
    
$_CONTEXT['mfs']['table']['rows'][$_CONTEXT['mfs']['currentrow']]['class'] = "modrow";
    
$_CONTEXT['mfs']['table']['rows'][$_CONTEXT['mfs']['currentrow']]['value'] = "<div class=\"modrowleft mt5\"><input type=\"submit\" name=\"submit\" value=\"Analyze File\" /></div>";
    
// create output form
    
$sCode ModForm($_CONTEXT['mfs']);
}
else{
    if(isset(
$_POST['sSelect'])){
        if(
count($aParts = @explode(":",$_POST['sSelect']))!=2){
            
$_CONTEXT['errors'][] = "Invalid post data";
            include_once(
$_PATHS['end']);
        }
        
$sDest "./".ucfirst($aParts[1])."/".$aParts[0];
        if(!
file_exists($sDest)){
            
$_CONTEXT['errors'][] = "Target file doesn't exist";
            include_once(
$_PATHS['end']);
        }
        if(
false==($aLines file($sDest))){
            
$_CONTEXT['errors'][] = "Failed to get file data";
            include_once(
$_PATHS['end']);
        }
        
$sCode .= "<div class=\"moddesc modhdr modglow border1pxstrans borderr5\"><img src=\"./Modules/".$_CONTEXT['module_current']."/".$_CONTEXT['module_current'].".png\" width=\"90\" align=\"left\" /><h2>".$_CONTEXT['modules'][$_CONTEXT['module_current']]['name']."</h2>".$_CONTEXT['modules'][$_CONTEXT['module_current']]['description']."</div>\n";
        
$iReference 0;
        
$bSuccess true;
        for(
$x=0;$x<count($aLines);$x++){
            
$iParts count(explode("|",$aLines[$x]));
            if(
$x==0){
                
$iReference $iParts;
            }
            else{
                if(
$iParts!=$iReference){
                    
$sCode .= "<div class=\"spacingmsg\">".$_CONTEXT['result_headers']['result']."Found an error on line <b>".($x+1)."</b> in file <b>".$aParts[0]."</b></div>";
                    
$bSuccess false;
                    break;
                }
            }
        }
        if(
$bSuccess==true){
            
$sCode .= "<div class=\"spacingmsg\">".$_CONTEXT['result_headers']['notice']."No errors found in file <b>".$aParts[0]."</b></div>";
        }
    }
}
?>
powered by
site stats
cms statistics:
version: 0.6.0
downloads: 4372
native: 26
modules: 21
apps: 2
support development
It takes lots of calories in order to create new things for the hacksuite, so it would be grand if you could buy me a protein shake or extra energy to keep me going. Thanks!
disclaimer
We are not responsible for any direct or indirect damage caused by abusing the tools provided on hacksuite.com. The suite is developed for educational purposes, use at your own risk!
Created by Remco Kouw. Powered by protein shakes and a high calorie diet.