random gallery image
random tutorial
preview

..a different index page for the suite. It's very easy because the only thing you need to do is change the content of default.php. I don't want to create something like hello world..

read more

random stress testing
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
/* Displays processor usage in percents

Author: Remco Kouw
Site: http://www.hacksuite.com
Last Edit: 26-11-2014
*/
session_cache_limiter('nocache');
header('Expires: '.gmdate('r',0));
header('Content-type: application/json');
$_DYNAMIC_ROOT "..";
include_once(
"../header.php");
$aDataR = array();
/* Linux and Windows CPU measurer */
function win_sys_current_cpu_usage() {
  
$cmd 'typeperf  -sc 1  "\Processor(_Total)\% Processor Time"';
  
exec($cmd$lines$retval);
  if(
$retval == 0) {
    
$values str_getcsv($lines[2]);
    return 
floatval($values[1]);
  } else {
    return 
false;
  }
}
function 
onRequestStart() {
    
$dat getrusage();
    
define('PHP_TUSAGE'microtime(true));
    
define('PHP_RUSAGE'$dat["ru_utime.tv_sec"]*1e6+$dat["ru_utime.tv_usec"]);
}
function 
nix_sys_current_cpu_usage() {
    
$dat getrusage();
    
$dat["ru_utime.tv_usec"] = ($dat["ru_utime.tv_sec"]*1e6 $dat["ru_utime.tv_usec"]) - PHP_RUSAGE;
    
$time = (microtime(true) - PHP_TUSAGE) * 1000000;
    
// cpu per request
    
if($time 0) {
        
$cpu sprintf("%01.2f", ($dat["ru_utime.tv_usec"] / $time) * 100);
    } else {
        
$cpu '0.00';
    }
    return 
$cpu;
}
$aDataR['jdata'] = "CPU: ";
$aDataR['jmemory'] = "MEM: ";
if(
strtoupper(substr(PHP_OS,0,3))==="WIN"){
    
$aDataR['jdata'] .= win_sys_current_cpu_usage();
    
$aOutput = array();
    if(
false===($sResult = @exec('tasklist /fi "PID eq '.getmypid().'"',$aOutput))){
        
$aDataR['jmemory'] .= "???";
    }
    else{
        
$aResult explode(" ",$sResult);
        
$sMemKB $aResult[count($aResult)-2];
        
$aDataR['jmemory'] .= round((intval(str_replace(".","",$sMemKB))/1024),2);
    }
}
else{
    
onRequestStart();
    
$aDataR['jdata'] .= nix_sys_current_cpu_usage();
    
$aDataR['jmemory'] .= round(((memory_get_usage()/1024)/1024),2);
}
$aDataR['jdata'] .= "%";
$aDataR['jmemory'] .= "MB";
$aDataR['jresult'] = false;
echo 
json_encode($aDataR);
?>
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.