daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 52 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top