MCPcopy Create free account
hub / github.com/Mashiro2000/HeyTapTask / checkHT

Function checkHT

Backup/BattleForHeyTap.py:243–254  ·  view source on GitHub ↗
(dic)

Source from the content-addressed store, hash-verified

241
242# 检测CK是否存在必备参数
243def checkHT(dic):
244 CK = dic['CK']
245 if len(re.findall(r'source_type=.*?;',CK)) == 0:
246 notify(f"{dic['user']}\tCK格式有误:可能缺少`source_type`字段")
247 return False
248 if len(re.findall(r'TOKENSID=.*?;',CK)) == 0:
249 notify(f"{dic['user']}\tCK格式有误:可能缺少`TOKENSID`字段")
250 return False
251 if len(re.findall(r'app_param=.*?[;]?',CK)) == 0:
252 notify(f"{dic['user']}\tCK格式有误:可能缺少`app_param`字段")
253 return False
254 return True
255
256# 兼容云函数
257def main_handler(event, context):

Callers 1

main_handlerFunction · 0.70

Calls 1

notifyFunction · 0.70

Tested by

no test coverage detected