mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 04:16:45 +01:00
cleanup
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
parent
ae31e7f249
commit
d57f4f0145
|
@ -60,6 +60,17 @@ func main() {
|
|||
go func(ip string) {
|
||||
defer wg.Done()
|
||||
|
||||
scanIP(ip)
|
||||
}(ip.String())
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
|
||||
since := time.Since(startTime)
|
||||
logrus.Infof("Scan took: %s", since.String())
|
||||
}
|
||||
|
||||
func scanIP(ip string) {
|
||||
for port := beginPort; port <= endPort; port++ {
|
||||
// Check if the port is open.
|
||||
ok := portOpen(ip, port)
|
||||
|
@ -84,13 +95,6 @@ func main() {
|
|||
ip, port,
|
||||
info.Net.Organization.Handle, info.Net.Organization.Name, info.Net.Organization.Reference)
|
||||
}
|
||||
}(ip.String())
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
|
||||
since := time.Since(startTime)
|
||||
logrus.Infof("Scan took: %s", since.String())
|
||||
}
|
||||
|
||||
func portOpen(ip string, port int) bool {
|
||||
|
|
Loading…
Reference in New Issue
Block a user