Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys,time,struct,hmac
- from socket import gethostbyname, inet_aton, socket, AF_INET, SOCK_DGRAM
- from Crypto.Hash import SHA256
- m = hmac.new(sys.argv[1], digestmod=SHA256)
- m.update(inet_aton(gethostbyname(sys.argv[2])))
- m.update(struct.pack("i", (int)(time.time() / 60)))
- s = socket(AF_INET, SOCK_DGRAM)
- s.connect((sys.argv[3], (int)(sys.argv[4])))
- s.send(m.hexdigest())
- s.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement