Skip to content
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

Add support for ipv6 ranges #59

Open
Mzack9999 opened this issue Jan 23, 2023 · 2 comments
Open

Add support for ipv6 ranges #59

Mzack9999 opened this issue Jan 23, 2023 · 2 comments
Labels
Type: Enhancement Most issues will probably ask for additions or changes.

Comments

@Mzack9999
Copy link
Member

Description

Only ipv4 cidrs are supported via regex extraction

@Mzack9999 Mzack9999 added the Type: Enhancement Most issues will probably ask for additions or changes. label Jan 23, 2023
@iamargus95
Copy link

@Mzack9999,
Could you provide some examples of ipv6 addresses that I can put into test cases.
I have a draft PR to which I'd like to add the test cases : Draft PR

@ShubhamRasal ShubhamRasal linked a pull request Apr 10, 2023 that will close this issue
@brenocss
Copy link
Contributor

brenocss commented May 5, 2023

After Check() accepts IPv6, we could add something like this here. @tarunKoyalwar

https://github.com/projectdiscovery/cdncheck/blob/main/cdncheck.go#L119

	if dnsResponse.AAAA != nil {
		for _, ip := range dnsResponse.AAAA {
			ipAddr := net.ParseIP(ip)
			if ipAddr == nil {
				continue
			}
			matched, value, itemType, err := c.Check(ipAddr)
			if err != nil {
				return false, "", "", err
			}
			if matched {
				return matched, value, itemType, nil
			}
		}
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants