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

introduce -exclude flag #1517

Merged
merged 4 commits into from
Jan 7, 2024
Merged

introduce -exclude flag #1517

merged 4 commits into from
Jan 7, 2024

Conversation

dogancanbakir
Copy link
Member

Closes #1427

go run . -exclude 'cdn,private-ips,http://*scanme.sh,443,1.0.0.0/24' -u http://scanme.sh,127.0.0.1,scanme.sh:443,projectdiscovery.io,example.com -v  

    __    __  __       _  __
   / /_  / /_/ /_____ | |/ /
  / __ \/ __/ __/ __ \|   /
 / / / / /_/ /_/ /_/ /   |
/_/ /_/\__/\__/ .___/_/|_|
             /_/

                projectdiscovery.io

[INF] Current httpx version v1.3.7 (latest)
[DBG] Skipping private host 127.0.0.1
[DBG] Failed '127.0.0.1': target has a private ip and will only connect within same local network
[DBG] Skipping URL matching exclude regex: http://scanme.sh
[DBG] Failed 'http://scanme.sh': url matches an exclude regex
[DBG] Skipping cdn target: projectdiscovery.io:
[DBG] Failed 'projectdiscovery.io': cdn target only allows ports 80 and 443
https://example.com
[DBG] Skipping excluded port: scanme.sh:443
[DBG] Failed 'scanme.sh:443': port is in the exclude list

@dogancanbakir dogancanbakir self-assigned this Jan 4, 2024
Copy link
Member

@Mzack9999 Mzack9999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like that most of the logic is already implemented within fastdialer/networkpolicy, it's enough to pass the Allow/Deny list (the only case not handled is ASN expansion). In order to make the CLI more readable maybe we can consider accepting an input file as well between the potential values and consider each line as an exclusion item. What do you think?

@Mzack9999 Mzack9999 linked an issue Jan 7, 2024 that may be closed by this pull request
@Mzack9999 Mzack9999 self-requested a review January 7, 2024 20:20
@Mzack9999 Mzack9999 merged commit ea7a785 into dev Jan 7, 2024
11 checks passed
@Mzack9999 Mzack9999 deleted the introduce_exclude_flag branch January 7, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend exclude pattern functionality
2 participants