..cool, we will make a new module and not just some new module, nope let's make a fully automatic injection script! This tutorial is the first step into making this. Let's first explain..
THC xConverter is a tool that makes use of (php) functions in order to calculate, fetch, convert and encrypt data
<?php
/* Starts a task for a module, all tasks run until completed, even if the browser screen has been closed
Author: Remco Kouw
Site: http://www.hacksuite.com
Last Edit: 14-11-2014
*/
if(!defined('IN_SCRIPT')){
exit;
}
set_time_limit(0);
ignore_user_abort(true);
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
$_CONTEXT['start_task'] = time();
$_ENTRY = $_MODULE_C."|".$_CONTEXT['start_task']."|0|".substr(md5($_MODULE_C."|".$_CONTEXT['start_task']),0,10)."\n";
// we'll use these to see whether there's a background task running and in order to update the task and log file
if(!function_exists("RawToArray")){
include_once($_PATHS['functions_root']."/raw_to_array.php");
}
if(!function_exists('WriteF')){
include_once($_PATHS['functions_root']."/fwrite.php");
}
if(!function_exists('GetFileData')){
include_once($_PATHS['functions_root']."/get_file_data.php");
}
// avoid similar running tasks
$_PATHS['task_file'] = $_PATHS['data_root']."/running.txt";
if(@filesize($_PATHS['task_file'])>0){
if(false!==($aFileDataI = RawToArray($_PATHS['task_file']))){
for($x=0;$x<count($aFileDataI);$x++){
if($aFileDataI[$x][0]==$_MODULE_C && trim($aFileDataI[$x][1]==$_CONTEXT['start_task'])){
die("Already running an instance of this module at this time");
}
}
}
}
// ok let's run this script and save it as background task
WriteF($_PATHS['task_file'],$_ENTRY);
?>