python读取数据校验数据,如何使用Scapy Python读取数据包TLS元数据

本文介绍了如何使用Scapy从包含多条TLS记录的数据包中读取并解析TLS元数据。通过手动解码Scapy识别为'Raw load'的TLS部分,可以访问每个记录的长度和其他属性。并展示了如何验证所有记录长度的总和是否等于整个TLS部分的长度。
摘要由CSDN通过智能技术生成

How can I read TLS information (record length, record type...) from a packet using scapy. I have used load_layer('tls') and I'm able to read some information when there is a single TLS record in a packet but when there is multiple TLS record in a packet I'm only able to read the first TLS record.

For exemple this packet contain 3 TLS record 7e62779a55ccf0060488630d5a4104d4.png and when I want to read the records length with scapy I only get the first record length d8e5074dd34b53edbd6ba01c6569a57a.png

解决方案

Total TLS decoding

As you've found, scapy doesn't decode the entire packet. But this is fine, because we can manually decode the TLS sections

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值