Destroy everything on end of session ########################################################################## */ // For DEBUGGING: // View sqlmap requests in proxy: // $options_to_enable['proxy'] = 'http://127.0.0.1:8080'; // This will allow all DB Error messages in reponses to display in our log view // $options_to_enable['parseErrors'] = 'true'; $sqlmap = new SQLMAPClientAPI(); $sqlmap->task_id = $sqlmap->generateNewTaskID(); $scanID = trim($sqlmap->task_id); // Check to make sure the API communication is working, otherwise bail if (isset($scanID) && trim($scanID) != "") { if (isset($_POST['level']) && (int) $_POST['level'] > 0 && (int) $_POST['level'] < 6) { $sqlmap->setOptionValue($scanID, 'level', (int) $_POST['level'], true); } if (isset($_POST['risk']) && (int) $_POST['risk'] > 0 && (int) $_POST['risk'] < 4) { $sqlmap->setOptionValue($scanID, 'risk', (int) $_POST['risk'], true); } foreach ($options_to_enable as $key => $value) { $sqlmap->setOptionValue($scanID, $key, $value); } $sqlmap->startScan($scanID); // Launch Scan $status = $sqlmap->checkScanStatus($scanID); // Check Scan Status echo '<br /><br />'; echo '<div class="scan_info" id="scan_info" align="center" style="width">'; // Info div we can use to fill during scan waiting echo 'Running SQLMAP Scan on Target, hang tight....<br /><br /><br />';