<?php
/*
- iAttackType: value must be 1 because we're going to do a mass scan
- sUseFile: location to the url file in THC_II
- sTarget: you can leave this empty (only applies to a single url scan)
- aExploits: exploits to use, expects an array, use array("sqli") as value
- submit: type of action to fulfill, use Scan as value
*/

// post fields
$aData = array();
$aData['iAttackType'] = 1;
$aData['sUseFile'] = "";// will be created automatically in the callback
$aData['aExploits'] = array("sqli");
$aData['submit'] = "Scan";
// send request
$sUrl "http://127.0.0.1/athchs04/thc_hacksuite/thc_ii/screen.php";
$ch curl_init($sUrl);
curl_setopt($chCURLOPT_POST1);
curl_setopt($chCURLOPT_POSTFIELDS$aData);
curl_setopt($chCURLOPT_HEADERfalse);
curl_setopt($chCURLOPT_RETURNTRANSFERfalse);
curl_setopt($chCURLOPT_TIMEOUT10);
curl_exec($ch);
curl_close($ch);
?>