fix: revert credAttack since redirect will already have happened

This commit is contained in:
Jake Daynes
2026-03-13 02:53:46 -07:00
parent 4535a38ad8
commit d3a51c18c0
2 changed files with 2 additions and 5 deletions
+1
View File
@@ -1,3 +1,4 @@
module github.com/Ullaakut/cameradar/v6
go 1.25.3
+1 -5
View File
@@ -317,17 +317,13 @@ func (a Attacker) credAttack(ctx context.Context, stream cameradar.Stream, usern
return false, fmt.Errorf("building rtsp url: %w", err)
}
code, headers, err := a.probeDescribeHeaders(ctx, u, urlStr)
code, err := a.describeStatus(u)
if err != nil {
return false, fmt.Errorf("performing describe request at %q: %w", urlStr, err)
}
a.reporter.Debug(cameradar.StepAttackCredentials, fmt.Sprintf("DESCRIBE %s RTSP/1.0 > %d", urlStr, code))
if code == base.StatusMovedPermanently {
a.handleRedirect(&stream, headers)
}
return code == base.StatusOK || code == base.StatusNotFound, nil
}