-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
42 lines (34 loc) · 1.72 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM alpine
ENV LANG=zh_CN.UTF-8 \
LC_ALL=zh_CN.UTF-8 \
DISPLAY=:99
COPY docker-items/d99net.reg /tmp/d99net.reg
COPY docker-items/override.reg /tmp/override.reg
COPY docker-items/run-xvfb /usr/local/bin/run-xvfb
RUN echo "x86" > /etc/apk/arch && \
chmod +x /usr/local/bin/run-xvfb && \
apk add --no-cache wine xvfb wget unzip ncurses-libs cabextract
RUN WINEARCH=win32 wine wineboot && \
mkdir /tmp/mdac && \
wget https://download.microsoft.com/download/4/a/a/4aafff19-9d21-4d35-ae81-02c48dcbbbff/MDAC_TYP.EXE -O /tmp/mdac/mdac.exe && \
cd /tmp/mdac && cabextract mdac.exe && cabextract *.cab && rm -rf *.cab && cp * /root/.wine/drive_c/windows/system32/ && \
# for unknown reason `regsvr32` run under Dockerfile and /bin/sh will make different results...
# So that i directly copied ``system.reg``
rm -rf /tmp/mdac && cd /
ENV WEBSHELLKILL_URL=http://d99net.net/down/WebShellKill_V2.0.9.zip \
WEBSHELLKILLCLI_URL=https://github.com/zsxsoft/webshellkill-cli/releases/download/0.0.3/WebShellKillCLI.zip \
DISPLAY=:99
COPY docker-items/run.sh /usr/local/bin/webshellkill
# This system.reg is generated by
# cd /tmp/mdac && for i in *.dll; do wine regsvr32 "c:\\windows\\system32\\$i"; echo $i; done
COPY docker-items/system.reg /root/.wine/system.reg
RUN wine regedit.exe /s /tmp/d99net.reg && \
wine regedit.exe /s /tmp/override.reg && \
wget $WEBSHELLKILL_URL -O /root/webshellkill.zip && \
wget $WEBSHELLKILLCLI_URL -O /root/webshellkillcli.zip && \
cd /root && LC_ALL=zh_CN.UTF-8 unzip /root/webshellkill.zip && \
unzip /root/webshellkillcli.zip && \
rm /root/webshellkill.zip && \
rm /root/webshellkillcli.zip && \
chmod +x /usr/local/bin/webshellkill
ENTRYPOINT ["webshellkill"]