Skip to content

Commit 80a19b7

Browse files
authored
Merge pull request zardus#119 from StevenVanAcker/better-testing
Better travis-ci testing, including for fedora and archlinux
2 parents 7f3da59 + e8ce574 commit 80a19b7

File tree

6 files changed

+132
-177
lines changed

6 files changed

+132
-177
lines changed

Diff for: .travis.yml

+68-174
Original file line numberDiff line numberDiff line change
@@ -3,186 +3,80 @@ sudo: required
33
services:
44
- docker
55
before_install:
6+
- if [ "$DISTRO" = "archlinux" ]; then docker build -t ctftools -f Dockerfile.archlinux .; fi
7+
- if [ "$DISTRO" = "fedora" ]; then docker build -t ctftools -f Dockerfile.fedora .; fi
68
- if [ "$DISTRO" = "xenial" ]; then docker build -t ctftools -f Dockerfile.xenial .; fi
79
- if [ "$DISTRO" = "trusty" ]; then docker build -t ctftools -f Dockerfile .; fi
810

911
env:
10-
- DISTRO="trusty" TOOL="afl"
11-
- DISTRO="trusty" TOOL="android-sdk"
12-
- DISTRO="trusty" TOOL="angr" EXPECTFAIL=1
13-
- DISTRO="trusty" TOOL="apktool"
14-
- DISTRO="trusty" TOOL="barf"
15-
- DISTRO="trusty" TOOL="beef" EXPECTFAIL=1 ### unsupported for now, needs ruby with RVM
16-
- DISTRO="trusty" TOOL="bindead"
17-
- DISTRO="trusty" TOOL="binwalk"
18-
- DISTRO="trusty" TOOL="burpsuite"
19-
- DISTRO="trusty" TOOL="capstone"
20-
- DISTRO="trusty" TOOL="checksec"
21-
- DISTRO="trusty" TOOL="codereason"
22-
- DISTRO="trusty" TOOL="commix"
23-
- DISTRO="trusty" TOOL="cribdrag"
24-
#- DISTRO="trusty" TOOL="cross2" ### takes too long for travis
25-
#- DISTRO="trusty" TOOL="crosstool" ### takes too long for travis
26-
- DISTRO="trusty" TOOL="df"
27-
- DISTRO="trusty" TOOL="dirb"
28-
- DISTRO="trusty" TOOL="dirsearch"
29-
- DISTRO="trusty" TOOL="dislocker"
30-
- DISTRO="trusty" TOOL="elfkickers"
31-
- DISTRO="trusty" TOOL="elfparser"
32-
- DISTRO="trusty" TOOL="evilize"
33-
- DISTRO="trusty" TOOL="exetractor"
34-
- DISTRO="trusty" TOOL="featherduster"
35-
- DISTRO="trusty" TOOL="firmware-mod-kit"
36-
- DISTRO="trusty" TOOL="foresight"
37-
- DISTRO="trusty" TOOL="gdb"
38-
- DISTRO="trusty" TOOL="gdb-heap"
39-
- DISTRO="trusty" TOOL="gef"
40-
- DISTRO="trusty" TOOL="hash-identifier"
41-
- DISTRO="trusty" TOOL="hashkill"
42-
- DISTRO="trusty" TOOL="hashpump"
43-
- DISTRO="trusty" TOOL="hashpump-partialhash"
44-
- DISTRO="trusty" TOOL="honggfuzz"
45-
- DISTRO="trusty" TOOL="jdgui"
46-
- DISTRO="trusty" TOOL="keystone"
47-
- DISTRO="trusty" TOOL="libheap"
48-
- DISTRO="trusty" TOOL="littleblackbox"
49-
- DISTRO="trusty" TOOL="mitmproxy"
50-
- DISTRO="trusty" TOOL="msieve"
51-
- DISTRO="trusty" TOOL="panda" EXPECTFAIL=1 ### not sure why this fails, compilation errors
52-
- DISTRO="trusty" TOOL="pathgrind" EXPECTFAIL=1 ### only works on kernel 2.4 or 2.6
53-
- DISTRO="trusty" TOOL="pdf-parser"
54-
- DISTRO="trusty" TOOL="peda"
55-
- DISTRO="trusty" TOOL="peepdf"
56-
- DISTRO="trusty" TOOL="pemcrack"
57-
- DISTRO="trusty" TOOL="pkcrack"
58-
- DISTRO="trusty" TOOL="preeny"
59-
- DISTRO="trusty" TOOL="pwndbg"
60-
- DISTRO="trusty" TOOL="pwntools" EXPECTFAIL=1
61-
- DISTRO="trusty" TOOL="python-paddingoracle"
62-
- DISTRO="trusty" TOOL="python-pin"
63-
- DISTRO="trusty" TOOL="pyvmmonitor"
64-
- DISTRO="trusty" TOOL="qemu"
65-
- DISTRO="trusty" TOOL="qira"
66-
- DISTRO="trusty" TOOL="radare2"
67-
- DISTRO="trusty" TOOL="reveng"
68-
- DISTRO="trusty" TOOL="ropper"
69-
- DISTRO="trusty" TOOL="rp++"
70-
- DISTRO="trusty" TOOL="scrdec18"
71-
- DISTRO="trusty" TOOL="shellnoob"
72-
- DISTRO="trusty" TOOL="shellsploit"
73-
- DISTRO="trusty" TOOL="snowman"
74-
- DISTRO="trusty" TOOL="sonic-visualizer" EXPECTFAIL=1 ### build errors
75-
- DISTRO="trusty" TOOL="sqlmap"
76-
- DISTRO="trusty" TOOL="ssh_decoder"
77-
- DISTRO="trusty" TOOL="sslsplit"
78-
- DISTRO="trusty" TOOL="steganabara"
79-
- DISTRO="trusty" TOOL="stegdetect"
80-
- DISTRO="trusty" TOOL="stegsolve"
81-
- DISTRO="trusty" TOOL="subbrute"
82-
- DISTRO="trusty" TOOL="taintgrind" EXPECTFAIL=1 ### missing Iop_* declarations
83-
- DISTRO="trusty" TOOL="testdisk"
84-
- DISTRO="trusty" TOOL="tor-browser"
85-
- DISTRO="trusty" TOOL="unicorn"
86-
- DISTRO="trusty" TOOL="veles" EXPECTFAIL=1 ### Cmake is too old
87-
- DISTRO="trusty" TOOL="villoc"
88-
- DISTRO="trusty" TOOL="virtualsocket"
89-
- DISTRO="trusty" TOOL="wcc" EXPECTFAIL=1 ### depends on xenial
90-
- DISTRO="trusty" TOOL="xortool"
91-
- DISTRO="trusty" TOOL="xrop" EXPECTFAIL=1
92-
- DISTRO="trusty" TOOL="xspy"
93-
- DISTRO="trusty" TOOL="yafu"
94-
- DISTRO="trusty" TOOL="z3"
95-
- DISTRO="trusty" TOOL="zsteg"
9612

