Skip to content

Instantly share code, notes, and snippets.

@cihanmehmet
Last active September 25, 2019 11:43
Show Gist options
  • Save cihanmehmet/444aa67b3c148d9f5edcfbc0839413e5 to your computer and use it in GitHub Desktop.
Save cihanmehmet/444aa67b3c148d9f5edcfbc0839413e5 to your computer and use it in GitHub Desktop.
nmap_sn.sh
#!/bin/bash
nmap -sn -iL $1 |grep "Nmap scan report for"|grep -Eo "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"|sort -u |tee $1.txt
echo "Detect IP $(wc -l $1.txt|awk '{ print $1 }' )" "=> result_${1}" "saved"
echo "File Location : "$(pwd)/"result_$1"
@cihanmehmet
Copy link
Author

cihanmehmet commented Sep 23, 2019

Nmap -sn (No port scan) scan live IP detection script

fping -f ip.txt

Usage bash ping.sh ip.txt

ping

See Also

https://github.com/cihanmehmet/sub.sh/blob/master/README.md

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