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)