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

Keep specific hostname when adding domain-based network alert #168

Open
achillean opened this issue Apr 15, 2022 · 3 comments
Open

Keep specific hostname when adding domain-based network alert #168

achillean opened this issue Apr 15, 2022 · 3 comments

Comments

@achillean
Copy link
Owner

If a user runs a command such as:

shodan alert domain www.shodan.io

Then the CLI will create a domain-based network alert for shodan.io. However, it should create a network alert for just www.shodan.io which is how the Shodan Monitor website operates.

@rmhowe425
Copy link
Contributor

@achillean Is this issue still something that you would like to be added to the Shodan CLI?

@achillean
Copy link
Owner Author

Yes, but we probably need to add something like tldextract as a dependency to identify whether the user is setting up a specific hostname. The workflow would look something like:

  1. Parse the domain with tldextract
  2. Check if the provided domain has a subdomain
  3. If it has a subdomain then lookup the IPv4 and IPv6 addresses for the hostname and use that for the list of IPs. If it doesn't have a subdomain then grab the list of IPs from DNSDB; i.e. what we're currently doing.
  4. Create the new asset group with the list of IPs

@rmhowe425
Copy link
Contributor

Understood! I'll work on this!

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

No branches or pull requests

2 participants