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

Ignore invalid domain from file list #42

Open
MC874 opened this issue May 8, 2022 · 4 comments
Open

Ignore invalid domain from file list #42

MC874 opened this issue May 8, 2022 · 4 comments
Labels
good first issue This issue or pull request is well-defined and good for newcomers improvement This issue or pull request will add new or improve existing functionality

Comments

@MC874
Copy link

MC874 commented May 8, 2022

💡 Summary

Ignore invalid domain by skipping it and queries onto the next line and avoid the tool from exitting because of an exception.

Motivation and context

This would be very usefull when scanning a giant list of domain. A better context is when the file-list is an output result from another domain scanner and it has wildcard domain that will trigger an invalid domain exception. Instead of redo the scanning, skipping really save a lot of time.

Implementation notes

Could be created as a new parameter -ig or --ignore

@jsf9k jsf9k added good first issue This issue or pull request is well-defined and good for newcomers improvement This issue or pull request will add new or improve existing functionality labels May 9, 2022
@S4lt5
Copy link

S4lt5 commented Oct 26, 2022

Can someone provide a specific test case where this occurs? I'd like to take a crack at fixing some of these...

@S4lt5
Copy link

S4lt5 commented Oct 27, 2022

I see now, adding one *.domain.com or other invalid entry just aborts the whole run. Having a "we skipped these results" output would be pretty reasonable.

@S4lt5
Copy link

S4lt5 commented Oct 28, 2022

I'm working on a PR for this, but there's a lot of overhaul in general needed here. I'm going to try and keep it minimal, but for example there's really no concept of returning error codes in the output. You either have a CDN or any other case. I'm going to try to work in some basic status reporting for each domain query to give a "these domains had errors" output.

I'd like to make a pass through this if I can sometime soon and just clean up some redundancy. I think Chef and DomainPot should just not exist and it would make things a lot less confusing.

@S4lt5
Copy link

S4lt5 commented Nov 21, 2022

OK. I am back to findcdn this week so I made some changes here..

findcdn list "*.domain.com"
0 Domains Validated.
1 domain(s) rejected, listed below:
	*.domain.com
0it [00:00, ?it/s]
{
    "date": "11/21/2022, 11:44:09",
    "cdn_count": "0",
    "domains": {},
    "invalid_domains": [
        "*.domain.com"
    ]
}
Domain processing completed.
0 domains had CDN's out of 1.```

```console
1 Domains Validated.
2 domain(s) rejected, listed below:
	*.foo.bar
	wildcard domain
[Pending: 0 jobs]==[Threads: 1]: 100%|████████████████████████████████████████████████████| 1/1 [00:01<00:00,  1.26s/it]
{
    "date": "11/21/2022, 11:44:53",
    "cdn_count": "1",
    "domains": {
        "cisa.gov": {
            "IP": "'104.117.51.217'",
            "cdns": "'.edgekey.net', '.akamaitechnologies.fr'",
            "cdns_by_names": "'Akamai', 'Akamai'"
        }
    },
    "invalid_domains": [
        "*.foo.bar",
        "wildcard domain"
    ]
}
Domain processing completed.
1 domains had CDN's out of 3.

PR Incoming. I still think this needs a big rewrite to get rid of the unnecessary complexity (it's really hard for me to follow the call chain!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue This issue or pull request is well-defined and good for newcomers improvement This issue or pull request will add new or improve existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants