Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何从与流隔离的 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>