update
This commit is contained in:
parent
c8a5d1a426
commit
da0f433eae
@ -14,6 +14,10 @@ __all__ = ('ddsend_msg',)
|
||||
local_db = get_local_db('admin_game')
|
||||
dd_conf = local_db['game'].find_one() or {}
|
||||
|
||||
msg_set = set()
|
||||
|
||||
|
||||
|
||||
|
||||
def get_sign():
|
||||
timestamp = str(round(time.time() * 1000))
|
||||
@ -27,6 +31,13 @@ def get_sign():
|
||||
|
||||
|
||||
def ddsend_msg(msg):
|
||||
|
||||
hash_msg = hmac.new(msg.encode('utf-8'), digestmod=hashlib.sha256).digest()
|
||||
if hash_msg not in hash_msg:
|
||||
msg_set.add(hash_msg)
|
||||
else:
|
||||
return
|
||||
|
||||
data = {
|
||||
'msgtype': 'text',
|
||||
'text': {
|
||||
|
Loading…
Reference in New Issue
Block a user