Created
May 25, 2017 16:15
-
-
Save mainframed/c77c6a27c43891743b0e7f50c995ba10 to your computer and use it in GitHub Desktop.
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
*rexx*/ | |
/*********************************************/ | |
/* REXX Script to Ping all hosts in class C */ | |
/* By: Soldier of Fortran (@mainframed767) */ | |
/*********************************************/ | |
trace "o" | |
PARSE SOURCE NAME | |
Say 'Enter /24 to scan (e.g 10.10.10):' | |
pull IP | |
DO OCTET = 1 TO 255 | |
IP_LOOP = IP||'.'||OCTET | |
Address System "ping -c 1 -m 1 -t 1" IP_LOOP with output stem out. error stem bad. | |
if rc = 0 then | |
say '--|- Address' IP_LOOP 'up' | |
else | |
say '--|- Address' IP_LOOP 'down' | |
END | |
say "ROAR!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very useful script. Thanks