Skip to content

Instantly share code, notes, and snippets.

@mezerotm
Created October 3, 2017 11:50
Show Gist options
  • Save mezerotm/eea5d8676098b13243fe1a5fcde720da to your computer and use it in GitHub Desktop.
Save mezerotm/eea5d8676098b13243fe1a5fcde720da to your computer and use it in GitHub Desktop.
Does a basic linux network scan.
function network() {
ip_address="$(ip route get 8.8.8.8 | tr -s ' ' | cut -d' ' -f7)"
echo "$(ip -c -br address)"
echo
echo "$(ip -c -br link)"
echo
echo "$(route)"
echo
echo "$(nmap $ip_address)"
}
@mezerotm
Copy link
Author

mezerotm commented Oct 3, 2017

I plan to expand this out more with flags to allow for a more detailed report of the whole network. Within the subnet which you reside in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment