forked from JonathanSalwan/Triton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
120 lines (107 loc) · 5.55 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
language: cpp
compiler:
- gcc
- clang
os:
- linux
- osx
osx_image: xcode7.1
notifications:
email: false
sudo: required
cache:
- apt
- ccache
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.5
- boost-latest
packages:
- gcc-4.9
- g++-4.9
- clang-3.5
- ccache
- libpython2.7
- libboost1.55-all-dev
- cmake
env:
- PYTHON_VERSION=2.7
before_install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository ppa:hvr/z3 -y; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -q; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -y --force-yes libz3-dev; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install python-setuptools; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CC" = "gcc" ]; then export CC="gcc-4.9"; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" = "g++" ]; then export CXX="g++-4.9"; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CC" = "clang" ]; then export CC="clang-3.5"; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CXX" = "clang++" ]; then export CXX="clang++-3.5"; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export CC="clang"; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export CXX="clang++"; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install z3 cmake; fi
# Back to /home/travis/build/JonathanSalwan
- cd ..
# Install capstone
- git clone https://github.com/aquynh/capstone.git
- cd capstone
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then bash ./make.sh; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then ./make.sh; fi
- sudo make install
- cd ../
# Download pin
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then wget http://software.intel.com/sites/landingpage/pintool/downloads/pin-2.14-71313-gcc.4.4.7-linux.tar.gz; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then tar -xf pin-2.14-71313-gcc.4.4.7-linux.tar.gz; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then wget http://software.intel.com/sites/landingpage/pintool/downloads/pin-2.14-71313-clang.4.2-mac.tar.gz; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then tar -xf pin-2.14-71313-clang.4.2-mac.tar.gz; fi
# Move Triton into pin
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then mv ./Triton ./pin-2.14-71313-gcc.4.4.7-linux/source/tools/; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then cd ./pin-2.14-71313-gcc.4.4.7-linux/source/tools/Triton; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then mv ./Triton ./pin-2.14-71313-clang.4.2-mac/source/tools/; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then cd ./pin-2.14-71313-clang.4.2-mac/source/tools/Triton; fi
# Prepare build
- mkdir build
- cd build
script:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then cmake -DPINTOOL=on -DKERNEL4=on ..; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then cmake ..; fi
- sudo make -j2 install
- cd ..
# libTriton unit testing
# Python
- python2.7 ./src/examples/python/code_coverage_crackme_xor.py
- python2.7 ./src/examples/python/disass.py
- python2.7 ./src/examples/python/ir.py
- python2.7 ./src/examples/python/simplification.py
- python2.7 ./src/examples/python/symbolic_emulation_1.py
- python2.7 ./src/examples/python/symbolic_emulation_2.py
- python2.7 ./src/examples/python/symbolic_emulation_crackme_xor.py
- python2.7 ./src/examples/python/hooking_libc.py
- python2.7 ./src/examples/python/proving_opaque_predicates.py
- python2.7 ./src/testers/libTriton_units_testing.py
# C++
- cd src/examples/cpp
- make
- ./taint_reg.bin
- ./info_reg.bin
- ./ir.bin
- ./simplification.bin
- ./constraint.bin
- ./parsing_elf.bin ../../samples/crackmes/crackme_xor
- cd ../../../
# libPintool + libTriton unit testing
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo sh -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./triton ./src/testers/check_semantics.py ./src/samples/ir_test_suite/ir; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./triton ./src/examples/pin/ast_dictionaries.py ./src/samples/crackmes/crackme_xor elite; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./triton ./src/examples/pin/blacklist.py ./src/samples/crackmes/crackme_xor a; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./triton ./src/examples/pin/callback_image.py ./src/samples/ir_test_suite/ir; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./triton ./src/examples/pin/callback_routine.py ./src/samples/vulns/testSuite; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./triton ./src/examples/pin/callback_syscall.py ./src/samples/crackmes/crackme_xor a; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./triton ./src/examples/pin/crackme_hash_collision.py ./src/samples/crackmes/crackme_hash aaaaa; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./triton ./src/examples/pin/inject_model_with_snapshot.py ./src/samples/crackmes/crackme_xor a; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./triton ./src/examples/pin/ir.py ./src/samples/crackmes/crackme_xor a > /dev/null; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./triton ./src/examples/pin/runtime_memory_tainting.py ./src/samples/crackmes/crackme_xor a; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./triton ./src/examples/pin/runtime_register_modification.py ./src/samples/crackmes/crackme_xor a; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./triton ./src/examples/pin/strlen.py ./src/samples/others/strlen 1; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./triton ./src/examples/pin/sym_only_on_tainted.py ./src/samples/crackmes/crackme_xor a; fi