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
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:
or
and ignore
docker-*
(docker interface) andbr-*
(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