..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
/* 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("|","¦",str_replace("\n"," ",strip_tags($_CONTEXT['errors'][$x],'<b><a><p><i><u>')))."|";
$sWrite .= ($_CONTEXT['fatal']==true && $x==($iErrors-1) ? 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'];
?>