【发布时间】:2020-07-26 04:41:02
【问题描述】:
如何从与流隔离的 SMTP 数据包中获取“收件人”和“发件人”类别。
import pyshark
fileBuffer = pyshark.FileCapture(pcapDirectory)
samplePacket = fileBuffer[SMTP_Packet_Location]
# Get to and from fields
【问题讨论】:
如何从与流隔离的 SMTP 数据包中获取“收件人”和“发件人”类别。
import pyshark
fileBuffer = pyshark.FileCapture(pcapDirectory)
samplePacket = fileBuffer[SMTP_Packet_Location]
# Get to and from fields
【问题讨论】:
我找到了以下解决方案:
fileBuffer = pyshark.FileCapture(pcapDirectory)
samplePacket = fileBuffer[SMTP_Packet_Location]
print(samplePacket.smtp.get_field_value("req_parameter"))
输出:
TO: <exampleEmail@provider.com>
【讨论】: