fix: fix missing white list

This commit is contained in:
2023-10-16 19:19:41 +08:00
parent ce6d793bcb
commit 597a62998b

View File

@@ -53,6 +53,7 @@ class Task(socketserver.BaseRequestHandler):
Shannon = [truth] * (15 - lie_count) + [lie] * lie_count
# 猜猜第几次是在说谎 :-)
shuffle(Shannon)
white_list = ['==', '(', ')', 'C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', '0', '1', 'and', 'or', 'not']
for i in range(15):
self.send(b"Ask Shannon:")
question = self.recv().decode().strip() # 输入问题
@@ -91,7 +92,7 @@ if __name__ == "__main__":
#flag = bytes(os.getenv("FLAG"),"utf-8") # type: ignore
# 白名单列表,包含允许在问题中使用的关键词和符号
white_list = ['==', '(', ')', 'C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', '0', '1', 'and', 'or', 'not']
HOST, PORT = '0.0.0.0', 10011
HOST, PORT = '0.0.0.0', 10010
server = ForkedServer((HOST, PORT), Task)
server.allow_reuse_address = True
print(HOST, PORT)