Closed runt0 closed 3 months ago
Maybe I found the reason:the pkg/wildcards/resolver.go:33
,the code to genrate resolver is:
// AddServersFromList adds the resolvers from a list of servers
func (w *Resolver) AddServersFromList(list []string) {
for i := 0; i < len(list); i++ {
list[i] = list[i] + ":53"
}
w.servers, _ = transport.New(list...)
}
when the first RunEnumeration run, the excellentResolvers slice will be changed. So RunEnumeration again,the resolves will be 1.1.1.1:53:53, 1.1.1.1:53:53:53 and so on
So I change the code and it work correctly
// AddServersFromList adds the resolvers from a list of servers
func (w *Resolver) AddServersFromList(list []string) {
var resolvers []string
for i := 0; i < len(list); i++ {
resolvers = append(resolvers, list[i]+":53")
}
w.servers, _ = transport.New(resolvers...)
}
and I notice the pkg/massdns/massdns.go:61
:
it use
resolver.AddServersFromList(excellentResolvers)
to generate resolvers, but shuffledns must be input resolvers.txt, but I didn't saw the use of ResolversFile, maybe the code shoud be this ?
shuffledns version:
v1.0.9
Current Behavior:
wildcard filter not work when RunEnumeration multi times
Expected Behavior:
wildcard filter should be work when RunEnumeration multi times
Steps To Reproduce:
cmd/shuffledns/main.go:
ShufflednsDefaultOptions:
resolve.txt:
words.txt:
frist output: you can see the junk domains has been filtered![image](https://github.com/projectdiscovery/shuffledns/assets/42031559/4259d589-6e5b-4453-a12d-843e03e238f2)
second output: the filter not work![image](https://github.com/projectdiscovery/shuffledns/assets/42031559/7fb2fc28-296b-492d-b842-5f8e447ac31b)
Anything else: