Skip to content

Commit

Permalink
fix(panic): fix output panic
Browse files Browse the repository at this point in the history
  • Loading branch information
lc committed Nov 2, 2023
1 parent c146c22 commit 6dae657
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/output/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ func WriteURLs(writer io.Writer, results <-chan string, blacklistMap mapset.Set[
if err != nil {
continue
}
if blacklistMap.Contains(strings.ToLower(path.Ext(u.Path))) {
if path.Ext(u.Path) != "" && blacklistMap.Contains(strings.ToLower(path.Ext(u.Path))) {
continue
}
if RemoveParameters && !lastURL.Add(u.Host+u.Path) {

if RemoveParameters && !lastURL.Contains(u.Host+u.Path) {
continue
}
lastURL.Add(u.Host + u.Path)

buf.B = append(buf.B, []byte(result)...)
buf.B = append(buf.B, "\n"...)
Expand Down

0 comments on commit 6dae657

Please sign in to comment.