-
Notifications
You must be signed in to change notification settings - Fork 61
/
setup.py
102 lines (86 loc) · 3.99 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#for windows you need to download: winpcap: http://www.win10pcap.org/download/
import sys,setuptools,os,subprocess,platform
with open("README.md", "r") as fh:
long_description = fh.read()
termux=False
if os.path.isdir('/home/')==True:
if os.geteuid() == 0:
#if not os.getenv("SUDO_USER"):
if os.getenv("SUDO_USER"):
pm="apt"
for x in ["apt","yum","pacman","dnf","zypper","brew"]:
if subprocess.call(["which", x], stdout=subprocess.PIPE, stderr=subprocess.PIPE)==0:
pm=x
break
os.system('sudo '+pm+' install sshpass -y')
os.system('sudo '+pm+' install tor -y')
else:
print('\n\nYou didn\'t the installation run with root privilege !\nYou will have to install the following packages manually: sshpass , tor\n\n\n')
adr=False
if os.path.isdir('/data/data')==True:
adr=True
if os.path.isdir('/data/data/com.termux/')==True:
termux=True
os.system('pkg install openssh -y')
os.system('pkg install sshpass -y')
os.system('pkg install tor -y')
if termux==False:
if sys.version_info < (3,0):
os.system('pip uninstall dnspython -y')
os.system('pip install --ignore-installed dnspython==2.4.2')
else:
os.system('pip3 uninstall dnspython -y')
os.system('pip3 install --ignore-installed dnspython==2.4.2')
#protobuf==3.6.1
if sys.version_info < (3,0):
req=["future","requests","PySocks","bs4","pymysql==0.9.3","scapy==2.4.0","stem","google","colorama","dnspython"]
if adr==True:
req=["future","requests","PySocks","bs4","pymysql==0.9.3","scapy==2.4.0","google","colorama","dnspython"]
if termux==True:
req=["future","requests","PySocks","bs4","pymysql==0.9.3","scapy==2.4.0","google","colorama","dnspython"]
else:
req=["future","requests","PySocks","bs4","pymysql","kamene==0.32","stem","google","colorama","dnspython"]
if adr==True:
req=["future","requests","PySocks","bs4","pymysql","kamene==0.32","google","colorama","dnspython"]
if termux==True:
req=["future","requests","PySocks","bs4","pymysql","kamene==0.32","google","colorama","dnspython"]
if (sys.platform == "win32") or( sys.platform == "win64"):
req+=["win_inet_pton"]
if hasattr(os, 'PyShadowString'):
if os.name==os.PyShadowString('java', 'nt'):
req+=["win_inet_pton"]
req+=['jsbeautifier','tldextract','pwinput','ipaddress','flask','pyjwt','xtelnet>=2.1.6']
if platform.system()=='Java':
if "stem" in req:
req.remove("stem")
if "scapy==2.4.0" in req:
req.remove('scapy==2.4.0')
if "jsbeautifier" in req:
req.remove('jsbeautifier')
# to allow people to install it via 'python setup.py install' after cloning the repo, else some error might occur
"""if sys.version_info < (3,0):
os.system('pip install '+' '.join(req))
else:
os.system('pip3 install '+' '.join(req))"""
if sys.version_info<(3,5):
req.remove('colorama')
req.remove('jsbeautifier')
req.remove('pwinput')
setuptools.setup(
name="bane",
version="5.1.8",
author="AlaBouali",
author_email="[email protected]",
description='This Python library offers a comprehensive set of tools for various cybersecurity and networking tasks. Its functionalities encompass diverse capabilities such as bruteforce attacks, cryptographic methods, DDoS attacks, information gathering, botnet creation and management, CMS vulnerability scanning, network discovery, vulnerability scanning, useful modules for common tasks, web page analyzers, and proxy utilities making it a powerful toolkit for cybersecurity professionals and network administrators.',
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/AlaBouali/bane",
python_requires=">=2.7",
install_requires=req,
packages=setuptools.find_packages(),
license="MIT License",
classifiers=[
"Programming Language :: Python",
"License :: OSI Approved :: MIT License ",
],
)