Skip to content

Instantly share code, notes, and snippets.

@eballetbo
Created June 12, 2018 08:13
Show Gist options
  • Save eballetbo/f688373e67c8c36dd3442f99a4e97fd5 to your computer and use it in GitHub Desktop.
Save eballetbo/f688373e67c8c36dd3442f99a4e97fd5 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
echo "**** Scanning 192.168.0.228/255.255.0.0 ****"
ip addr add 192.168.0.228/255.255.0.0 dev eth0
nmap -T5 -sP --exclude 192.168.1.228 192.168.0-255.0-254
ip addr del 192.168.0.228/255.255.0.0 dev eth0
echo "**** Scanning 172.16.0.228/255.255.0.0 ****"
ip addr add 172.16.0.228/255.255.0.0 dev eth0
nmap -T5 -sP --exclude 172.16.0.228 172.16.0-255.0-255
ip addr del 172.16.0.228/255.255.0.0 dev eth0
echo "**** Scanning 10.0.0.0/255.0.0.0 ****"
ip addr add 10.0.0.228/255.0.0.0 dev eth0
nmap -T5 -sP --exclude 10.0.0.228 10.0-255.0-255.0-254
ip addr add 10.0.0.228/255.0.0.0 dev eth0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment