-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (46 loc) · 2.37 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
sudo: false
env:
global:
- MONGODB_VERSION=2.6.10
language: python
python:
- 2.7
install:
# use MongoDB 2.6 without sudo
# https://gist.github.com/roidrage/14e45c24b5a134e1f165
- wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-$MONGODB_VERSION.tgz
- tar xfz mongodb-linux-x86_64-$MONGODB_VERSION.tgz
- export PATH=`pwd`/mongodb-linux-x86_64-$MONGODB_VERSION/bin:$PATH
- mkdir -p data/db
- mongod --dbpath=data/db >/dev/null 2>&1 &
# Wait for MongoDB
# https://github.com/travis-ci/travis-ci/issues/2246#issuecomment-51685471
- until nc -z localhost 27017 ; do echo Waiting for MongoDB; sleep 1; done
- pip install .
- pip install -r requirements.txt
# 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
## 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/ && python tests.py