Skip to content

Commit 86e0145

Browse files
authored
Merge pull request #178 from mitre/release/2.0.0rc1
v2.0 release
2 parents 3576699 + 36e2e44 commit 86e0145

184 files changed

Lines changed: 4367 additions & 28145 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.pre-commit-config.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
- repo: git@github.com:pre-commit/pre-commit-hooks
2-
sha: v1.2.0
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v1.4.0
34
hooks:
45
- id: end-of-file-fixer
56
- id: trailing-whitespace
@@ -8,5 +9,5 @@
89
- id: mixed-line-ending
910
- id: flake8
1011
args:
11-
- --ignore=E126,E127,E128,E402
12+
- --ignore=E126,E127,E128,E402,F841
1213
- --max-line-length=120

.travis.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
1+
dist: xenial
12
sudo: required
23
language: python
34
python:
45
- "2.7"
5-
- "3.4"
66
- "3.5"
77
- "3.6"
8+
- "3.7"
89
env:
910
- MOZ_HEADLESS=1
1011
addons:
1112
firefox: latest
13+
apt:
14+
# Keep these in sync with the dependencies from the install.sh script
15+
packages:
16+
- build-essential
17+
- curl
18+
- dh-autoreconf
19+
- gcc
20+
- libffi-dev
21+
- libfuzzy-dev
22+
- python-dev
23+
- git
24+
- libssl-dev
25+
- unzip
26+
- libmagic-dev
1227
before_install:
1328
- npm install -g geckodriver
1429
install:
15-
- yes "" | sudo -HE ./install.sh
16-
- pip install -r requirements.txt
17-
- python multiscanner.py init
30+
- pip install -U pip setuptools
31+
- pip install tox-travis pre-commit
1832
script:
19-
- flake8 --exit-zero .
20-
- pytest
33+
- tox
34+
- pre-commit run --all-files

MANIFEST.in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
graft multiscanner
2+
recursive-exclude * __pycache__
3+
recursive-exclude * *.py[co]
4+
recursive-exclude multiscanner\tests *
5+
6+
recursive-include docs
7+
include README.md
8+
include LICENSE
9+
include AUTHORS
10+
include requirements.txt
11+
include requirements-dev.txt
12+
include requirements-test.txt
13+
include install.sh

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Then run the following (substituting the actual file you want to scan for `<file
3636
$ git clone https://github.com/mitre/multiscanner.git
3737
$ cd multiscanner
3838
$ sudo -HE ./install.sh
39-
$ python multiscanner.py init
39+
$ multiscanner init
4040
```
4141

4242
This will generate a default configuration for you. Check `config.ini` to see what
@@ -45,13 +45,13 @@ modules are enabled. See [Configuration](http://multiscanner.readthedocs.io/en/l
4545
Now you can scan a file (substituting the actual file you want to scan for `<file>`):
4646

4747
``` bash
48-
$ python multiscanner.py <file>
48+
$ multiscanner <file>
4949
```
5050

5151
You can run the following to get a list of all of MultiScanner's command-line options:
5252

5353
``` bash
54-
$ python multiscanner.py --help
54+
$ multiscanner --help
5555
```
5656

5757
**Note**: If you are not on a RedHat or Debian based Linux distribution, instead of

__init__.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

docker-compose.yml

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3'
22
services:
33
elastic:
4-
image: "docker.elastic.co/elasticsearch/elasticsearch:5.6.3"
4+
image: "docker.elastic.co/elasticsearch/elasticsearch:6.3.2"
55
ports:
66
- "9200:9200"
77
- "9300:9300"
@@ -12,36 +12,16 @@ services:
1212
web:
1313
build:
1414
context: .
15-
dockerfile: docker_utils/Dockerfile_web
16-
# If you are behind a proxy, you must uncomment
17-
# the next 3 lines
18-
# args:
19-
# - http_proxy
20-
# - https_proxy
15+
dockerfile: docker_utils/Dockerfile
16+
command: multiscanner-web
2117
ports:
2218
- "127.0.0.1:8000:8000"
23-
# If you are behind a proxy, you must set the
24-
# proxy settings here (uncomment the next 4 lines)
25-
# environment:
26-
# - "http_proxy=http://proxy.example:80"
27-
# - "https_proxy=http://proxy.example:80"
28-
# - "no_proxy=localhost,127.0.0.1"
2919
api:
3020
build:
3121
context: .
32-
dockerfile: docker_utils/Dockerfile_api
33-
# If you are behind a proxy, you must uncomment
34-
# the next 3 lines
35-
# args:
36-
# - http_proxy
37-
# - https_proxy
22+
dockerfile: docker_utils/Dockerfile
23+
command: /wait-for-it.sh elastic:9200 -- multiscanner-api
3824
ports:
3925
- "127.0.0.1:8080:8080"
40-
# If you are behind a proxy, you must set the
41-
# proxy settings here (uncomment the next 4 lines)
42-
# environment:
43-
# - "http_proxy=http://proxy.example:80"
44-
# - "https_proxy=http://proxy.example:80"
45-
# - "no_proxy=localhost,127.0.0.1"
4626
depends_on:
4727
- elastic

docker_utils/Dockerfile

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
FROM alpine
2+
MAINTAINER Patrick Copeland ptcnop
3+
4+
ENV YARA_VERSION 3.8.1
5+
ENV YARA_PY_VERSION 3.8.1
6+
ENV SSDEEP ssdeep-2.13
7+
8+
COPY requirements.txt /opt/multiscanner/
9+
10+
RUN apk add --no-cache \
11+
bash \
12+
bison \
13+
file \
14+
jansson \
15+
jpeg \
16+
libffi \
17+
python3 \
18+
su-exec \
19+
tini \
20+
zip \
21+
zlib \
22+
&& apk add --no-cache -t .build-deps \
23+
autoconf \
24+
automake \
25+
build-base \
26+
file-dev \
27+
flex \
28+
git \
29+
jansson-dev \
30+
jpeg-dev \
31+
libc-dev \
32+
libffi-dev \
33+
libtool \
34+
musl-dev \
35+
postgresql-dev \
36+
py3-pip \
37+
python3-dev \
38+
zlib-dev \
39+
# ssdeep
40+
&& echo "Install ssdeep from source..." \
41+
&& cd /tmp \
42+
&& wget -O /tmp/$SSDEEP.tar.gz https://downloads.sourceforge.net/project/ssdeep/$SSDEEP/$SSDEEP.tar.gz \
43+
&& tar zxvf $SSDEEP.tar.gz \
44+
&& cd $SSDEEP \
45+
&& ./configure \
46+
&& make \
47+
&& make install \
48+
# yara
49+
&& echo "Install Yara from source..." \
50+
&& cd /tmp/ \
51+
&& git clone --recursive --branch v$YARA_VERSION https://github.com/VirusTotal/yara.git \
52+
&& cd /tmp/yara \
53+
&& ./bootstrap.sh \
54+
&& sync \
55+
&& ./configure --with-crypto \
56+
--enable-magic \
57+
--enable-cuckoo \
58+
--enable-dotnet \
59+
&& make \
60+
&& make install \
61+
&& echo "Install yara-python..." \
62+
&& cd /tmp/ \
63+
&& git clone --recursive --branch v$YARA_PY_VERSION https://github.com/VirusTotal/yara-python \
64+
&& cd yara-python \
65+
&& python3 setup.py build --dynamic-linking \
66+
&& python3 setup.py install \
67+
&& echo "Downloading yara signatures..." \
68+
&& git clone --depth 1 https://github.com/Yara-Rules/rules.git /opt/multiscanner/etc/yarasigs/Yara-Rules \
69+
# install ms dependencies
70+
&& cd /opt/multiscanner \
71+
&& pip3 install --upgrade pip \
72+
&& pip3 install -r requirements.txt \
73+
# clean up
74+
&& rm -rf /tmp/* \
75+
&& apk del --purge .build-deps
76+
77+
COPY . /opt/multiscanner
78+
COPY ./docker_utils/*.ini /opt/multiscanner/
79+
COPY ./etc/pdf_config.json /opt/multiscanner/
80+
COPY ./etc/ember_model_2017.txt /opt/multiscanner/etc/ember/
81+
82+
WORKDIR /opt/multiscanner
83+
84+
RUN pip3 install .
85+
86+
RUN wget https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh -O /wait-for-it.sh \
87+
&& chmod +x /wait-for-it.sh
88+
89+
# Run script
90+
CMD multiscanner

docker_utils/Dockerfile_api

Lines changed: 0 additions & 16 deletions
This file was deleted.

docker_utils/Dockerfile_web

Lines changed: 0 additions & 13 deletions
This file was deleted.

docker_utils/api_config.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ host_string = localhost
2323
db_name = task_db
2424
username = multiscanner
2525
password = CHANGEME
26+
retry_time = 5
27+
retry_num = 20

0 commit comments

Comments
 (0)