Created
November 14, 2013 15:58
-
-
Save itolosa/7469235 to your computer and use it in GitHub Desktop.
script para comprobar hosts prendidos en la red interna de la utfsm
This file contains hidden or 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
set $(ifconfig | sed -En 's/inet[ \t\n\r\f\v]*([0-9.]+)[ \t\n\r\f\v]*netmask[ \t\n\r\f\v]*([a-zA-Z0-9.]+)[ \t\n\r\f\v]*broadcast[ \t\n\r\f\v]*([0-9.]+)[ \t\n\r\f\v]*$/ \1 \2 \3/p') && nmap -sP -PA22 $1/20 | sed -En 's/^Nmap scan report for ([a-zA-Z0-9.]+) [(]([0-9.]+)[)]$/\1|\2/p' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment