Skip to content

Commit

Permalink
Update WEF
Browse files Browse the repository at this point in the history
It now doesn't need python anymore (and thus no more gcc/make/python3-dev), except for one script, whose dependency is taken care of by a package
  • Loading branch information
tomdot-dev committed Dec 14, 2023
1 parent 090020d commit 052c35e
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,28 @@ RUN apt-get update && \
apt-get install git -y wget gcc python3-pip --no-install-recommends
RUN git clone https://github.com/D3Ext/WEF/
WORKDIR /WEF/
RUN bash setup.sh && \
RUN sed -i 's/dependencies=.*/dependencies=()/g' setup.sh && \
bash setup.sh && \
rm /opt/wef/update.sh /opt/wef/uninstaller.sh

FROM finchsec/kali:base
LABEL org.opencontainers.image.authors="thomas@finchsec.com"
ENV DISPLAY :0

# Copy files from builder
COPY --from=builder /WEF/requirements.txt /opt/wef/
COPY --from=builder /opt/wef /opt/wef
COPY wef.sh /usr/local/sbin/wef
RUN chmod +x /usr/local/sbin/wef

# Install python
# hadolint ignore=DL3008
RUN apt-get update && \
apt-get install python3-venv python3-pip -y --no-install-recommends && \
rm -rf /var/lib/dpkg/status-old /var/lib/apt/lists/*

# Add python venv
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

# hadolint ignore=DL3008,DL3015
RUN apt-get update && \
echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/force-unsafe-io && \
apt-get install hcxdumptool dnsmasq php hashcat-utils hcxtools pixiewps bully \
mdk4 aircrack-ng hostapd wget reaver libbluetooth-dev moreutils \
xterm macchanger crackle python3-bluez pciutils usbutils kmod \
$([ "$(uname -m)" = "x86_64" ] && echo intel-opencl-icd) lshw \
hashcat pocl-opencl-icd gcc python3-dev make lighttpd iptables -y && \
mdk4 aircrack-ng hostapd wget reaver moreutils lshw \
xterm macchanger pciutils usbutils kmod john hostapd-wpe \
$([ "$(uname -m)" = "x86_64" ] && echo intel-opencl-icd) \
hashcat pocl-opencl-icd lighttpd iptables python3-jinja2 -y && \
ln -s /usr/lib/hashcat-utils/cap2hccapx.bin /usr/bin/cap2hccapx && \
grep -v -E '^pybluez$' /opt/wef/requirements.txt > /tmp/requirements.txt && \
pip install --no-cache-dir -r /tmp/requirements.txt && \
apt-get purge gcc python3-dev make -y && \
apt-get autoremove -y && \
apt-get autoclean && \
rm -rf /var/lib/dpkg/status-old /etc/dpkg/dpkg.cfg.d/force-unsafe-io /var/lib/apt/lists/*

0 comments on commit 052c35e

Please sign in to comment.