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

feat: auto-detect local CIDR using IP config #447

Open
ocervell opened this issue Oct 3, 2024 · 0 comments
Open

feat: auto-detect local CIDR using IP config #447

ocervell opened this issue Oct 3, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request workflows

Comments

@ocervell
Copy link
Contributor

ocervell commented Oct 3, 2024

It would be nice to quickly scan a local network that we are connect to with no targets (or a special target called 'localnet') that would find the local CIDR of the network we are connected to.

To do this, we can use:

netstat -rn # package net-tools

or

ip route show # available by default in Debian

and ignore docker-* (docker interface) and br-* (bridge interfaces)

We then need to 0-out the last bit before the /, i.e if the command returns 10.0.1.4/24, the CIDR range is 10.0.1.0/24

@ocervell ocervell self-assigned this Oct 3, 2024
@ocervell ocervell added workflows enhancement New feature or request labels Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request workflows
Projects
None yet
Development

No branches or pull requests

1 participant