97-
- DISTRO="xenial" TOOL="afl"
98-
- DISTRO="xenial" TOOL="android-sdk"
99-
- DISTRO="xenial" TOOL="angr"
100-
- DISTRO="xenial" TOOL="apktool"
101-
- DISTRO="xenial" TOOL="barf"
102-
- DISTRO="xenial" TOOL="beef" EXPECTFAIL=1 ### unsupported for now, needs ruby with RVM
103-
- DISTRO="xenial" TOOL="bindead" EXPECTFAIL=1
104-
- DISTRO="xenial" TOOL="binwalk"
105-
- DISTRO="xenial" TOOL="burpsuite"
106-
- DISTRO="xenial" TOOL="capstone"
107-
- DISTRO="xenial" TOOL="checksec"
108-
- DISTRO="xenial" TOOL="codereason"
109-
- DISTRO="xenial" TOOL="commix"
110-
- DISTRO="xenial" TOOL="cribdrag"
111-
#- DISTRO="xenial" TOOL="cross2" ### takes too long for travis
112-
#- DISTRO="xenial" TOOL="crosstool" ### takes too long for travis
113-
- DISTRO="xenial" TOOL="df"
114-
- DISTRO="xenial" TOOL="dirb"
115-
- DISTRO="xenial" TOOL="dirsearch"
116-
- DISTRO="xenial" TOOL="dislocker"
117-
- DISTRO="xenial" TOOL="elfkickers"
118-
- DISTRO="xenial" TOOL="elfparser"
119-
- DISTRO="xenial" TOOL="evilize"
120-
- DISTRO="xenial" TOOL="exetractor"
121-
- DISTRO="xenial" TOOL="featherduster"
122-
- DISTRO="xenial" TOOL="firmware-mod-kit"
123-
- DISTRO="xenial" TOOL="foresight"
124-
- DISTRO="xenial" TOOL="gdb"
125-
- DISTRO="xenial" TOOL="gdb-heap"
126-
- DISTRO="xenial" TOOL="gef"
127-
- DISTRO="xenial" TOOL="hash-identifier"
128-
- DISTRO="xenial" TOOL="hashkill" EXPECTFAIL=1
129-
- DISTRO="xenial" TOOL="hashpump"
130-
- DISTRO="xenial" TOOL="hashpump-partialhash"
131-
- DISTRO="xenial" TOOL="honggfuzz"
132-
- DISTRO="xenial" TOOL="jdgui"
133-
- DISTRO="xenial" TOOL="keystone"
134-
- DISTRO="xenial" TOOL="libheap"
135-
- DISTRO="xenial" TOOL="littleblackbox"
136-
- DISTRO="xenial" TOOL="mitmproxy"
137-
- DISTRO="xenial" TOOL="msieve"
138-
- DISTRO="xenial" TOOL="panda" EXPECTFAIL=1 ### not sure why this fails, compilation errors
139-
- DISTRO="xenial" TOOL="pathgrind" EXPECTFAIL=1 ### only works on kernel 2.4 or 2.6
140-
- DISTRO="xenial" TOOL="pdf-parser"
141-
- DISTRO="xenial" TOOL="peda"
142-
- DISTRO="xenial" TOOL="peepdf"
143-
- DISTRO="xenial" TOOL="pemcrack"
144-
- DISTRO="xenial" TOOL="pkcrack"
145-
- DISTRO="xenial" TOOL="preeny"
146-
- DISTRO="xenial" TOOL="pwndbg"
147-
- DISTRO="xenial" TOOL="pwntools" EXPECTFAIL=1
148-
- DISTRO="xenial" TOOL="python-paddingoracle"
149-
- DISTRO="xenial" TOOL="python-pin" EXPECTFAIL=1
150-
- DISTRO="xenial" TOOL="pyvmmonitor"
151-
- DISTRO="xenial" TOOL="qemu"
152-
- DISTRO="xenial" TOOL="qira" EXPECTFAIL=1
153-
- DISTRO="xenial" TOOL="radare2"
154-
- DISTRO="xenial" TOOL="reveng"
155-
- DISTRO="xenial" TOOL="ropper"
156-
- DISTRO="xenial" TOOL="rp++"
157-
- DISTRO="xenial" TOOL="scrdec18"
158-
- DISTRO="xenial" TOOL="shellnoob"
159-
- DISTRO="xenial" TOOL="shellsploit"
160-
- DISTRO="xenial" TOOL="snowman"
161-
- DISTRO="xenial" TOOL="sonic-visualizer" EXPECTFAIL=1 ### build errors
162-
- DISTRO="xenial" TOOL="sqlmap"
163-
- DISTRO="xenial" TOOL="ssh_decoder"
164-
- DISTRO="xenial" TOOL="sslsplit"
165-
- DISTRO="xenial" TOOL="steganabara"
166-
- DISTRO="xenial" TOOL="stegdetect" EXPECTFAIL=1
167-
- DISTRO="xenial" TOOL="stegsolve"
168-
- DISTRO="xenial" TOOL="subbrute"
169-
- DISTRO="xenial" TOOL="taintgrind" EXPECTFAIL=1 ### missing Iop_* declarations
170-
- DISTRO="xenial" TOOL="testdisk"
171-
- DISTRO="xenial" TOOL="tor-browser"
172-
- DISTRO="xenial" TOOL="unicorn"
173-
- DISTRO="xenial" TOOL="veles"
174-
- DISTRO="xenial" TOOL="villoc" EXPECTFAIL=1
175-
- DISTRO="xenial" TOOL="virtualsocket"
176-
- DISTRO="xenial" TOOL="wcc" EXPECTFAIL=1 ### depends on xenial
177-
- DISTRO="xenial" TOOL="xortool"
178-
- DISTRO="xenial" TOOL="xrop" EXPECTFAIL=1
179-
- DISTRO="xenial" TOOL="xspy"
180-
- DISTRO="xenial" TOOL="yafu"
181-
- DISTRO="xenial" TOOL="z3"
182-
- DISTRO="xenial" TOOL="zsteg" EXPECTFAIL=1
13+
# Tests for fedora
14+
- DISTRO="fedora" TOOL="apktool binwalk burpsuite capstone checksec commix
15+
cribdrag dirsearch elfkickers evilize exetractor foresight gdb gdb-heap gef
16+
jdgui libheap pdf-parser peda peepdf pkcrack python-paddingoracle pyvmmonitor
17+
radare2 reveng ropper rp++ scrdec18 shellnoob shellsploit ssh_decoder
18+
steganabara stegsolve subbrute unicorn virtualsocket"
19+
- DISTRO="fedora" TOOL="xortool yafu z3"
20+
- DISTRO="fedora" EXPECTFAIL=1 TOOL="afl android-sdk angr barf beef bindead
21+
codereason df dirb dislocker elfparser featherduster firmware-mod-kit
22+
hash-identifier hashkill hashpump hashpump-partialhash honggfuzz keystone
23+
littleblackbox mitmproxy msieve panda pathgrind pemcrack preeny pwndbg pwntools
24+
python-pin qemu qira snowman sonic-visualizer sqlmap sslsplit stegdetect
25+
taintgrind testdisk tor-browser veles villoc wcc xrop xspy zsteg"
26+
# - DISTRO="fedora" TOOL="cross2 crosstool" ### takes too long for travis-ci
18327

