Nmap output is now correctly logged

This commit is contained in:
Brendan LE GLAUNEC
2017-10-19 20:56:15 +02:00
committed by Brendan Le Glaunec
parent dba1391a08
commit 35d629d8ce
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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"))
}
}
+1 -1
View File
@@ -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 {