-
Notifications
You must be signed in to change notification settings - Fork 111
/
angr-management.spec
134 lines (117 loc) · 3.83 KB
/
angr-management.spec
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
134
import pathlib
import sys
import angr
import capstone
import debugpy
import parso
import pypcode
import pyvex
import pyxdia
import unicorn
import z3
import zmq
sys.setrecursionlimit(sys.getrecursionlimit() * 5)
# Repo root
AM_BASE = pathlib.Path(SPECPATH)
# Python module roots
ANGR_BASE = pathlib.Path(angr.__file__).parent
CAPSTONE_BASE = pathlib.Path(capstone.__file__).parent
DEBUGPY_BASE = pathlib.Path(debugpy.__file__).parent
PARSO_BASE = pathlib.Path(parso.__file__).parent
PYPCODE_BASE = pathlib.Path(pypcode.__file__).parent
PYVEX_BASE = pathlib.Path(pyvex.__file__).parent
PYXDIA_BASE = pathlib.Path(pyxdia.__file__).parent
UNICORN_BASE = pathlib.Path(unicorn.__file__).parent
Z3_BASE = pathlib.Path(z3.__file__).parent
ZMQ_BASE = pathlib.Path(zmq.__file__).parent
block_cipher = None
icon = str(AM_BASE / "angrmanagement" / "resources" / "images" / "angr.ico")
included_data = [
(str(AM_BASE / "angrmanagement" / "resources"), "angrmanagement/resources"),
(str(AM_BASE / "angrmanagement" / "resources" / "images"), "angrmanagement/resources/images"),
(str(AM_BASE / "angrmanagement" / "plugins"), "angrmanagement/plugins"),
(str(AM_BASE / "angrmanagement" / "config"), "angrmanagement/config"),
(str(ANGR_BASE / "analyses" / "identifier" / "functions"), "angr/analyses/identifier/functions"),
(str(ANGR_BASE / "procedures"), "angr/procedures"),
(str(PARSO_BASE / "python"), "parso/python"),
(str(AM_BASE / "flirt_signatures"), "flirt_signatures"),
(str(AM_BASE / "library_docs"), "library_docs"),
(str(DEBUGPY_BASE / "_vendored"), "debugpy/_vendored"),
(str(PYPCODE_BASE / "processors"), "pypcode/processors"),
(str(ANGR_BASE / "lib"), "angr/lib"),
(str(PYVEX_BASE / "lib"), "pyvex/lib"),
(str(UNICORN_BASE / "lib"), "unicorn/lib"),
(str(CAPSTONE_BASE / "lib"), "capstone/lib"),
(str(Z3_BASE / "lib"), "z3/lib"),
(str(PYXDIA_BASE / "bin"), "pyxdia/bin"),
(str(ZMQ_BASE / "backend" / "cffi"), "zmq/backend/cffi"),
]
if sys.platform == "linux":
import PySide6
PYSIDE6_BASE = pathlib.Path(PySide6.__file__).parent
included_data.append((str(PYSIDE6_BASE / "Qt" / "lib"), "PySide6/Qt/lib"))
import archr
import keystone
ARCHR_BASE = pathlib.Path(archr.__file__).parent
KEYSTONE_BASE = pathlib.Path(keystone.__file__).parent
included_data.append((str(ARCHR_BASE / "implants"), "archr/implants"))
included_data.append((str(KEYSTONE_BASE), "keystone"))
included_data.append((str(ZMQ_BASE / ".." / "pyzmq.libs"), "pyzmq.libs"))
a = Analysis(
[str(AM_BASE / "start.py")],
pathex=[],
binaries=[],
datas=included_data,
hiddenimports=[
"ipykernel.datapub",
"pkg_resources.py2_warn",
"sqlalchemy.sql.default_comparator",
"pyxdg",
"pyzmq",
"xmlrpc.server",
"charset_normalizer.md__mypyc",
"PySide6.support.deprecated",
"PySide6.QtWebEngineWidgets",
"binsync.interface_overrides.angr",
"binharness",
],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=["debugpy"],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name="angr-management",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=[icon],
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name="angr-management",
)
if sys.platform == "darwin":
app = BUNDLE(coll, name="angr-management.app", icon=icon, bundle_identifier=None)