Skip to content

Commit ddbbfb2

Browse files
authored
fix: patch peframe tostring() for Python 3.9+ compatibility (#3621) (#3625)
* fix: patch peframe tostring() for Python 3.9+ compatibility (#3621) * add comment explaining peframe tostring patch
1 parent 7d5cdb6 commit ddbbfb2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

integrations/malware_tools_analyzers/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,12 @@ RUN if [[ $TARGETARCH == "amd64" ]]; then \
6060
# Build guelfo's PEFrame
6161
WORKDIR ${PROJECT_PATH}/peframe
6262
COPY requirements/peframe-requirements.txt ./
63+
# peframe-ds 6.1.0 uses array.tostring() which was removed in Python 3.9+, patch it after install
6364
RUN python3 -m venv venv \
6465
&& . venv/bin/activate \
6566
&& pip3 install --no-cache-dir --upgrade pip \
66-
&& pip3 install --no-cache-dir -r peframe-requirements.txt --no-cache-dir
67+
&& pip3 install --no-cache-dir -r peframe-requirements.txt --no-cache-dir \
68+
&& sed -i 's/\.tostring()/\.tobytes()/g' venv/lib/python3.*/site-packages/peframe/modules/features.py
6769

6870
# Install guelfo's artifacts
6971
# there is no version management on this project so we just pull the most recent changes

0 commit comments

Comments
 (0)