-
Notifications
You must be signed in to change notification settings - Fork 302
feat: support auto wildcard detection across multiple domains #960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
17191a6
7b718df
58f8584
9ba00e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| dnsx | ||
| cmd/dnsx/dnsx | ||
| .DS_Store | ||
| dist/ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,18 +9,19 @@ require ( | |
| github.com/miekg/dns v1.1.62 | ||
| github.com/pkg/errors v0.9.1 | ||
| github.com/projectdiscovery/asnmap v1.1.1 | ||
| github.com/projectdiscovery/cdncheck v1.2.13 | ||
| github.com/projectdiscovery/cdncheck v1.1.36 | ||
| github.com/projectdiscovery/clistats v0.1.1 | ||
| github.com/projectdiscovery/goconfig v0.0.1 | ||
| github.com/projectdiscovery/goflags v0.1.74 | ||
| github.com/projectdiscovery/gologger v1.1.62 | ||
| github.com/projectdiscovery/hmap v0.0.98 | ||
| github.com/projectdiscovery/mapcidr v1.1.97 | ||
| github.com/projectdiscovery/ratelimit v0.0.82 | ||
| github.com/projectdiscovery/retryabledns v1.0.111 | ||
| github.com/projectdiscovery/utils v0.7.3 | ||
| github.com/projectdiscovery/gologger v1.1.56 | ||
| github.com/projectdiscovery/hmap v0.0.90 | ||
| github.com/projectdiscovery/mapcidr v1.1.34 | ||
| github.com/projectdiscovery/ratelimit v0.0.81 | ||
| github.com/projectdiscovery/retryabledns v1.0.102 | ||
| github.com/projectdiscovery/utils v0.4.20 | ||
| github.com/rs/xid v1.5.0 | ||
| github.com/stretchr/testify v1.11.1 | ||
| golang.org/x/net v0.47.0 | ||
|
Comment on lines
+12
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ Verification inconclusiveScript executed: #!/bin/bash
# Check git history for these dependency versions to determine if this is a revert
echo "=== Checking cdncheck version history ==="
git log --all --oneline -S 'github.com/projectdiscovery/cdncheck v1.1.36' -- go.mod | head -5
echo ""
echo "=== Checking utils version history ==="
git log --all --oneline -S 'github.com/projectdiscovery/utils v0.4.20' -- go.mod | head -5
echo ""
echo "=== Checking retryabledns version history ==="
git log --all --oneline -S 'github.com/projectdiscovery/retryabledns v1.0.102' -- go.mod | head -5
echo ""
echo "=== Checking recent go.mod changes on dev branch ==="
git log --oneline origin/dev -- go.mod | head -10Repository: projectdiscovery/dnsx Repository: projectdiscovery/dnsx Script executed: # First, let's read the go.mod file to confirm the versions
head -30 go.modRepository: projectdiscovery/dnsx Repository: projectdiscovery/dnsx stdout: Script executed: # Check the full go.mod file to see all dependencies
wc -l go.modRepository: projectdiscovery/dnsx Repository: projectdiscovery/dnsx stdout: Script executed: # Search for usage of the key downgraded libraries in the codebase
rg "github.com/projectdiscovery/utils" --type go -A 2 | head -30Repository: projectdiscovery/dnsx Repository: projectdiscovery/dnsx stdout: Script executed: # Check for usage of retryabledns
rg "retryabledns" --type go -B 2 -A 2 | head -30Repository: projectdiscovery/dnsx Repository: projectdiscovery/dnsx stdout: Script executed: # Look for any PR description or comments explaining the downgrades
find . -name "*.md" -type f -exec grep -l "downgrade\|version\|dependency" {} \; | head -10Repository: projectdiscovery/dnsx Repository: projectdiscovery/dnsx stdout: Script executed: # Check the current branch and recent commits
git status
git log -5 --onelineRepository: projectdiscovery/dnsx Repository: projectdiscovery/dnsx stdout: Script executed: # Check if there's a PR template or description
find . -name "*.md" -type f | xargs grep -l "auto wildcard\|publicsuffix" 2>/dev/null | head -5Repository: projectdiscovery/dnsx Repository: projectdiscovery/dnsx Script executed: # Check the actual PR or branch information
git log --all --oneline --graph | head -20Repository: projectdiscovery/dnsx Repository: projectdiscovery/dnsx stdout: Script executed: # Look for any comments in go.mod about version choices
cat go.mod | grep -A 2 -B 2 "utils\|retryabledns\|cdncheck"Repository: projectdiscovery/dnsx Repository: projectdiscovery/dnsx stdout: Script executed: # Check if there's a go.sum that might give us hints about why these versions were chosen
grep "github.com/projectdiscovery/utils" go.sum | head -10Repository: projectdiscovery/dnsx Repository: projectdiscovery/dnsx stdout: Script executed: # Show the previous version of go.mod to see what was before
git show HEAD~1:go.mod | grep -E "utils|retryabledns|cdncheck" | head -10Repository: projectdiscovery/dnsx Repository: projectdiscovery/dnsx stderr: Script executed: # Check git blame or history for when these were last downgraded
git log --all --oneline --follow -- go.mod | head -20Repository: projectdiscovery/dnsx Repository: projectdiscovery/dnsx stdout: Script executed: # Show detailed diff of the go.mod changes in this commit
git show HEAD -- go.mod | head -80Repository: projectdiscovery/dnsx Repository: projectdiscovery/dnsx stdout: Undocumented dependency downgrades: Verify these versions are intentional and compatible. This commit updates golang.org/x modules to newer versions but simultaneously downgrades 7 projectdiscovery/* packages without documentation:
The commit message only mentions golang.org/x updates and does not explain these downgrades. They appear to be unintentional side effects from Go's dependency resolver. Confirm that these downgraded versions are:
🤖 Prompt for AI Agents |
||
| ) | ||
|
|
||
| require ( | ||
|
|
@@ -82,12 +83,12 @@ require ( | |
| github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect | ||
| github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect | ||
| github.com/projectdiscovery/blackrock v0.0.1 // indirect | ||
| github.com/projectdiscovery/fastdialer v0.4.19 // indirect | ||
| github.com/projectdiscovery/fastdialer v0.4.1 // indirect | ||
| github.com/projectdiscovery/freeport v0.0.7 // indirect | ||
| github.com/projectdiscovery/machineid v0.0.0-20240226150047-2e2c51e35983 // indirect | ||
| github.com/projectdiscovery/networkpolicy v0.1.31 // indirect | ||
| github.com/projectdiscovery/retryablehttp-go v1.1.0 // indirect | ||
| github.com/refraction-networking/utls v1.7.1 // indirect | ||
| github.com/projectdiscovery/networkpolicy v0.1.1 // indirect | ||
| github.com/projectdiscovery/retryablehttp-go v1.0.111 // indirect | ||
| github.com/refraction-networking/utls v1.6.7 // indirect | ||
| github.com/rivo/uniseg v0.4.7 // indirect | ||
| github.com/rogpeppe/go-internal v1.12.0 // indirect | ||
| github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d // indirect | ||
|
|
@@ -98,16 +99,16 @@ require ( | |
| github.com/therootcompany/xz v1.0.1 // indirect | ||
| github.com/tidwall/btree v1.6.0 // indirect | ||
| github.com/tidwall/buntdb v1.3.0 // indirect | ||
| github.com/tidwall/gjson v1.18.0 // indirect | ||
| github.com/tidwall/gjson v1.14.4 // indirect | ||
| github.com/tidwall/grect v0.1.4 // indirect | ||
| github.com/tidwall/match v1.1.1 // indirect | ||
| github.com/tidwall/pretty v1.2.1 // indirect | ||
| github.com/tidwall/rtred v0.1.2 // indirect | ||
| github.com/tidwall/tinyqueue v0.1.1 // indirect | ||
| github.com/tklauser/go-sysconf v0.3.12 // indirect | ||
| github.com/tklauser/numcpus v0.6.1 // indirect | ||
| github.com/ulikunitz/xz v0.5.15 // indirect | ||
| github.com/weppos/publicsuffix-go v0.40.3-0.20250408071509-6074bbe7fd39 // indirect | ||
| github.com/ulikunitz/xz v0.5.12 // indirect | ||
| github.com/weppos/publicsuffix-go v0.30.1 // indirect | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent: Downgrading publicsuffix-go while adding publicsuffix-based feature. This PR enhances 🤖 Prompt for AI Agents |
||
| github.com/yuin/goldmark v1.7.4 // indirect | ||
| github.com/yuin/goldmark-emoji v1.0.3 // indirect | ||
| github.com/yusufpapurcu/wmi v1.2.4 // indirect | ||
|
|
@@ -118,9 +119,8 @@ require ( | |
| go.uber.org/multierr v1.11.0 // indirect | ||
| go4.org v0.0.0-20230225012048-214862532bf5 // indirect | ||
| golang.org/x/crypto v0.45.0 // indirect | ||
| golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect | ||
| golang.org/x/exp v0.0.0-20230420155640-133eef4313cb // indirect | ||
| golang.org/x/mod v0.29.0 // indirect | ||
| golang.org/x/net v0.47.0 // indirect | ||
| golang.org/x/oauth2 v0.27.0 // indirect | ||
| golang.org/x/sync v0.18.0 // indirect | ||
| golang.org/x/sys v0.38.0 // indirect | ||
|
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| package runner | ||
|
|
||
| import ( | ||
| "testing" | ||
| "github.com/stretchr/testify/require" | ||
| ) | ||
|
|
||
| func TestExtractDomain(t *testing.T) { | ||
| tests := []struct { | ||
| input string | ||
| expected string | ||
| }{ | ||
| {"example.com", "example.com"}, | ||
| {"sub.example.com", "example.com"}, | ||
| {"foo.bar.co.uk", "bar.co.uk"}, | ||
| {"api.service.com.au", "service.com.au"}, | ||
| {"foo.example.com.", "example.com"}, | ||
| {"https://sub.example.com/path", "example.com"}, | ||
| {"http://foo.bar.co.uk:8080", "bar.co.uk"}, | ||
| } | ||
|
|
||
| for _, tc := range tests { | ||
| got := extractDomain(tc.input) | ||
| require.Equal(t, tc.expected, got, "input: %s", tc.input) | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: projectdiscovery/dnsx
Length of output: 4247
Investigate why retryabledns was downgraded from v1.0.111 to v1.0.102.
The downgrade spans 9 patch versions, which could revert bug fixes. API compatibility has been confirmed—v1.0.102 includes all required Options struct fields (BaseResolvers, MaxRetries, Hostsfile, Proxy, Timeout) and the NewWithOptions() function signature. However, the downgrade itself is unusual and suggests either a regression in v1.0.103+ or a workaround. Clarify the reason for this change to avoid introducing unforeseen issues or technical debt.
🤖 Prompt for AI Agents