0

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

import pyshark

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

# Get to and from fields
4

1 回答 1

0

我找到了以下解决方案:

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

输出:

TO: <exampleEmail@provider.com>
于 2020-04-13T15:56:30.037 回答