Skip to content

Instantly share code, notes, and snippets.

@itolosa
Created November 14, 2013 15:58
Show Gist options
  • Save itolosa/7469235 to your computer and use it in GitHub Desktop.
Save itolosa/7469235 to your computer and use it in GitHub Desktop.
script para comprobar hosts prendidos en la red interna de la utfsm
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