Fix bug #49
Revert update_db.php to download compilation STIG library instead of individual as links are inconsistent (#60, #64, #61 Add scape_webpage method to helper.inc for future efforts Fixed typo in uninstall.bat
This commit is contained in:
@ -73,8 +73,6 @@ $xml = new Array2XML();
|
||||
$xml->standalone = true;
|
||||
$xml->formatOutput = true;
|
||||
|
||||
$chk_comp_count = 0;
|
||||
$tgt_comp_count = 0;
|
||||
$total_chk_count = 0;
|
||||
$total_stigs = 0;
|
||||
|
||||
@ -85,7 +83,6 @@ if ($tgt_count = count($tgts)) {
|
||||
$host_ip = (is_array($tgt->interfaces) && count($tgt->interfaces) ? current($tgt->interfaces)->get_IPv4() : null);
|
||||
$host_fqdn = (is_array($tgt->interfaces) && count($tgt->interfaces) ? current($tgt->interfaces)->get_FQDN() : null);
|
||||
$host_mac = (is_array($tgt->interfaces) && count($tgt->interfaces) ? current($tgt->interfaces)->get_MAC() : null);
|
||||
//$host_mac = (count($tgt->interfaces) ? current($tgt->interfaces)->get_Mac() : null);
|
||||
|
||||
print "Target: {$tgt->get_Name()}" . PHP_EOL;
|
||||
|
||||
@ -122,11 +119,11 @@ if ($tgt_count = count($tgts)) {
|
||||
$arr = [
|
||||
'@comment' => "CyberPerspectives Sagacity v" . VER,
|
||||
'ASSET' => [
|
||||
'ROLE' => 'None',
|
||||
'ASSET_TYPE' => 'Computing',
|
||||
'HOST_NAME' => $tgt->get_Name(),
|
||||
'HOST_IP' => $host_ip,
|
||||
'HOST_MAC' => $host_mac,
|
||||
'HOST_GUID' => '',
|
||||
'HOST_FQDN' => $host_fqdn,
|
||||
'TECH_AREA' => '',
|
||||
'TARGET_KEY' => '',
|
||||
@ -220,7 +217,7 @@ if ($tgt_count = count($tgts)) {
|
||||
}
|
||||
|
||||
// decoding because check contents are already encoded
|
||||
$cc = str_replace("\\n", "<br />", htmlentities(html_entity_decode($pdi['check_contents'])));
|
||||
//$cc = str_replace("\\n", "\n", htmlentities(html_entity_decode($pdi['check_contents'])));
|
||||
|
||||
$stig_data = array_merge([
|
||||
[
|
||||
@ -257,11 +254,11 @@ if ($tgt_count = count($tgts)) {
|
||||
],
|
||||
[
|
||||
'VULN_ATTRIBUTE' => 'Check_Content',
|
||||
'ATTRIBUTE_DATA' => $cc
|
||||
'ATTRIBUTE_DATA' => htmlentities(str_replace("\\n", "\n", html_entity_decode(html_entity_decode($pdi['check_contents']))))
|
||||
],
|
||||
[
|
||||
'VULN_ATTRIBUTE' => 'Fix_Text',
|
||||
'ATTRIBUTE_DATA' => htmlentities($pdi['fix_text'])
|
||||
'ATTRIBUTE_DATA' => htmlentities(str_replace("\\n", "\n", html_entity_decode(html_entity_decode($pdi['fix_text']))))
|
||||
],
|
||||
[
|
||||
'VULN_ATTRIBUTE' => 'False_Positives',
|
||||
@ -301,7 +298,11 @@ if ($tgt_count = count($tgts)) {
|
||||
],
|
||||
[
|
||||
'VULN_ATTRIBUTE' => 'Check_Content_Ref',
|
||||
'ATTRIBUTE_DATA' => ''
|
||||
'ATTRIBUTE_DATA' => 'M'
|
||||
],
|
||||
[
|
||||
'VULN_ATTRIBUTE' => 'Weight',
|
||||
'ATTRIBUTE_DATA' => '10.0'
|
||||
],
|
||||
[
|
||||
'VULN_ATTRIBUTE' => 'Class',
|
||||
@ -321,6 +322,7 @@ if ($tgt_count = count($tgts)) {
|
||||
$notes = '';
|
||||
|
||||
if (is_a($find, 'finding')) {
|
||||
/** @var finding $find */
|
||||
$status = $status_map[$find->get_Finding_Status_String()];
|
||||
$notes = $find->get_Notes();
|
||||
}
|
||||
|
Reference in New Issue
Block a user