feat: finish leak_d

This commit is contained in:
sangge 2023-11-02 00:33:16 +08:00
parent 1a75939e9c
commit 747b827ffc
4 changed files with 17 additions and 3 deletions

View File

@ -1,7 +1,7 @@
from Crypto.Util.number import * # type: ignore
from pwn import * # type: ignore
r = remote("localhost",10001)
r = remote("172.20.14.117",28471)
r.recvline()
n = r.recvline()
n = int(n.decode())

13
crypto/leak_d/dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM python:3.11
COPY requirements.txt /app/
COPY leak_d.py /app/
WORKDIR /app
RUN pip install -r requirements.txt -i https://mirrors.ustc.edu.cn/pypi/web/simple
EXPOSE 10001
CMD [ "python", "leak_d.py" ]

View File

@ -59,8 +59,8 @@ class ForkedServer(socketserver.ForkingMixIn, socketserver.TCPServer):
if __name__ == "__main__":
# flag = bytes(os.getenv("FLAG"),"utf-8")
flag = b"testflag"
flag = bytes(os.getenv("FLAG"),"utf-8")
#flag = b"testflag"
HOST, PORT = '0.0.0.0', 10001
server = ForkedServer((HOST, PORT), Task)
server.allow_reuse_address = True

View File

@ -0,0 +1 @@
pycryptodome