Last active
September 25, 2019 11:43
-
-
Save cihanmehmet/444aa67b3c148d9f5edcfbc0839413e5 to your computer and use it in GitHub Desktop.
nmap_sn.sh
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 | |
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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nmap -sn (No port scan) scan live IP detection script
fping -f ip.txt
Usage
bash ping.sh ip.txt
See Also