forked from rabbitstack/fibratus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
81 lines (74 loc) · 3.24 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Copyright 2016 by Nedim Sabic (RabbitStack)
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import re
import os
import shutil
from os.path import expanduser
from setuptools import setup, find_packages
from setuptools.extension import Extension
from Cython.Distutils import build_ext
from pip.req import parse_requirements
from fibratus.version import VERSION
def copy_artifacts():
home_dir = expanduser('~')
here = os.path.abspath(os.path.dirname(__file__))
fibratus_dir = os.path.join(home_dir, '.fibratus')
if not os.path.exists(fibratus_dir):
os.mkdir(fibratus_dir)
shutil.copy(os.path.join(here, 'fibratus.yml'), fibratus_dir)
shutil.copy(os.path.join(here, 'schema.yml'), fibratus_dir)
shutil.copytree(os.path.join(here, 'filaments'), os.path.join(fibratus_dir, 'filaments'))
kstreamc_ext = Extension('kstreamc',
['kstream/kstreamc.pyx'],
libraries=["tdh", "advapi32", "ole32", "ws2_32"],
language='c++')
install_reqs = parse_requirements('requirements.txt', session=False)
reqs = [str(ir.req) for ir in install_reqs if not re.match('pytest|codecov', str(ir.req))]
copy_artifacts()
setup(
name="fibratus",
version=VERSION,
author="Nedim Sabic (RabbitStack)",
author_email="[email protected]",
description="Tool for exploration and tracing of the Windows kernel",
long_description="Fibratus is a tool which is able to capture the most of the Windows kernel activity - "
"process/thread creation and termination, file system I/O, registry, network activity, "
"DLL loading/unloading and much more. Fibratus has a very simple CLI which encapsulates "
"the machinery to start the kernel event stream collector, set kernel event filters or "
"run the lightweight Python modules called filaments. You can use filaments to extend "
"Fibratus with your own arsenal of tools.",
license="Apache",
keywords="windows kernel, tracing, system exploration, syscalls",
platforms=["Windows"],
url="https://github.com/rabbitstack/fibratus",
classifiers=[
'Development Status :: 5 - Production/Stable',
'Topic :: System',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4'
],
ext_modules=[kstreamc_ext],
cmdclass={"build_ext": build_ext},
packages=find_packages(),
install_requires=reqs,
entry_points={
'console_scripts': [
'fibratus=fibratus.cli:main',
],
}
)