daily pastebin goal
65%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import subprocess as sp
  2.  
  3. ip = "216.52.241.254"
  4. status,result = sp.getstatusoutput("ping -c1 -w2 " + ip)
  5.  
  6. if status == 0:
  7.     print("System " + ip + " is UP !")
  8. else:
  9.     print("System " + ip + " is DOWN !")
  10.  
  11. print(result)
RAW Paste Data
Top