Fix scan interval option (#246)

This commit is contained in:
Brendan Le Glaunec
2019-11-16 09:46:09 +01:00
committed by GitHub
parent 4aabf47a5d
commit 3f05737bf2
+2 -2
View File
@@ -79,7 +79,6 @@ func (s *Scanner) AttackCredentials(targets []Stream) []Stream {
// TODO: Perf Improvement: Skip cameras with no auth type detected, and set their // TODO: Perf Improvement: Skip cameras with no auth type detected, and set their
// CredentialsFound value to true. // CredentialsFound value to true.
go s.attackCameraCredentials(targets[i], resChan) go s.attackCameraCredentials(targets[i], resChan)
time.Sleep(s.attackInterval)
} }
attackResults := []Stream{} attackResults := []Stream{}
@@ -105,7 +104,6 @@ func (s *Scanner) AttackRoute(targets []Stream) []Stream {
for i := range targets { for i := range targets {
go s.attackCameraRoute(targets[i], resChan) go s.attackCameraRoute(targets[i], resChan)
time.Sleep(s.attackInterval)
} }
attackResults := []Stream{} attackResults := []Stream{}
@@ -157,6 +155,7 @@ func (s *Scanner) attackCameraCredentials(target Stream, resChan chan<- Stream)
resChan <- target resChan <- target
return return
} }
time.Sleep(s.attackInterval)
} }
} }
@@ -173,6 +172,7 @@ func (s *Scanner) attackCameraRoute(target Stream, resChan chan<- Stream) {
resChan <- target resChan <- target
return return
} }
time.Sleep(s.attackInterval)
} }
target.RouteFound = false target.RouteFound = false