28+
# Tests for archlinux
29+
- DISTRO="archlinux" TOOL="afl android-sdk apktool binwalk burpsuite checksec
30+
commix cribdrag df dirb dirsearch evilize exetractor featherduster
31+
firmware-mod-kit foresight gdb gdb-heap gef"
32+
- DISTRO="archlinux" TOOL="hashpump hashpump-partialhash jdgui keystone libheap
33+
msieve pdf-parser peda peepdf pemcrack pkcrack pwndbg pwntools
34+
python-paddingoracle pyvmmonitor radare2 reveng rp++ scrdec18 shellnoob
35+
ssh_decoder sslsplit steganabara stegsolve subbrute testdisk tor-browser
36+
unicorn veles virtualsocket xortool xrop yafu zsteg elfkickers honggfuzz"
37+
- DISTRO="archlinux" EXPECTFAIL=1 TOOL="angr barf beef bindead capstone
38+
codereason dislocker elfparser hash-identifier hashkill littleblackbox
39+
mitmproxy panda pathgrind preeny qira ropper shellsploit"
40+
- DISTRO="archlinux" EXPECTFAIL=1 TOOL="snowman sonic-visualizer sqlmap
41+
stegdetect taintgrind villoc wcc xspy z3 python-pin"
42+
# - DISTRO="archlinux" TOOL="cross2 crosstool qemu" ### takes too long for travis-ci
43+
44+
# Tests for trusty, grouped together to most optimally use a single build process
45+
- DISTRO="trusty" TOOL="afl android-sdk apktool barf binwalk burpsuite capstone
46+
checksec codereason"
47+
- DISTRO="trusty" TOOL="commix cribdrag df dirb dirsearch dislocker elfkickers
48+
elfparser evilize exetractor jdgui keystone libheap littleblackbox mitmproxy
49+
msieve pdf-parser peda peepdf pemcrack scrdec18 shellnoob shellsploit snowman
50+
sqlmap ssh_decoder sslsplit steganabara stegsolve subbrute bindead hashkill
51+
python-pin qira stegdetect villoc zsteg"
52+
- DISTRO="trusty" TOOL="featherduster firmware-mod-kit foresight gdb gdb-heap
53+
gef hash-identifier hashpump hashpump-partialhash honggfuzz testdisk
54+
tor-browser unicorn virtualsocket xortool xspy yafu z3"
55+
- DISTRO="trusty" TOOL="pkcrack preeny pwndbg python-paddingoracle pyvmmonitor
56+
radare2 reveng ropper rp++"
57+
- DISTRO="trusty" TOOL="qemu"
58+
- DISTRO="trusty" EXPECTFAIL=1 TOOL="angr beef panda pathgrind pwntools
59+
sonic-visualizer taintgrind veles wcc xrop"
60+
# - DISTRO="trusty" TOOL="cross2 crosstool" ### takes too long for travis-ci
61+
62+
# Tests for xenial, grouped together to most optimally use a single build process
63+
- DISTRO="xenial" TOOL="afl android-sdk angr apktool barf binwalk burpsuite
64+
capstone checksec codereason"
65+
- DISTRO="xenial" TOOL="commix cribdrag df dirb dirsearch dislocker elfkickers
66+
elfparser evilize exetractor jdgui keystone libheap littleblackbox mitmproxy
67+
msieve pdf-parser peda peepdf pemcrack scrdec18 shellnoob shellsploit snowman
68+
sqlmap ssh_decoder sslsplit steganabara stegsolve subbrute"
69+
- DISTRO="xenial" TOOL="featherduster firmware-mod-kit foresight gdb gdb-heap
70+
gef hash-identifier hashpump hashpump-partialhash honggfuzz testdisk
71+
tor-browser unicorn veles virtualsocket xortool xspy yafu z3"
72+
- DISTRO="xenial" TOOL="pkcrack preeny pwndbg python-paddingoracle pyvmmonitor
73+
radare2 reveng ropper rp++"
74+
- DISTRO="xenial" TOOL="qemu"
75+
- DISTRO="xenial" EXPECTFAIL=1 TOOL="beef bindead hashkill panda pathgrind
76+
pwntools python-pin qira sonic-visualizer stegdetect taintgrind villoc wcc xrop
77+
zsteg"
78+
# - DISTRO="xenial" TOOL="cross2 crosstool" ### takes too long for travis-ci
18479

