This file contains 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
import subprocess | |
import sched | |
import threading | |
from functools import partial | |
import time | |
from datetime import datetime | |
def ping( host, count=1, timeout=5): | |
count, timeout= map(str, (count, timeout)) | |
devnull= open("/dev/null","w") |
This file contains 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
'''this module implements two functions, send() and receive(), capable | |
of sending arbitrary objects through the network (with pickle), with | |
authentication and integrity assurance''' | |
import socket | |
try: | |
import cPickle as pickle | |
except ImportError: | |
import pickle | |
import hmac |