diff --git a/internal/attack/rtsp_url_test.go b/internal/attack/rtsp_url_test.go index ebd13d1..fe0167e 100644 --- a/internal/attack/rtsp_url_test.go +++ b/internal/attack/rtsp_url_test.go @@ -19,6 +19,7 @@ func TestBuildRTSPURL(t *testing.T) { route string username string password string + secure bool wantURL string }{ { @@ -74,6 +75,20 @@ func TestBuildRTSPURL(t *testing.T) { username: "user", wantURL: "rtsp://user:@192.168.0.10:554/stream", }, + { + name: "secure rtsps scheme without credentials", + route: "stream", + secure: true, + wantURL: "rtsps://192.168.0.10:554/stream", + }, + { + name: "secure rtsps scheme with credentials", + route: "stream", + username: "admin", + password: "password", + secure: true, + wantURL: "rtsps://admin:password@192.168.0.10:554/stream", + }, } for _, test := range tests {