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

Function checkHT

TimingCash.py:151–162  ·  view source on GitHub ↗
(dic)

Source from the content-addressed store, hash-verified

149
150# 检测CK是否存在必备参数
151def checkHT(dic):
152 CK = dic['CK']
153 if len(re.findall(r'source_type=.*?;',CK)) == 0:
154 notify(f"{dic['user']}\tCK格式有误:可能缺少`source_type`字段")
155 return False
156 if len(re.findall(r'TOKENSID=.*?;',CK)) == 0:
157 notify(f"{dic['user']}\tCK格式有误:可能缺少`TOKENSID`字段")
158 return False
159 if len(re.findall(r'app_param=.*?[;]?',CK)) == 0:
160 notify(f"{dic['user']}\tCK格式有误:可能缺少`app_param`字段")
161 return False
162 return True
163
164# 兼容云函数
165def main_handler(event, context):

Callers 1

main_handlerFunction · 0.70

Calls 1

notifyFunction · 0.70

Tested by

no test coverage detected