-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbluesploit.py
More file actions
executable file
·84 lines (63 loc) · 2.19 KB
/
bluesploit.py
File metadata and controls
executable file
·84 lines (63 loc) · 2.19 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
#!/usr/bin/env python3
"""
BlueSploit - Bluetooth Exploitation Framework
A Metasploit/RouterSploit-style framework for Bluetooth security testing
Author: Mr-IoT (Mr-IoT)
License: MIT
Usage:
python bluesploit.py # Start interactive console
python bluesploit.py --list # List all modules
"""
import argparse
import sys
__version__ = "1.0.4.dev0"
def main():
"""Main entry point for BlueSploit"""
parser = argparse.ArgumentParser(
description="BlueSploit - Bluetooth Exploitation Framework",
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog="Examples:\n"
" python bluesploit.py Start console\n"
" python bluesploit.py --list List modules\n",
)
parser.add_argument("--list", action="store_true", dest="list_modules", help="List all modules and exit")
args = parser.parse_args()
if args.list_modules:
_list_modules()
else:
_start_console()
def _list_modules():
"""List all available modules and exit"""
from core.loader import ModuleLoader
loader = ModuleLoader()
stats = loader.stats()
print(f"\n BlueSploit v{__version__} - Available Modules ({loader.module_count})\n")
for mod_type, count in sorted(stats.items()):
print(f" {mod_type}: {count}")
print()
for path in loader.list_all():
mod = loader.load(path)
if mod:
print(f" {path:<40} {mod.info.description}")
else:
print(f" {path:<40} (failed to load)")
print()
def _start_console():
"""Start the interactive console"""
from core.banner import collect_stats, format_stats_line, pick_tip
from core.interpreter import BlueSploitInterpreter
from core.utils.printer import print_banner, print_info
print_banner(__version__)
interp = BlueSploitInterpreter()
stats = collect_stats(interp.loader, __version__)
print(format_stats_line(stats))
print(f" tip: {pick_tip()}")
print()
try:
interp.cmdloop()
except KeyboardInterrupt:
print("\n")
from core.utils.printer import print_info as pi
pi("Goodbye!")
if __name__ == "__main__":
main()