From 3f05737bf2f1ec78a8b9184bd4b93a3ea68003b7 Mon Sep 17 00:00:00 2001 From: Brendan Le Glaunec Date: Sat, 16 Nov 2019 09:46:09 +0100 Subject: [PATCH] Fix scan interval option (#246) --- attack.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/attack.go b/attack.go index f9ec546..67bc02a 100644 --- a/attack.go +++ b/attack.go @@ -79,7 +79,6 @@ func (s *Scanner) AttackCredentials(targets []Stream) []Stream { // TODO: Perf Improvement: Skip cameras with no auth type detected, and set their // CredentialsFound value to true. go s.attackCameraCredentials(targets[i], resChan) - time.Sleep(s.attackInterval) } attackResults := []Stream{} @@ -105,7 +104,6 @@ func (s *Scanner) AttackRoute(targets []Stream) []Stream { for i := range targets { go s.attackCameraRoute(targets[i], resChan) - time.Sleep(s.attackInterval) } attackResults := []Stream{} @@ -157,6 +155,7 @@ func (s *Scanner) attackCameraCredentials(target Stream, resChan chan<- Stream) resChan <- target return } + time.Sleep(s.attackInterval) } } @@ -173,6 +172,7 @@ func (s *Scanner) attackCameraRoute(target Stream, resChan chan<- Stream) { resChan <- target return } + time.Sleep(s.attackInterval) } target.RouteFound = false