From c93308391a65a18f5e1229613c07bfd9187a8a3a Mon Sep 17 00:00:00 2001 From: sangge <2251250136@qq.com> Date: Tue, 17 Oct 2023 11:00:15 +0800 Subject: [PATCH] fix: update --- xiaosai/Claude_Shannon/dockerfile | 2 +- xiaosai/Claude_Shannon/main_local.py | 1 - xiaosai/Claude_Shannon/main_remote.py | 4 +++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/xiaosai/Claude_Shannon/dockerfile b/xiaosai/Claude_Shannon/dockerfile index 2f647a8..3d931c8 100644 --- a/xiaosai/Claude_Shannon/dockerfile +++ b/xiaosai/Claude_Shannon/dockerfile @@ -1,4 +1,4 @@ -FROM python:latest +FROM python:3.11 COPY flag.py /app/ diff --git a/xiaosai/Claude_Shannon/main_local.py b/xiaosai/Claude_Shannon/main_local.py index 6c0dd40..3bdf623 100644 --- a/xiaosai/Claude_Shannon/main_local.py +++ b/xiaosai/Claude_Shannon/main_local.py @@ -1,6 +1,5 @@ from random import choice as c from random import randint, shuffle -from Crypto.Util.number import * # type: ignore flag = b"flag{this_is_a_test_flag}" diff --git a/xiaosai/Claude_Shannon/main_remote.py b/xiaosai/Claude_Shannon/main_remote.py index 767e45f..5c6bfe1 100644 --- a/xiaosai/Claude_Shannon/main_remote.py +++ b/xiaosai/Claude_Shannon/main_remote.py @@ -33,8 +33,10 @@ class Task(socketserver.BaseRequestHandler): C0, C1, C2, C3, C4, C5, C6 = chests r = eval(expr) except Exception as e: - self.send(b"Shannon fails to understand your words.\n") self.send(e) + self.send(b"Shannon fails to understand your words.\n") + print(f"Exception: {e}") # Debug print + print(f"Failed expression: {expr}") # Debug print exit(0) return ans(r)