Created
September 16, 2018 16:46
-
-
Save jb0hn/a5e7387a45e41d46e6f54521a2aec484 to your computer and use it in GitHub Desktop.
Scan LAN using nmap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# init variables | |
nmapOutput='' | |
# declare variables | |
localIP='192.168.0.*' | |
logFileName='scanLAN.log' | |
function main(){ | |
# header | |
date | |
printf '#####################################################################\n' | |
# body | |
nmap -sn $localIP | |
# footer | |
printf '\n#####################################################################\n\n' | |
} | |
main | |
main >> $logFileName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment