diff options
author | makefu <github@syntax-fehler.de> | 2017-09-18 14:00:11 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2017-09-18 14:00:11 +0200 |
commit | f938442acfdcf6e201f876ffebc2d71755a082b8 (patch) | |
tree | f464922466f5c65e76dfa46f5a261f056f50426d | |
parent | 3afff20e1645afaac02817b719d55e344370a979 (diff) |
add re-implementation of gentoken
-rw-r--r-- | lol.py | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -0,0 +1,11 @@ +#!/usr/bin/env python3 +from datetime import datetime +from binascii import hexlify +import hmac +import hashlib +import base64 +secret = "ZhQCqoZp" +message= datetime.utcnow().strftime("%Y%m%d%H") + +dig = hmac.new(secret, msg=message, digestmod=hashlib.sha256).digest() +print(hexlify(dig).upper()) |