diff --git a/attack.go b/attack.go index 0236342..1a590f9 100644 --- a/attack.go +++ b/attack.go @@ -247,7 +247,7 @@ func AttackCredentials(c Curler, targets []Stream, credentials Credentials, time } for _, result := range attackResults { - if result.CredentialsFound == true { + if result.CredentialsFound { targets = replace(targets, result) } } @@ -277,7 +277,7 @@ func AttackRoute(c Curler, targets []Stream, routes Routes, timeout time.Duratio } for _, result := range attackResults { - if result.RouteFound == true { + if result.RouteFound { targets = replace(targets, result) } } diff --git a/cameradar/cameradar.go b/cameradar/cameradar.go index 34ab9f8..c668837 100644 --- a/cameradar/cameradar.go +++ b/cameradar/cameradar.go @@ -140,7 +140,7 @@ func main() { // But some cameras run GST RTSP Server which prioritizes 401 over 404 contrary to most cameras. // For these cameras, running another route attack will solve the problem. for _, stream := range streams { - if stream.RouteFound == false || stream.CredentialsFound == false { + if !stream.RouteFound || !stream.CredentialsFound { updateSpinner(w, "Found "+fmt.Sprint(len(streams))+" streams. Final attack...", options.EnableLogs) streams, err = cmrdr.AttackRoute(c, streams, routes, time.Duration(options.Timeout)*time.Millisecond, options.EnableLogs) diff --git a/discover_test.go b/discover_test.go index 9a5e8cd..55856e9 100644 --- a/discover_test.go +++ b/discover_test.go @@ -400,7 +400,7 @@ func TestNmapParseResults(t *testing.T) { } } assert.Equal(t, true, foundStream, "wrong streams parsed") - if foundStream == false { + if !foundStream { fmt.Printf("%+v\n", results) } }