forked from ivre/ivre
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
62 lines (54 loc) · 2.64 KB
/
.travis.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
sudo: false
env:
# PostgreSQL
- DB=postgres POSTGRES_VERSION=9.5.6
- DB=postgres POSTGRES_VERSION=9.6.2
# MongoDB
## Previous releases
- DB=mongo MONGODB_VERSION=2.6.12
- DB=mongo MONGODB_VERSION=3.0.14
- DB=mongo MONGODB_VERSION=3.2.12
## Current stable
- DB=mongo MONGODB_VERSION=3.4.2
## Development release
- DB=mongo MONGODB_VERSION=3.5.3
language: python
python:
- 2.6
- 2.7
install:
- source ./.travis/install_${DB}.sh
- pip install $PIP_INSTALL_OPTIONS .
- pip install $PIP_INSTALL_OPTIONS -r requirements-$DB.txt
- test "$TRAVIS_PYTHON_VERSION" = 2.6 && pip install unittest2 || true
- pip install $PIP_INSTALL_OPTIONS coverage codecov
# We need MongoDB 2.6
# https://github.com/travis-ci/travis-ci/issues/2246
#services: mongodb
before_script:
# init DB
- ivre ipinfo --init < /dev/null
- ivre scancli --init < /dev/null
- ivre ipdata --init < /dev/null
- echo "DEBUG = True" >> ~/.ivre.conf
# install p0f & Bro (.tar files)
- for archive in tools-travis-ivre bro-2.3.2_ubuntu-12.04 ; do wget http://pierre.droids-corp.org/p0rn/${archive}.tar.bz2 -O - | tar jxf - ; done
- export PATH="`pwd`/tools/bin:`pwd`/usr/local/bro/bin:$PATH"
- export LD_LIBRARY_PATH="`pwd`/tools/lib:`pwd`/usr/local/bro/lib"
- export BROPATH=".:`pwd`/usr/local/bro/share/bro:`pwd`/usr/local/bro/share/bro/policy:`pwd`/usr/local/bro/share/bro/site"
- cp tools/etc/p0f/* tests/
# get samples
- mkdir tests/samples
- cp tests/results-public-samples tests/samples/results
## Nmap Internet-wide Modbus scan (JSON format)
- wget -O tests/samples/Nmap-Modbus-IPv4.json.bz2 http://pierre.droids-corp.org/p0rn/Nmap-Modbus-IPv4.json.bz2 # JSON files w/ Nmap scan results
## Masscan sample scans (XML format)
- for file in test-probe-ike-ipsec-nat-t-probe-U4500.xml.bz2 test-probe-ike-probe-U500.xml.bz2 test-T22.xml.bz2 ; do wget "http://pierre.droids-corp.org/p0rn/$file" -O "tests/samples/$file" ; done
## PCAP files from the Wireshark project
- wget -O tests/samples/http.pcap "https://wiki.wireshark.org/SampleCaptures?action=AttachFile&do=get&target=http.cap"
- wget -O tests/samples/telnet-raw.pcap "https://wiki.wireshark.org/SampleCaptures?action=AttachFile&do=get&target=telnet-raw.pcap"
- wget -O - "https://wiki.wireshark.org/SampleCaptures?action=AttachFile&do=get&target=imap.cap.gz" | zcat > tests/samples/imap.pcap
- for file in telnet-raw.pcap nb6-startup.pcap nb6-http.pcap nb6-telephone.pcap nb6-hotspot.pcap ; do wget "https://wiki.wireshark.org/SampleCaptures?action=AttachFile&do=get&target=$file" -O "tests/samples/$file" ; done
script: cd tests/ && travis_wait 60 python tests.py --coverage
after_success:
- codecov