18580
script:
186-
- docker run --rm ctftools lsb_release -a
187-
- docker run -e EXPECTFAIL="$EXPECTFAIL" -e TOOL="$TOOL" --rm ctftools bash -ic 'manage-tools -s -f -v test $TOOL'
81+
- ./bin/travis-ci.sh
18882

Diff for: Dockerfile.fedora

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM fedora
2+
3+
RUN dnf -y install which sudo git redhat-lsb
4+
5+
RUN useradd -m ctf
6+
COPY .git /home/ctf/tools/.git
7+
RUN chown -R ctf.ctf /home/ctf/tools
8+
9+
RUN echo "ctf ALL=NOPASSWD: ALL" > /etc/sudoers.d/ctf
10+
USER ctf
11+
12+
WORKDIR /home/ctf/tools
13+
RUN git checkout .
14+
RUN bin/manage-tools -s setup
15+
RUN bin/ctf-tools-pip install appdirs
16+
RUN echo "workon ctftools" >> /home/ctf/.bashrc
17+
18+
WORKDIR /home/ctf
19+
CMD bash -i

Diff for: beef/install-root-debian

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
echo "Need to get ruby with RVM... Unsupported for now"
44
exit 1
5-
apt-get install build-essential openssl libreadline6 \
5+
apt-get -y install build-essential openssl libreadline6 \
66
libreadline6-dev zlib1g zlib1g-dev libssl-dev \
77
libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 \
88
libxml2-dev libxslt1-dev autoconf libc6-dev \

