Guest User

Server Check Script

a guest
Feb 24th, 2013
36
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/python2
  2.  
  3. import socket
  4.  
  5. #address = "25.29.221.36"
  6. address = "menche.servegame.com"
  7. port = 30005
  8.  
  9. try:
  10. sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  11. sock.settimeout(2.5)
  12. buf = "\x4f\x45\x74\x03\x00\x00\x00\x01"
  13. sock.sendto(buf, (address, port))
  14. data, addr = sock.recvfrom(1000)
  15. if data:
  16. peer_id = data[12:14]
  17. buf = "\x4f\x45\x74\x03" + peer_id + "\x00\x00\x03"
  18. sock.sendto(buf, (address, port))
  19. sock.close()
  20. print("up")
  21. else:
  22. print("down")
  23. except:
  24. print("down")
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×