-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsetup.py
More file actions
80 lines (75 loc) · 2.29 KB
/
setup.py
File metadata and controls
80 lines (75 loc) · 2.29 KB
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
import setuptools # type: ignore
installed_api = False
try:
import binaryninja # type: ignore
except ImportError as e:
print("ImportError: {}".format(e))
print("Attempting to install binja for you...")
import os
if os.path.exists(
"/Applications/Binary Ninja.app/Contents/Resources/scripts/install_api.py"
):
installed_api = True
print("Installing Binary Ninja API...")
os.system(
"python3 /Applications/Binary\ Ninja.app/Contents/Resources/scripts/install_api.py"
)
elif os.path.exists("/binaryninja/scripts/install_api.py"):
installed_api = True
print("Installing Binary Ninja API...")
os.system("python3 /binaryninja/scripts/install_api.py")
else:
print(
"Binary Ninja not found. Please install Binary Ninja using install_api.py first."
)
import sys
sys.exit(1)
print(f"Binary Ninja API {'' if installed_api else 'already '}installed.")
setuptools.setup(
name="hashashin",
version="0.1.0",
license="MIT",
author="Jonathan Prokos",
author_email="jonathan.prokos@twosixtech.com",
description="Binary Fingerprint Library",
packages=["hashashin"],
package_dir={"hashashin": "hashashin"},
install_requires=[
"tqdm",
"numpy",
"xxhash",
"cbor2",
"SQLAlchemy",
"python-magic",
"scikit-learn",
"GitPython",
# "matplotlib",
# "pandas",
# "seaborn",
],
# extras_require={
# "dev": [
# ],
# },
python_requires=">=3.8",
entry_points={
"console_scripts": [
"hashashin = hashashin.cli:cli",
"flowslicer = flowslicer.flowslicer:Main",
"populate-db = hashashin.db:populate_db",
"safedocs-demo = demos.safedocs_05_16_demo:safedocs_demo",
"hashashin-lib-match = hashashin.db:get_closest_library_version_cli",
]
},
package_data={
"hashashin": [
"net-snmp*.pickle",
"hashashin.db",
]
},
)
# TODO: This is not outputting during install
if installed_api:
print(
"Installed Binary Ninja API. To uninstall run 'python3 /Applications/Binary\ Ninja.app/Contents/Resources/scripts/install_api.py -u'"
)