Skip to content

Commit 92ea7fc

Browse files
committed
Fix extensions with query vars
1 parent cf7fdf2 commit 92ea7fc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/scan/url_scanner.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,12 @@ func (scanner *URLScanner) checkURL(job URLJob) *URLResult {
305305

306306
if !job.BasicOnly && !strings.Contains(job.URL, "/.htpasswd") && !strings.Contains(job.URL, "/.htaccess") {
307307
for _, ext := range scanner.backupExtensions {
308-
scanner.queue(URLJob{URL: job.URL + ext, BasicOnly: true})
308+
bUrl := job.URL + ext
309+
if strings.Contains(job.URL, "?") {
310+
bits := strings.SplitN(job.URL, "?", 2)
311+
bUrl = strings.Join(bits, ext+"?")
312+
}
313+
scanner.queue(URLJob{URL: bUrl, BasicOnly: true})
309314
}
310315
}
311316

0 commit comments

Comments
 (0)