random gallery image
random tutorial
preview

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

read more

random generators
THC xMap

Creates a blueprint/map of a server folder

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
/* Logs an error if logging is enabled

Author: Remco Kouw
Site: http://www.hacksuite.com
Last Edit: 13-1-2015
*/
if(!defined('IN_SCRIPT')){
    exit;
}

/* 
Most errors below should never happen unless you delete files u shouldn't delete or edit stuff that mustn't be removed, that's why 
I choose to kill the script right away.. take that! :p
*/

// we need the raw entry and the destination log
if(!isset($_PATHS['write_dest'])){
    
// your configuration is screwed
    
die("Can only write logs if <b>\$_PATHS['write_dest']</b> has been set");
}
// if the writing function wasn't included yet then try to do it now
if(!function_exists("WriteF")){
    
$sDest $_PATHS['functions_root']."/fwrite.php";
    include_once(
$sDest);
}
// create the write buffer
$sWrite "";
$iErrors count($_CONTEXT['errors']);
for(
$x=0;$x<$iErrors;$x++){
    
// structure: ip|timestamp|error|fatal\n
    
$sWrite .= $_SERVER['REMOTE_ADDR']."|";
    
$sWrite .= time()."|";
    
// let's strip new lines and convert the pipe char to unicode as we're using it as content divider
    
$sWrite .= str_replace("|","&#166;",str_replace("\n"," ",strip_tags($_CONTEXT['errors'][$x],'<b><a><p><i><u>')))."|";
    
$sWrite .= ($_CONTEXT['fatal']==true && $x==($iErrors-1) ? 0)."\n";
}
// did the logging succeed?
if(true==($_CONTEXT['logged'] = WriteF($_PATHS['write_dest'],$sWrite,"a"))){
    
// now of course we won't do this routine all over again for default logs if anything bad happens, so if logging fails skip it
    
if($_PATHS['write_dest']==$_PATHS['write_def']){
        
define('LOG_SKIP',1);
    }
}
// ok this is what we're going to do here, since write_dest can be dynamic, we will switch back to the default log file
$_PATHS['write_dest'] = $_PATHS['write_def'];
?>
powered by
site stats
cms statistics:
version: 0.6.0
downloads: 3840
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.