forked from mandiant/stringsifter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
64 lines (54 loc) · 2.09 KB
/
setup.py
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
# Copyright (C) 2019 FireEye, Inc. All Rights Reserved.
from distutils.core import setup
import os
_version = '0.20191202'
__all__ = ['metadata', 'setup']
# Get the base directory
here = os.path.dirname(__file__)
if not here:
here = os.path.curdir
# Text describing the module
long_description = 'stringsifter is a machine learning-based tool ' + \
'that automatically ranks the output of the ' + \
'`strings` program for binary triage analysis.'
# requirements. we use requirements.txt for the Docker build,
# so import it here
reqsfile = os.path.join(here, 'requirements.txt')
with open(reqsfile, 'r') as fid:
requirements = fid.readlines()
requirements = [r.strip() for r in requirements]
requirements = [r for r in requirements if r and not r.startswith('#')]
# Get the list of scripts
scripts = []
_packages = ['stringsifter', 'stringsifter/lib']
_package_data = {'stringsifter': ['model/*.pkl',
'lib/*.pkl',
'lib/*.ftz',
'lib/*.json']}
# Set the parameters for the setup script
metadata = {
# Setup instructions
'provides': ['stringsifter'],
'packages': _packages,
'package_data': _package_data,
'scripts': scripts,
'entry_points': {
'console_scripts': ['rank_strings=stringsifter.rank_strings:argmain',
'flarestrings=stringsifter.flarestrings:main']
},
'install_requires': requirements,
'python_requires': '>=3.6',
# Metadata
'name': 'stringsifter',
'version': _version,
'description': 'stringsifter is a machine learning-based tool that ' + \
'automatically ranks the output of the `strings` ' + \
'program for binary triage analysis.',
'long_description': long_description,
'url': 'https://github.com/fireeye/stringsifter',
'download_url': 'https://github.com/fireeye/stringsifter',
'keywords': ['stringsifter', 'rank', 'strings', 'binary', 'triage'],
}
# Execute the setup script
if __name__ == '__main__':
setup(**metadata)