Skip to content

Commit

Permalink
fix prefix,suffix, ext, bak not work bug
Browse files Browse the repository at this point in the history
  • Loading branch information
M09Ic committed Jun 23, 2024
1 parent 0d24501 commit 784776e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions internal/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,11 @@ func (opt *Option) PrepareRunner() (*Runner, error) {

if len(opt.Suffixes) != 0 {
mask.SpecialWords["suffix"] = opt.Suffixes
opt.Word += "{@suffix}"
opt.Word += "{?@suffix}"
}
if len(opt.Prefixes) != 0 {
mask.SpecialWords["prefix"] = opt.Prefixes
opt.Word = "{@prefix}" + opt.Word
opt.Word = "{?@prefix}" + opt.Word
}

if opt.ForceExtension && opt.Extensions != "" {
Expand All @@ -356,7 +356,7 @@ func (opt *Option) PrepareRunner() (*Runner, error) {
}
}
mask.SpecialWords["ext"] = exts
opt.Word += "{@ext}"
opt.Word += "{?@ext}"
}

r.Wordlist, err = mask.Run(opt.Word, dicts, nil)
Expand Down
4 changes: 2 additions & 2 deletions internal/pool/brutepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ func (pool *BrutePool) addFuzzyBaseline(bl *pkg.Baseline) {

func (pool *BrutePool) doBak() {
defer pool.wg.Done()
worder, err := words.NewWorderWithDsl("{?0}.{@bak_ext}", [][]string{pkg.BakGenerator(pool.url.Host)}, nil)
worder, err := words.NewWorderWithDsl("{?0}.{?@bak_ext}", [][]string{pkg.BakGenerator(pool.url.Host)}, nil)
if err != nil {
return
}
Expand All @@ -722,7 +722,7 @@ func (pool *BrutePool) doBak() {
})
}

worder, err = words.NewWorderWithDsl("{@bak_name}.{@bak_ext}", nil, nil)
worder, err = words.NewWorderWithDsl("{?@bak_name}.{?@bak_ext}", nil, nil)
if err != nil {
return
}
Expand Down

0 comments on commit 784776e

Please sign in to comment.