Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { gorm.Model HostID int Addr string `xml:"addr,attr" gorm:"unique_index:idx_addr_type_vendor"` AddrType string `xml:"addrtype,attr" gorm:"unique_index:idx_addr_type_vendor"` Vendor string `xml:"vendor,attr" gorm:"unique_index:idx_addr_type_vendor"` }
Address ...
<address addr="127.0.0.1" addrtype="ipv4"/>
type Element ¶
type Element struct { gorm.Model ScriptID int Key string `xml:"key,attr"` Elem string `xml:",chardata" sql:"type:text"` }
Element ...
<elem key="type">ssh-rsa</elem>
type Hop ¶
type Hop struct { gorm.Model TraceID int TTL int `xml:"ttl,attr"` IPAddr string `xml:"ipaddr,attr"` RTT float32 `xml:"rtt,attr"` Host string `xml:"host,attr"` }
Hop ...
<hop ttl="1" ipaddr="127.0.0.1" rtt="0.34"/>
type Host ¶
type Host struct { gorm.Model Starttime int `xml:"starttime,attr"` Endtime int `xml:"endtime,attr"` Status Status `xml:"status"` StatusID int Addresses []Address `xml:"address"` Hostnames []Hostname `xml:"hostnames>hostname"` Ports []Port `xml:"ports>port"` OS OS `xml:"os"` OSID int Times Times `xml:"times"` TimesID int Trace Trace `xml:"trace"` TraceID int LastSeen time.Time }
Host holds all information about detected hosts
<host starttime="..." endtime="...">....</host>
func (*Host) BeforeCreate ¶
BeforeCreate sets the created_at, updated_at and last_seen date on the Host struct. This function is triggered by gorm
type Hostname ¶
type Hostname struct { gorm.Model HostID int Name string `xml:"name,attr"` Type string `xml:"type,attr"` }
Hostname ...
type OS ¶
type OS struct { gorm.Model Portused []Portused `xml:"portused"` OSMatch []OSMatch `xml:"osmatch"` OSFingerprint OSFingerprint `xml:"osfingerprint"` OSFingerprintID int }
OS ...
<os>...</os>
type OSClass ¶
type OSClass struct { gorm.Model OSMatchID int Type string `xml:"type,attr"` Vendor string `xml:"vendor,attr"` OSFamily string `xml:"osfamily,attr"` Accuracy int `xml:"accuracy,attr"` CPE []CPE `xml:"cpe"` }
OSClass ...
<osclass type="general purpose" vendor="Linux" osfamily="Linux" osgen="4.X" accuracy="100">...</osclass>
type OSFingerprint ¶
type OSFingerprint struct { gorm.Model Fingerprint string `xml:"fingerprint,attr" sql:"type:text"` }
OSFingerprint ...
type OSMatch ¶
type OSMatch struct { gorm.Model OSID int Name string `xml:"name,attr"` Accuracy int `xml:"accuracy,attr"` Line int `xml:"line,attr"` OSClass []OSClass `xml:"osclass"` }
OSMatch ...
<osmatch name="Linux 3.12 - 4.10" accuracy="100" line="63515">...</osmatch>
type Port ¶
type Port struct { gorm.Model HostID int Protocol string `xml:"protocol,attr"` PortID int `xml:"portid,attr"` State State `xml:"state"` StateID int Service Service `xml:"service"` ServiceID int Scripts []Script `xml:"script"` }
Port ...
<port protocol="tcp" portid="22">...</port>
type Portused ¶
type Portused struct { gorm.Model OSID int State string `xml:"state,attr"` Protocol string `xml:"proto,attr"` PortID int `xml:"portid,attr"` }
Portused ...
<portused state="open" proto="tcp" portid="22"/>
type Result ¶
type Result struct { Scanner string `xml:"scanner,attr"` // Information about the used scanner Args string `xml:"args,attr"` // The whole command including arguments Start uint32 `xml:"start,attr"` // Starttime Hosts []*Host `xml:"host"` // Slice of hosts }
Result ...
type Script ¶
type Script struct { gorm.Model PortID int ScriptID string `xml:"id,attr"` Output string `xml:"output,attr" sql:"type:text"` Elements []Element `xml:"elem"` }
Script ...
<script id="ssh-hostkey" output="
 .....">...</script>
type Service ¶
type Service struct { gorm.Model Name string `xml:"name,attr"` Product string `xml:"product,attr"` Version string `xml:"version,attr"` Method string `xml:"method,attr"` Conf int `xml:"conf,attr"` CPE []*CPE `xml:"cpe"` }
Service ...
<service name="http" product="nginx" version="1.13.12" method="probed" conf="10">...</service>
type State ¶
type State struct { gorm.Model State string `xml:"state,attr"` Reason string `xml:"reason,attr"` ReasonTTL int `xml:"reason_ttl,attr"` }
State ...
<state state="open" reason="syn-ack" reason_ttl="64"/>
type Status ¶
type Status struct { gorm.Model State string `xml:"state,attr"` Reason string `xml:"reason,attr"` ReasonTTL int `xml:"reason_ttl,attr"` }
Status holds information about its Hosts status
<status state="up" reason="localhost-response" reason_ttl="0"/>
Click to show internal directories.
Click to hide internal directories.