..going to create a new app for the hacksuite. We're not going to do anything fancy here, we will make a simple app to get familiar how to write compatible scripts for the suite. We..
THC xConverter is a tool that makes use of (php) functions in order to calculate, fetch, convert and encrypt data
<?php
/* Login handler
Author: Remco Kouw
Site: http://www.hacksuite.com
Last Edit: 09-03-2015
*/
session_cache_limiter('nocache');
header('Expires: '.gmdate('r',0));
header('Content-type: application/json');
$_DYNAMIC_ROOT = "..";
define('PASS_WO_LOGIN',1);
include_once("../header.php");
$aDataR = array();
$aDataR['jresult'] = false;
if(!isset($_CONTEXT['pass_access']) || !$_CONTEXT['pass_access']){
$aDataR['jmessage'] = "You need to setup a password using the setup file";
}
else{
if(!isset($_POST['sPass'])){
$aDataR['jmessage'] = "No password specified";
}
else{
if(@sha1($_CONTEXT['pass_salt'].":".trim($_POST['sPass']))==$_CONTEXT['pass_hash']){
setcookie("thcauth_".substr($_CONTEXT['pass_hash'],0,5),$_CONTEXT['pass_hash'],(time()+$_CONTEXT['cookielife']),"/");
$aDataR['jresult'] = true;
$aDataR['jmessage'] = "<div class=\"success\">Thank you for logging in, <a href=\"index.php\">click here to open the HackSuite</a></div>";
}
else{
$aDataR['jmessage'] = "Invalid password specified";
if(!function_exists("WriteF")){
@include_once("../Functions/fwrite.php");
}
include($_PATHS['data_root']."/logsdata.php");
WriteF($_PATHS['log_root']."/".$_CONTEXT['l_formats'][3]['file'],$_SERVER['REMOTE_ADDR']."|".time()."|Invalid credentials specified\n","w");
}
}
}
if(!$aDataR['jresult']){
// failed login
@sleep($_CONTEXT['sleeptime']);
}
echo json_encode($aDataR);
?>