-
Notifications
You must be signed in to change notification settings - Fork 43
/
test.sh
133 lines (133 loc) · 3.14 KB
/
test.sh
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
bad=0
if (python -c "from pwn import *" 2>&1); then
echo pwntool
bad=1
fi
if !(rasm2 "xor eax, eax" 2>&1 | rg "31c0" 2>&1 >/dev/null); then
echo radare2
bad=1
fi
if !(binwalk 2>&1 | rg "Extraction Options:" 2>&1 >/dev/null); then
echo binwalk
bad=1
fi
if !(apktool 2>&1 | rg ".*a tool for reengineering Android apk files.*" 2>&1 >/dev/null); then
echo apktool
bad=1
fi
if !(frida-ps 2>&1 | rg ".*python3.*" 2>&1 >/dev/null); then
echo frida
bad=1
fi
if !(ROPgadget 2>&1 | rg "Need a binary filename" 2>&1 >/dev/null); then
echo ropgadget
bad=1
fi
if !(python3 -c "import PIL" 2>&1); then
echo pillow
bad=1
fi
if !(strace 2>&1 | rg "Try 'strace -h'" 2>&1 >/dev/null); then
echo strace
bad=1
fi
if !(ltrace 2>&1 | rg "too few arguments" 2>&1 >/dev/null); then
echo ltrace
bad=1
fi
if !(python3 -c "import r2pipe" 2>&1); then
echo r2pipe python3
bad=1
fi
if !(python2 -c "import r2pipe" 2>&1); then
echo r2pipe python2
bad=1
fi
if !(qemu-arm --help 2>&1 | rg "usage: qemu-arm" 2>&1 >/dev/null); then
echo qemu-arm
bad=1
fi
if !(qemu-mips --help 2>&1 | rg "usage: qemu-mips" 2>&1 >/dev/null); then
echo qemu-mips
bad=1
fi
if !(rg --version 2>&1 | rg "ripgrep" 2>&1 >/dev/null); then
echo ripgrep
bad=1
fi
if !(/root/.cargo/bin/cargo --help 2>&1 | rg "See 'cargo help " 2>&1 >/dev/null); then
echo cargo
bad=1
fi
if !(/root/.cargo/bin/rustup --help 2>&1 | rg "The Rust toolchain installer" 2>&1 >/dev/null); then
echo rustup
bad=1
fi
if !(one_gadget --help 2>&1 | rg "Usage: one_gadget " 2>&1 >/dev/null); then
echo one_gadget
bad=1
fi
if !(arm_now --help 2>&1 | rg "arm_now list " 2>&1 >/dev/null); then
echo arm_now
bad=1
fi
if !(drmemory-64 --help 2>&1 | rg "Usage: drmemory " 2>&1 >/dev/null); then
echo drmemory
bad=1
fi
if !(/root/tools/DynamoRIO-x86_64-Linux-7.91.18058-0/bin64/drrun -c /root/tools/DynamoRIO-x86_64-Linux-7.91.18058-0/samples/bin64/libinscount.so -- /bin/ls 2>&1 | rg "instructions executed" 2>&1 >/dev/null); then
echo dynamorio64
bad=1
fi
if !(bash --version 2>&1 | rg "(4.4|5.0)" 2>&1 >/dev/null); then
echo bash 4.4
bad=1
fi
if !(python -c "import capstone" 2>&1); then
echo capstone python2
bad=1
fi
if !(python -c "import keystone" 2>&1); then
echo keystone python2
bad=1
fi
if !(python -c "import unicorn" 2>&1); then
echo unicorn python2
bad=1
fi
if !(python3 -c "import capstone" 2>&1); then
echo capstone python2
bad=1
fi
if !(python3 -c "import keystone" 2>&1); then
echo keystone python2
bad=1
fi
if !(python3 -c "import unicorn" 2>&1); then
echo unicorn python2
bad=1
fi
if !(netstat 2>&1 | rg "Active Internet connections" 2>&1 >/dev/null); then
echo net-tools
bad=1
fi
if !(python3 -c "import angr" 2>&1); then
echo angr
bad=1
fi
if !(valgrind --version 2>&1 | rg "valgrind-" 2>&1 >/dev/null); then
echo valgrind
bad=1
fi
if !(python -V 2>&1 | rg "2." 2>&1 >/dev/null); then
echo python -V not 2.x
bad=1
fi
if !(gdb --version 2>&1 | rg "GNU gdb (GDB) 8.0" 2>&1 >/dev/null); then
echo gdb not 8.0
bad=1
fi
if [ $bad -eq 1 ]; then
exit 1
fi
exit 0