forked from andresriancho/w3af-module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
76 lines (58 loc) · 2.88 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
#!/usr/bin/env python
from distutils.core import setup as distutils_setup
from mod_utils.get_version import get_version
from mod_utils.pip import get_pip_git_requirements, get_pip_requirements
from os import getcwd, listdir
from os.path import isfile, join, normpath
from pip import main as pip_main
from sys import argv
from setuptools import find_packages
def setup():
try:
temp_dir = getcwd()
if not isfile('{}/waspc.lock'.format(temp_dir)):
# need to install custom library (SSLyze) for wg_ssl audit plugin support
pip_main(['install', 'https://github.com/ZenSecurity/sslyze/archive/master.tar.gz#egg=SSLyze', '--verbose'])
file('{}/waspc.lock'.format(temp_dir), 'w').close()
profiles_dir = 'w3af-repo/profiles'
distutils_setup(
name='w3af',
version=get_version(),
license='GNU General Public License v2 (GPLv2)',
platforms='Linux',
description='w3af is an open source web application security scanner.',
long_description=file('README.rst').read(),
author='em',
author_email='[email protected]',
url='https://github.com/ZenSecurity/w3af-module',
packages=find_packages(exclude=('tests.*', 'tests', 'mot_utils*',)),
# include everything in source control which lives inside one of the packages identified by find_packages
include_package_data=True,
# include the data files, which don't live inside the directory
data_files=[('profiles', [normpath(join(profiles_dir, profile_file)) for profile_file in listdir(profiles_dir)])],
# This allows w3af plugins to read the data files which we deploy with data_files.
zip_safe=False,
# Run the module tests using nose
test_suite='nose.collector',
# Require at least the easiest PIP requirements from w3af
install_requires=get_pip_requirements(),
dependency_links=get_pip_git_requirements(),
# Install these scripts
scripts=['w3af-repo/w3af_console',
'w3af-repo/w3af_gui',
'w3af-repo/w3af_api'],
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Topic :: Security'
],
)
except Exception as exception:
print('{} - {}'.format(exception.__class__.__name__, exception))
setup()