Skip to content

wildcard filter not work when RunEnumeration multi times #315

@runt0

Description

@runt0

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:

package main

import (
	"github.com/projectdiscovery/gologger"
	"github.com/projectdiscovery/shuffledns/pkg/runner"
)

func main() {
	// RunEnumeration first time
	options := runner.ShufflednsDefaultOptions()
	options.Domain = "eastmoney.cn"
	massdnsRunner, err := runner.New(options)
	if err != nil {
		gologger.Fatal().Msgf("Could not create runner: %s\n", err)
	}
	massdnsRunner.RunEnumeration()
	massdnsRunner.Close()

	// RunEnumeration second time
	options2 := runner.ShufflednsDefaultOptions()
	options2.Domain = "eastmoney.cn"
	massdnsRunner2, err := runner.New(options)
	if err != nil {
		gologger.Fatal().Msgf("Could not create runner: %s\n", err)
	}
	massdnsRunner2.RunEnumeration()
	massdnsRunner2.Close()
}

ShufflednsDefaultOptions:

func ShufflednsDefaultOptions() *Options {
	return &Options{
		Directory: "",
		//SubdomainsList:     "",
		ResolversFile:      "resolve.txt",
		Wordlist:           "words.txt",
		MassdnsPath:        "massdns.exe",
		Json:               false,
		Silent:             false,
		Version:            false,
		Retries:            5,
		Verbose:            true,
		NoColor:            false,
		Threads:            10000,
		MassdnsRaw:         "",
		WildcardThreads:    25,
		WildcardOutputFile: "",
		MassDnsCmd:         "",
		Stdin:              false,
		DisableUpdateCheck: false,
		StrictWildcard:     true,
	}
}

resolve.txt:

119.29.29.29
182.254.116.116
1.1.1.1
114.114.115.115
114.114.114.114
8.8.8.8
223.5.5.5
119.29.29.29

words.txt:

pop
imap
smtp
act
d
mail
test1
test2
test3
test4
test5
test6

frist output:
you can see the junk domains has been filtered
image

second output:
the filter not work
image

Anything else:

Metadata

Metadata

Assignees

Labels

Status: CompletedNothing further to be done with this issue. Awaiting to be closed.Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions