fix(portscan): ignore loopback address on remote scan (#1062)

* change ignore loop back address on remote scan

* fix test case

* change append simple

* fix format

* set golangci-lint timeout

* Revert "set golangci-lint timeout"

This reverts commit 56b1c7089a.
This commit is contained in:
Norihiro NAKAOKA
2020-10-23 16:40:03 +09:00
committed by GitHub
parent 83bcca6e66
commit edb324c3d9
3 changed files with 35 additions and 34 deletions

View File

@@ -635,15 +635,12 @@ func GetScanResults(scannedAt time.Time, timeoutSec int) (results models.ScanRes
if err = o.scanLibraries(); err != nil {
return xerrors.Errorf("Failed to scan Library: %w", err)
}
if err = o.scanPorts(); err != nil {
return xerrors.Errorf("Failed to scan Ports: %w", err)
}
return nil
}, timeoutSec)
for _, s := range servers {
if err = s.scanPorts(); err != nil {
util.Log.Errorf("Failed to scan Ports: %+v", err)
}
}
hostname, _ := os.Hostname()
ipv4s, ipv6s, err := util.IP()
if err != nil {