| 1 | """ |
|---|
| 2 | Taken from PythonInfo Wiki Distutils Tutorial, with thanks to DonnIngle |
|---|
| 3 | |
|---|
| 4 | """ |
|---|
| 5 | |
|---|
| 6 | from distutils.core import setup, Extension |
|---|
| 7 | import sys, os |
|---|
| 8 | |
|---|
| 9 | PARENT_PKG = 'umit.bluetooth' |
|---|
| 10 | BTLIBRARIES = ['bluetooth'] |
|---|
| 11 | SNIFFMODDIR = 'csniff' |
|---|
| 12 | INCLUDE_DIRS = [SNIFFMODDIR] |
|---|
| 13 | |
|---|
| 14 | mods = [] |
|---|
| 15 | if sys.platform == 'linux2': |
|---|
| 16 | # print 'linux' |
|---|
| 17 | mod = Extension(PARENT_PKG + '.btsniff', |
|---|
| 18 | libraries = BTLIBRARIES, |
|---|
| 19 | include_dirs = INCLUDE_DIRS, |
|---|
| 20 | sources = [SNIFFMODDIR + os.sep + 'basesniffmodule.c', |
|---|
| 21 | SNIFFMODDIR + os.sep + 'bthandler.c', |
|---|
| 22 | SNIFFMODDIR + os.sep + 'layers.c']) |
|---|
| 23 | |
|---|
| 24 | mod2 = Extension(PARENT_PKG + '.btsniff_fileio', |
|---|
| 25 | libraries = BTLIBRARIES, |
|---|
| 26 | include_dirs = INCLUDE_DIRS, |
|---|
| 27 | sources = [ SNIFFMODDIR + os.sep + 'sniffio.c']) |
|---|
| 28 | |
|---|
| 29 | mod3 = Extension(PARENT_PKG + '._crack', |
|---|
| 30 | libraries = BTLIBRARIES, |
|---|
| 31 | include_dirs = INCLUDE_DIRS, |
|---|
| 32 | sources = [ SNIFFMODDIR + os.sep + 'sniffcrack.c']) |
|---|
| 33 | |
|---|
| 34 | mod4 = Extension(PARENT_PKG + '.btlayers', |
|---|
| 35 | libraries = BTLIBRARIES, |
|---|
| 36 | include_dirs = INCLUDE_DIRS, |
|---|
| 37 | sources = [SNIFFMODDIR + os.sep + 'layers.c']) |
|---|
| 38 | testmod = Extension(PARENT_PKG + '.harness', |
|---|
| 39 | libraries = BTLIBRARIES, |
|---|
| 40 | include_dirs = INCLUDE_DIRS, |
|---|
| 41 | sources = [SNIFFMODDIR + os.sep + 'harness.c', |
|---|
| 42 | SNIFFMODDIR + os.sep + 'layers.c']) |
|---|
| 43 | |
|---|
| 44 | mods = [ |
|---|
| 45 | mod4, |
|---|
| 46 | mod3, |
|---|
| 47 | mod2, |
|---|
| 48 | mod, |
|---|
| 49 | testmod |
|---|
| 50 | ] |
|---|
| 51 | |
|---|
| 52 | setup( name = 'UmitBluetoothSniffer', |
|---|
| 53 | version = '0.1', |
|---|
| 54 | description = 'Umit Bluetooth Sniffer: part of the Umit Bluetooth Attack Framework', |
|---|
| 55 | author = 'Quek Shu Yang', |
|---|
| 56 | author_email = 'quekshuy@gmail.com', |
|---|
| 57 | url = 'http://trac.umitproject.org/wiki/BluetoothSniffing', |
|---|
| 58 | ext_modules = mods, |
|---|
| 59 | packages = ['umit', 'umit.bluetooth'] |
|---|
| 60 | ) |
|---|