From d233fd850e0ed6426defd9e332a7e663bd6ba3f1 Mon Sep 17 00:00:00 2001 From: Brendan Le Glaunec Date: Sat, 30 Nov 2019 16:57:27 +0100 Subject: [PATCH] Update nmap dependency to v2.0.0 (#250) --- go.mod | 2 +- go.sum | 4 ++-- scan.go | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index a5ee63d..58677ef 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/PuerkitoBio/goquery v1.5.0 github.com/Ullaakut/disgo v0.3.1 github.com/Ullaakut/go-curl v0.0.0-20190525093431-597e157bbffd - github.com/Ullaakut/nmap v0.0.0-20191020025340-830f10551944 + github.com/Ullaakut/nmap v2.0.0+incompatible github.com/VividCortex/ewma v1.1.1 // indirect github.com/fatih/color v1.7.0 // indirect github.com/mattn/go-colorable v0.1.2 // indirect diff --git a/go.sum b/go.sum index e0ed82f..b4ad037 100644 --- a/go.sum +++ b/go.sum @@ -8,8 +8,8 @@ github.com/Ullaakut/disgo v0.3.1 h1:BGGVHynji41KGuGI02ztTCnILRvyzlvmiCRl5bBpjKk= github.com/Ullaakut/disgo v0.3.1/go.mod h1:/CSvpnYVSKOeh2dvUvx9cXshzz2t7T1/lRO/MrFj3fI= github.com/Ullaakut/go-curl v0.0.0-20190525093431-597e157bbffd h1:CMe+dX1CL4pCXNytxIB2U1qp0xZObGMZosJhaQdUlUo= github.com/Ullaakut/go-curl v0.0.0-20190525093431-597e157bbffd/go.mod h1:u8mVgpDT88IPIt1B+Tu8vkrcFfBKGcfGwS9I7wmvMh0= -github.com/Ullaakut/nmap v0.0.0-20191020025340-830f10551944 h1:DNJrYrcmJHFhjxXuxDqYIlnH3jK1ohjSzEHlI/mk+tc= -github.com/Ullaakut/nmap v0.0.0-20191020025340-830f10551944/go.mod h1:fkC066hwfcoKwlI7DS2ARTggSVtBTZYCjVH1TzuTMaQ= +github.com/Ullaakut/nmap v2.0.0+incompatible h1:tNXub052dsnG8+yrgpph9nhVixIBdpRRgzvmQoc8eBA= +github.com/Ullaakut/nmap v2.0.0+incompatible/go.mod h1:fkC066hwfcoKwlI7DS2ARTggSVtBTZYCjVH1TzuTMaQ= github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM= github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= diff --git a/scan.go b/scan.go index 077ea62..7ed407c 100644 --- a/scan.go +++ b/scan.go @@ -35,11 +35,15 @@ func (s *Scanner) Scan() ([]Stream, error) { } func (s *Scanner) scan(nmapScanner nmap.ScanRunner) ([]Stream, error) { - results, err := nmapScanner.Run() + results, warnings, err := nmapScanner.Run() if err != nil { return nil, s.term.FailStepf("error while scanning network: %v", err) } + for _, warning := range warnings { + s.term.Infoln("[Nmap Warning]", warning) + } + // Get streams from nmap results. var streams []Stream for _, host := range results.Hosts {