Skip to content

Instantly share code, notes, and snippets.

@mainframed
Created May 25, 2017 16:15
Show Gist options
  • Save mainframed/c77c6a27c43891743b0e7f50c995ba10 to your computer and use it in GitHub Desktop.
Save mainframed/c77c6a27c43891743b0e7f50c995ba10 to your computer and use it in GitHub Desktop.
*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!"
@JonasMatos0
Copy link

Very useful script. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment