Ryan Prather
21082c7513
finding.inc - removed ID property to prevent duplicate findings from being added to the table host_list.inc - deleted unused constructor import.inc - formatting db_schema.json - removed sagacity.findings.id field (making tgt_id and pdi_id new primary keys), and updated references Database_Baseline.zip - updated routines for above change background_results.php - fixed bug #19 export-ckl.php - performance adjustments parse_excel_echecklist.php - performance improvements, ensure duplicate findings are not created, make eChecklist true status, update for removing findings.id field parse_nvd_json_cve.php - convert reading json to array instead of object for reading CPEs (which were updated to CPE 2.3 instead of 2.2) parse_* - remove findings.id field database.inc - formatting, and update for removing findings.id field index.php - ensure user can't import a host list without uploading a host list file Fixed: #65, #51, #28, #27, #10
189 lines
3.3 KiB
PHP
189 lines
3.3 KiB
PHP
<?php
|
|
/**
|
|
* File: host_list.inc
|
|
* Author: Ryan Prather
|
|
* Purpose: Represents an imported scan
|
|
* Created: Jan 16, 2018
|
|
*
|
|
* Copyright 2016-2018: Cyber Perspectives, LLC, All rights reserved
|
|
* Released under the Apache v2.0 License
|
|
*
|
|
* See license.txt for details
|
|
*
|
|
* Change Log:
|
|
* - Jan 16, 2018 - File created
|
|
* - Feb 6, 2018 - Added getter/setter methods
|
|
* - Nov 6, 2018 - Deleted unused constructor
|
|
*/
|
|
|
|
/**
|
|
* Description of host_list
|
|
*
|
|
* @author Ryan Prather
|
|
*/
|
|
class host_list
|
|
{
|
|
|
|
/**
|
|
* Target ID
|
|
*
|
|
* @var integer
|
|
*/
|
|
private $_targetId = 0;
|
|
|
|
/**
|
|
* Target name
|
|
*
|
|
* @var string
|
|
*/
|
|
private $_targetName = null;
|
|
|
|
/**
|
|
* Target IP address
|
|
*
|
|
* @var string
|
|
*/
|
|
private $_targetIp = null;
|
|
|
|
/**
|
|
* Number of findings for this target
|
|
*
|
|
* @var integer
|
|
*/
|
|
private $_findingCount = 0;
|
|
|
|
/**
|
|
* Was there an error when scanning the target
|
|
*
|
|
* @var boolean
|
|
*/
|
|
private $_scanError = false;
|
|
|
|
/**
|
|
* Are their any special notes for the target
|
|
*
|
|
* @var string
|
|
*/
|
|
private $_scanNotes = null;
|
|
|
|
/**
|
|
* Getter function for _targetId
|
|
*
|
|
* @return int
|
|
*/
|
|
public function getTargetId()
|
|
{
|
|
return $this->_targetId;
|
|
}
|
|
|
|
/**
|
|
* Setter function for _targetId
|
|
*
|
|
* @param int $intTargetId
|
|
*/
|
|
public function setTargetId($intTargetId)
|
|
{
|
|
$this->_targetId = $intTargetId;
|
|
}
|
|
|
|
/**
|
|
* Getter function for _targetName
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getTargetName()
|
|
{
|
|
return $this->_targetName;
|
|
}
|
|
|
|
/**
|
|
* Setter function for _targetName
|
|
*
|
|
* @param string $strTargetName
|
|
*/
|
|
public function setTargetName($strTargetName)
|
|
{
|
|
$this->_targetName = $strTargetName;
|
|
}
|
|
|
|
/**
|
|
* Getter function for _targetIp
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getTargetIp()
|
|
{
|
|
return $this->_targetIp;
|
|
}
|
|
|
|
/**
|
|
* Setter function for _targetIp
|
|
*
|
|
* @param string $strTargetIp
|
|
*/
|
|
public function setTargetIp($strTargetIp)
|
|
{
|
|
$this->_targetIp = $strTargetIp;
|
|
}
|
|
|
|
/**
|
|
* Getter function for _findingCount
|
|
*
|
|
* @return int
|
|
*/
|
|
public function getFindingCount()
|
|
{
|
|
return $this->_findingCount;
|
|
}
|
|
|
|
/**
|
|
* Setter function for _findingCount
|
|
*
|
|
* @param int $intFindingCount
|
|
*/
|
|
public function setFindingCount($intFindingCount)
|
|
{
|
|
$this->_findingCount = $intFindingCount;
|
|
}
|
|
|
|
/**
|
|
* Getter function for _scanError
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function getScanError()
|
|
{
|
|
return $this->_scanError;
|
|
}
|
|
|
|
/**
|
|
* Setter function for _scanError
|
|
*
|
|
* @param bool $blnScanError
|
|
*/
|
|
public function setScanError($blnScanError)
|
|
{
|
|
$this->_scanError = $blnScanError;
|
|
}
|
|
|
|
/**
|
|
* Getter function for _scanNotes
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getScanNotes()
|
|
{
|
|
return $this->_scanNotes;
|
|
}
|
|
|
|
/**
|
|
* Setter function for _scanNotes
|
|
*
|
|
* @param string $strScanNotes
|
|
*/
|
|
public function setScanNotes($strScanNotes)
|
|
{
|
|
$this->_scanNotes = $strScanNotes;
|
|
}
|
|
}
|