Add IP address to scan results (#602)

This commit is contained in:
Teppei Fukuda
2018-02-19 12:50:00 +09:00
committed by Kota Kanbe
parent 562ff7807d
commit 7a5793c562
12 changed files with 239 additions and 2 deletions

View File

@@ -82,6 +82,23 @@ func (o *alpine) apkUpdate() error {
return nil
}
func (o *alpine) preCure() error {
if err := o.detectIPAddr(); err != nil {
o.log.Debugf("Failed to detect IP addresses: %s", err)
}
// Ignore this error as it just failed to detect the IP addresses
return nil
}
func (o *alpine) postScan() error {
return nil
}
func (o *alpine) detectIPAddr() (err error) {
o.ServerInfo.IPv4Addrs, o.ServerInfo.IPv6Addrs, err = o.ip()
return err
}
func (o *alpine) scanPackages() error {
if err := o.apkUpdate(); err != nil {
return err