From 8c487705232c46cd2706ff877f549cb11eb4d391 Mon Sep 17 00:00:00 2001 From: sangge <2251250136@qq.com> Date: Thu, 2 Nov 2023 09:11:00 +0800 Subject: [PATCH] feat: finish easy maze --- misc/easy_maze/crack.py | 2 +- misc/easy_maze/dockerfile | 7 +++++++ misc/easy_maze/easy_maze.py | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 misc/easy_maze/dockerfile diff --git a/misc/easy_maze/crack.py b/misc/easy_maze/crack.py index 96f51d8..f2b5cc5 100644 --- a/misc/easy_maze/crack.py +++ b/misc/easy_maze/crack.py @@ -14,7 +14,7 @@ for i in range(19): map[i][18] = 9 -r = remote('localhost',10001) +r = remote("172.20.14.117",46828) r.recvline() diff --git a/misc/easy_maze/dockerfile b/misc/easy_maze/dockerfile new file mode 100644 index 0000000..06971d1 --- /dev/null +++ b/misc/easy_maze/dockerfile @@ -0,0 +1,7 @@ +FROM python:3.11 + +COPY easy_maze.py /app/ + +WORKDIR /app + +CMD [ "python", "easy_maze.py" ] \ No newline at end of file diff --git a/misc/easy_maze/easy_maze.py b/misc/easy_maze/easy_maze.py index 578fedc..9018457 100644 --- a/misc/easy_maze/easy_maze.py +++ b/misc/easy_maze/easy_maze.py @@ -151,8 +151,8 @@ class ForkedServer(socketserver.ForkingMixIn, socketserver.TCPServer): if __name__ == "__main__": - # flag = bytes(os.getenv("FLAG"),"utf-8") - flag = b'11111111111111' + flag = bytes(os.getenv("FLAG"),"utf-8") + # flag = b'11111111111111' HOST, PORT = '0.0.0.0', 10001 server = ForkedServer((HOST, PORT), Task) server.allow_reuse_address = True