Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 229
Expand file tree
/
Copy pathsetup.py
More file actions
Latest commit
84 lines (69 loc) · 3.09 KB
/
Copy pathsetup.py
File metadata and controls
84 lines (69 loc) · 3.09 KB
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
# NOTE: See the README file for a list of dependencies to install.
from __future__ importprint_function
importsys
try:
fromsetuptoolsimportsetup, Extension
exceptImportError:
print("No setuptools found, attempting to use distutils instead.")
fromdistutils.coreimportsetup, Extension
err= []
warn= []
apt_get_pkgs= []
pip_pkgs= []
#Check pyUSB 1.x dependency present.
#Support for 0.x is deprecated and being removed.
try:
importusb
exceptImportError:
err.append("usb")
apt_get_pkgs.append("python-usb")
try:
importusb.core
exceptImportError:
err.append("You are using pyUSB 0.x. Upgrade to pyUSB 1.x.")
# TODO: Ideally we would detect missing python-dev and libgcrypt-dev to give better errors.
# Dot15d4 is a dep of some of the newer tools
try:
fromscapy.allimportDot15d4
exceptImportError:
warn.append("Scapy (with dot15d4 layer)")
pip_pkgs.append("scapy")
iflen(err) >0:
print("""
Library requirements not met. Install the following libraries, then re-run the setup script.
{}\n""".format('\n'.join(err)), file=sys.stderr)
iflen(warn) >0:
print("""
Library recommendations not met. For full support, install the following libraries, then re-run the setup script.
{}\n""".format('\n'.join(warn)), file=sys.stderr)
iflen(apt_get_pkgs) >0orlen(pip_pkgs) >0:
print("The following commands should install these dependencies on Ubuntu, and can be adapted for other OSs:", file=sys.stderr)
iflen(apt_get_pkgs) >0:
print("\tsudo apt-get install -y {}".format(' '.join(apt_get_pkgs)), file=sys.stderr)
iflen(pip_pkgs) >0:
print("\tpip3 install {}".format(' '.join(pip_pkgs)), file=sys.stderr)
iflen(err) >0:
sys.exit(1)
zigbee_crypt=Extension('zigbee_crypt',
sources= ['zigbee_crypt/zigbee_crypt.c'],
libraries= ['gcrypt'],
include_dirs= ['/usr/local/include', '/usr/include', '/sw/include/', 'zigbee_crypt'],
library_dirs= ['/usr/local/lib', '/usr/lib','/sw/var/lib/']
)
setup(name='killerbee',
version='3.0.0-beta.2',
description='ZigBee and IEEE 802.15.4 Attack Framework and Tools',
author='Joshua Wright, Ryan Speers',
author_email='jwright@willhackforsushi.com, ryan@riverloopsecurity.com',
license='LICENSE.txt',
packages= ['killerbee'],
scripts= ['tools/zbdump', 'tools/zbgoodfind', 'tools/zbid', 'tools/zbreplay',
'tools/zbconvert', 'tools/zbdsniff', 'tools/zbstumbler', 'tools/zbassocflood',
'tools/zbscapy', 'tools/zbwireshark', 'tools/zbkey',
'tools/zbwardrive', 'tools/zbopenear', 'tools/zbfakebeacon',
'tools/zborphannotify', 'tools/zbpanidconflictflood', 'tools/zbrealign', 'tools/zbcat',
'tools/zbjammer', 'tools/kbbootloader'],
install_requires=['pyserial>=2.0', 'pyusb', 'pycrypto', 'rangeparser', 'scapy'],
# NOTE: pygtk doesn't install via distutils on non-Windows hosts
ext_modules= [zigbee_crypt],
)