Skip to content

Instantly share code, notes, and snippets.

@jb0hn
Created September 16, 2018 16:46
Show Gist options
  • Save jb0hn/a5e7387a45e41d46e6f54521a2aec484 to your computer and use it in GitHub Desktop.
Save jb0hn/a5e7387a45e41d46e6f54521a2aec484 to your computer and use it in GitHub Desktop.
Scan LAN using nmap
#!/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