From 35d629d8cebe0b17260b4152c1eb28f627abdedb Mon Sep 17 00:00:00 2001 From: Brendan LE GLAUNEC Date: Thu, 19 Oct 2017 20:56:15 +0200 Subject: [PATCH] Nmap output is now correctly logged --- cameradar/cameradar.go | 4 ++-- discover.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cameradar/cameradar.go b/cameradar/cameradar.go index 7ea3007..db17b35 100644 --- a/cameradar/cameradar.go +++ b/cameradar/cameradar.go @@ -127,10 +127,10 @@ func prettyPrint(streams []cmrdr.Stream) { } else if success == 1 { fmt.Printf("%s Successful attack: %s device was accessed", green("\xE2\x9C\x94"), green(len(streams))) } else { - fmt.Printf("%s Streams were found but none were accessed. They are most likely configured with secure credentials and routes. You can try adding entries to the dictionary or generating your own in order to attempt a bruteforce attack on the cameras.", red("\xE2\x9C\x96")) + fmt.Printf("%s Streams were found but none were accessed. They are most likely configured with secure credentials and routes. You can try adding entries to the dictionary or generating your own in order to attempt a bruteforce attack on the cameras.\n", red("\xE2\x9C\x96")) } } else { - fmt.Printf("%s No streams were found. Please make sure that your target is on an accessible network.", red("\xE2\x9C\x96")) + fmt.Printf("%s No streams were found. Please make sure that your target is on an accessible network.\n", red("\xE2\x9C\x96")) } } diff --git a/discover.go b/discover.go index 1fb9f37..2c98359 100644 --- a/discover.go +++ b/discover.go @@ -78,7 +78,7 @@ func NmapRun(targets, ports, resultFilePath string, nmapSpeed int, enableLogs bo in := bufio.NewScanner(stdout) for in.Scan() { if enableLogs { - fmt.Printf(in.Text()) + fmt.Println(in.Text()) } } if err := in.Err(); err != nil {