forked from OWASP/Nettacker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
83 lines (72 loc) · 3.21 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
82
83
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
from setuptools import setup
from setuptools import find_packages
if os.path.isdir("build"):
sys.exit("please remove the build folder first!")
def requirements():
"""
Grab requirements list based on python version from requirements.txt if you already didn't install it
Returns:
list of requirements in array
"""
requirements_list = []
for requirement in open("requirements.txt").read().rsplit("\n"):
if "python_version" in requirement:
if "> '3'" in requirement and int(sys.version_info[0]) is 3:
try:
__import__(requirement.rsplit('==')[0])
except:
requirements_list.append(requirement.rsplit(';')[0])
elif "< '3'" in requirement and int(sys.version_info[0]) is 2:
try:
__import__(requirement.rsplit('==')[0])
except:
requirements_list.append(requirement.rsplit(';')[0])
else:
if requirement != "":
try:
__import__(requirement.rsplit('==')[0])
except:
requirements_list.append(requirement.rsplit(';')[0])
return list(set(requirements_list))
def package_files(directory="."):
"""
This function was created to crawl the directory and find files (none python files) using os.walk
Args:
directory: path to crawl
Returns:
list of package files in an array
"""
paths = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
if filename.rsplit('.')[-1] not in [".py", ".pyc"] and ".git" not in path:
paths.append(os.path.join('..', path, filename))
return paths
setup(
name="OWASP-Nettacker",
version='0.0.1',
description='OWASP Nettacker - Automated Penetration Testing Framework',
packages=find_packages(),
# package files + database file
package_data={"": package_files()},
include_package_data=True,
install_requires=requirements(),
url="https://github.com/zdresearch/OWASP-Nettacker",
license="Apache-2.0",
author="Ali Razmjoo",
author_email="[email protected]",
long_description="Automated Penetration Testing Framework - OWASP Nettacker project is created to"
" automate information gathering, vulnerability scanning and eventually generating"
" a report for networks, including services, bugs, vulnerabilities, misconfigurations,"
" and other information. This software will utilize TCP SYN, ACK, ICMP and many other"
" protocols in order to detect and bypass Firewall/IDS/IPS devices. By leveraging a"
" unique method in OWASP Nettacker for discovering protected services and devices such"
" as SCADA. It would make a competitive edge compared to other scanner making it one of"
" the bests.",
scripts=["scripts/nettacker.bat" if sys.platform == "win32" or sys.platform == "win64"
else "scripts/nettacker", "nettacker.py"] # script files for windows and other OS
)