Skip to content

Commit 5428fda

Browse files
committed
Fix Dockerfile
Modify python version in Dockerfile to 3.11 to use the tomllib module Fix typo in cli.py Signed-off-by: Amalia Ionescu <[email protected]>
1 parent 1a7bd03 commit 5428fda

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

automatic_exploit_generation/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ def exploit(
7676
"The exploiter could generate an exploit with the outcome of"
7777
f" {generated_exploit.outcome.name} and the following payloads:"
7878
)
79-
8079
for payload in generated_exploit.payloads:
8180
print(f"- For {payload.input_stream.name}:\n")
8281
hexdump.hexdump(payload.content)
8382
print("")
83+
8484
else:
85-
print("The exploiter coudn't generate any exploit.")
85+
print("The exploiter couldn't generate any exploit.")
8686

8787

8888
@cli.command(help="Get suitable exploiters for a binary.")

docker/Dockerfile.zeratool_lib

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
1-
FROM python:3.10
1+
FROM python:3.11
22

33
# Install and configure Poetry
44
RUN pip3 install poetry
55

66
# Setup the convertor from pyproject.toml to requirements.txt
7-
RUN pip3 install click toml
7+
RUN pip3 install click toml tomli
88
RUN wget https://raw.githubusercontent.com/jla524/requirements/main/requirements/convert.py -O /convert.py
99

1010
# Convert Zeratool's dependencies
1111
COPY /docker/zeratool_lib /zeratool_lib
12-
RUN python3 /convert.py --noversion /zeratool_lib
12+
RUN python3 /convert.py --no-version /zeratool_lib
1313
RUN mv /zeratool_lib/requirements.txt /requirements.zeratool_lib.txt
1414

1515
# Copies service's dependencies
1616
COPY /docker/requirements.txt /requirements.service.txt
1717

1818
# Convert module's dependencies
1919
COPY /pyproject.toml /pyproject.toml
20-
RUN python3 /convert.py --noversion /
20+
RUN python3 /convert.py --no-version /
2121
RUN mv /requirements.txt /requirements.aeg.txt
2222

23+
# Download the commons library
24+
RUN git clone https://github.com/CyberReasoningSystem/commons /commons
25+
2326
# Install all dependencies
2427
RUN pip3 install -r /requirements.service.txt
2528
RUN pip3 install -r /requirements.aeg.txt
@@ -30,9 +33,6 @@ COPY /automatic_exploit_generation /automatic_exploit_generation
3033
COPY /docker/protobuf /protobuf
3134
COPY /docker/zeratool_lib_service.py /zeratool_lib_service.py
3235

33-
# Download the commons library
34-
RUN git clone https://github.com/CyberReasoningSystem/commons /commons
35-
3636
# Set PYTHONPATH
3737
ENV PYTHONPATH=/zeratool_lib/zeratool_lib:/protobuf:/automatic_exploit_generation:/commons
3838

0 commit comments

Comments
 (0)