Skip to content

Instantly share code, notes, and snippets.

@cihanmehmet
Last active Sep 25, 2019
Embed
What would you like to do?
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