Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
Result - A type containing various objects that are outputs of a scan. It has only one .Target, which theoretically means that we must have n Results for n Results. This type is to be created from and used by a scan.Run type, which has various methods to set up, populate, curate and save the data from a complete Scan, sometimes concurrently. A Result is not meant to be saved in a database: it is only used as a feeder type for the scan.Run.
type Run ¶
Run - Represents a scan before, after or while being run. This run can be the one of any scanner: fields are not mandatorily used by all scanners for all scans, but this type gives a common tree in which to store hosts, ports, services, statistics and various other information.
The type provides many convenience methods to process all the output of the scan, either at once or continuously, or even to refine the objects based on/ with those already in a database. Therefore, all the methods of this type are meant to be used server-side, and not in an implant.
For having similar functionality from within an implant, use the Protobuf scan.Run type, which itself has some convenience methods that do NOT need any database or its related libraries.
func NewRun ¶
NewRun - Create a new scan.Run based on a tool (scanner) name, and with an optional Options type holding various settings to be customized for your use.
func (*Run) AddResult ¶
AddResult - Return a Result (which must be created with construtor: has mapped ID) This function takes care of matching anything against DB, populates various fields, and adds all of those into the Run object tree.
Note that when you call this function, if your scan makes use of the Result.Data field (used by custom/specific service scanner), we assume that it is correctly populated. You however have access to a few functions to manage the types you can put in this .Data
As for many other objects that you'll find as field in "request option structs", this Result can hold a host, service, port, etc. It is always advised to pass objects that are themselves coming from other tools/pipes, so as to keep track of them in complex workflows.
func (*Run) AddTarget ¶
AddTarget - Add a Target to the Scan. The fields are only checked when they are needed by the service probing stack used by the scan.
func (*Run) InitResult ¶
InitResult - Instantiate a new result that has the Run UUID in ref. The rest of the object can be populated by the user as he wishes.
type Target ¶
Target - This type can be used as an Input object to a scan, in which case only the Input fields matter to you
Represents how the target was specified when passed to nmap, its status and the reason of its status. Example: <target specification="domain.does.not.exist" status="skipped" reason="invalid"/>