Diff for: bin/travis-ci.sh

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash -e
2+
3+
export EXPECTFAIL=${EXPECTFAIL:-0}
4+
5+
starttime=$SECONDS
6+
failed=""
7+
for t in $TOOL;
8+
do
9+
set +e
10+
toolstarttime=$SECONDS
11+
echo "[-] TOOL $t TEST STARTED: $((SECONDS - starttime)) seconds since start of script."
12+
if ! docker run -e EXPECTFAIL="$EXPECTFAIL" -e TOOL="$t" --rm ctftools bash -ic 'manage-tools -s -f -v test $TOOL';
13+
then
14+
failed="$failed$t "
15+
fi
16+
echo "[-] TOOL $t TEST ENDED: $((SECONDS - toolstarttime)) seconds, $((SECONDS - starttime)) seconds since start of script."
17+
set -e
18+
done
19+
20+
if [ "$failed" != "" ];
21+
then
22+
echo "==================================================="
23+
failcount=$(echo "$failed" | wc -w)
24+
totalcount=$(echo "$TOOL" | wc -w)
25+
if [ "$EXPECTFAIL" -eq "1" ];
26+
then
27+
echo "ERROR: $failcount/$totalcount tools succeeded while they were expected to fail: $failed"
28+
else
29+
echo "ERROR: $failcount/$totalcount tools failed while they should have succeeded: $failed"
30+
fi
31+
echo "==================================================="
32+
exit 1
33+
fi
34+
35+
if [ "$EXPECTFAIL" -eq "1" ];
36+
then
37+
echo "DONE: $totalcount tools failed as expected."
38+
else
39+
echo "DONE: $totalcount tools succeeded as expected."
40+
fi
41+
42+
exit 0

Diff for: honggfuzz/install-root-archlinux

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash -ex
22
set -eu -o pipefail
33

4-
apt-get install libbfd-dev libunwind8-dev
4+
# apt-get install libbfd-dev libunwind8-dev
55
pacman -Syu --noconfirm --needed libunwind binutils

Diff for: wcc/install-root-debian

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash -ex
22
set -eu -o pipefail
33

4-
apt-get install clang libbfd-dev uthash-dev \
4+
apt-get -y install clang libbfd-dev uthash-dev \
55
libelf-dev libcapstone-dev \
66
libreadline6 libreadline6-dev \
77
libiberty-dev libgsl-dev

0 commit comments

Comments
 (0)