Scapy 生成 STP(生成树协议)数据包 [英] Scapy generating STP(Spanning Tree Protocol) packets

查看:79
本文介绍了Scapy 生成 STP(生成树协议)数据包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试生成 STP 数据包并使用wireshark 捕获它.基本上我所做的是 >>> 从 Scapy 发送(STP()),wireshark 的结果是:53918 2671.938356000 00.00.00 00.00.00 FC 49 [格式错误的数据包]我的问题是如何配置STP包,wireshark的结果是STP包而不是FC.请帮忙:)

I am trying to generate STP packet and to capture it with wireshark.Basically what I do is >>> send(STP()) from Scapy and the result from wireshark is: 53918 2671.938356000 00.00.00 00.00.00 FC 49 [Malformed Packet] My question is how to configure the STP packet, the result from wireshark to be STP packet not FC.Please help :)

推荐答案

需要使用sendp()函数代替send(),并且还需要在STP()之前添加Ether()和LLC()层).例如:

You need to use the sendp() function instead of send(), and you also need to add the Ether() and LLC() layers before STP(). For instance:

sendp(Ether(dst="01:80:c2:00:00:00")/LLC()/STP(), iface="eth0")

这篇关于Scapy 生成 STP(生成树协议)数据包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