From 190ab6049cfb0a13a728364aafe4df487b7d373c Mon Sep 17 00:00:00 2001 From: boy-hack <34109680@qq.com> Date: Sun, 26 Apr 2020 10:46:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 13 +++++++------ README.md | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4d22aea..8c9250a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,14 @@ FROM python:3.8-alpine3.10 - MAINTAINER milktea@vmoe.info RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories -#RUN apk --no-cache add git -RUN apk --no-cache add git build-base libffi-dev libxml2-dev libxslt-dev libressl-dev -RUN git clone https://github.com/shmilylty/OneForAll +RUN apk update && apk --no-cache add git build-base libffi-dev libxml2-dev libxslt-dev libressl-dev +ADD . /OneForAll/ RUN pip install -r /OneForAll/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple - -WORKDIR /OneForAll +RUN git clone https://github.com/blechschmidt/massdns +WORKDIR /massdns +RUN make +RUN mv /massdns/bin/massdns /OneForAll/oneforall/thirdparty/massdns/massdns_linux_x86_64 +WORKDIR /OneForAll/oneforall ENTRYPOINT ["/bin/ash"] diff --git a/README.md b/README.md index 1376080..800cf81 100644 --- a/README.md +++ b/README.md @@ -122,8 +122,9 @@ docker run -it oneforall ```shell docker build -t oneforall . -docker run -it oneforall +docker run -it -v ~/results:/OneForAll/oneforall/results oneforall ``` +结果会输出在本地目录`~/results` **✨使用演示** From 55326f01db13cefa36926b3259c2de8392484485 Mon Sep 17 00:00:00 2001 From: boy-hack <34109680@qq.com> Date: Sun, 26 Apr 2020 11:17:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 7 ++++--- README.md | 2 +- oneforall/common/utils.py | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8c9250a..7579f49 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,12 +3,13 @@ MAINTAINER milktea@vmoe.info RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories RUN apk update && apk --no-cache add git build-base libffi-dev libxml2-dev libxslt-dev libressl-dev -ADD . /OneForAll/ -RUN pip install -r /OneForAll/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple +ADD requirements.txt /requirements.txt +RUN pip install -r /requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple RUN git clone https://github.com/blechschmidt/massdns WORKDIR /massdns RUN make +ADD . /OneForAll/ RUN mv /massdns/bin/massdns /OneForAll/oneforall/thirdparty/massdns/massdns_linux_x86_64 WORKDIR /OneForAll/oneforall -ENTRYPOINT ["/bin/ash"] +ENTRYPOINT ["/bin/ash"] \ No newline at end of file diff --git a/README.md b/README.md index 800cf81..67f4d61 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ docker run -it oneforall ```shell docker build -t oneforall . -docker run -it -v ~/results:/OneForAll/oneforall/results oneforall +docker run -it --rm -v ~/results:/OneForAll/oneforall/results oneforall ``` 结果会输出在本地目录`~/results` diff --git a/oneforall/common/utils.py b/oneforall/common/utils.py index 2c299f9..eb61890 100644 --- a/oneforall/common/utils.py +++ b/oneforall/common/utils.py @@ -515,8 +515,8 @@ def call_massdns(massdns_path, dict_path, ns_path, output_path, log_path, f'--processes {process_num} --socket-count {socket_num} ' \ f'--hashmap-size {concurrent_num} --resolvers {ns_path} ' \ f'--resolve-count {resolve_num} --type {query_type} ' \ - f'--flush --output J --outfile {output_path} --drop-group ' \ - f'--drop-user --error-log {log_path} {dict_path}' + f'--flush --output J --outfile {output_path} ' \ + f'--error-log {log_path} {dict_path}' logger.log('INFOR', f'执行命令 {cmd}') subprocess.run(args=cmd, shell=True) logger.log('INFOR', f'结束执行massdns')