【问题标题】:Getting the "To" and "From" fields from a SMTP packet using pyshark使用 pyshark 从 SMTP 数据包中获取“To”和“From”字段
【发布时间】:2020-07-26 04:41:02
【问题描述】:

如何从与流隔离的 SMTP 数据包中获取“收件人”和“发件人”类别。

import pyshark

fileBuffer = pyshark.FileCapture(pcapDirectory)
samplePacket = fileBuffer[SMTP_Packet_Location]

# Get to and from fields

【问题讨论】:

    标签: python pyshark


    【解决方案1】:

    我找到了以下解决方案:

    fileBuffer = pyshark.FileCapture(pcapDirectory)
    samplePacket = fileBuffer[SMTP_Packet_Location]
    print(samplePacket.smtp.get_field_value("req_parameter"))
    

    输出:

    TO: <exampleEmail@provider.com>
    

    【讨论】:

      猜你喜欢
      • 2021-02-24
      • 2022-08-19
      • 1970-01-01
      • 2012-12-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-09
      • 1970-01-01
      相关资源
      最近更新 更多