how to get the size of e-mail attachment? protocol is pop.. I have found the e-mail stream, I have also seen this: ------MIME delimiter for sendEmail-910493.736229004 Content-Type: application/pdf;
Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="invitation.pdf" but I dont know how to get the size of that attachment, does anyone know? any help is appreciated. asked 13 Jun '14, 02:17 Bishoy Atef |
One Answer:
If there is no header that shows the length of the attachment (like "Content-Length"), you'll have to 'count' the bytes yourself, by doing the following:
You can test it with the following pop3 pcap file. Set the following display filter, to get the TCP stream with the attachment
Then right-click one of the frames and select Follow TCP Stream. In the pop-up windows, click on Find and search for attachment. From the first occurrence, copy the attachment bytes.
The last line is the end marker for the MIME encoded attachment. Don't copy that line. Then just follow the steps described above. You should get a file named base64.bin, with a size of ~ 71,5 KByte. Alternatively, you can use other tools to extract the attachment from the POP3 stream (not sure which of the following actually do support POP3 - I believe Xplico). Xplico - the tool that provided the POP3 sample capture file above. Some other tools (NetworkMiner, tcpxtract, etc.) here:
NetWitness Investigator (now part of EMC, but still available as Freeware). Hint: Download and save that tool, as long as EMC is providing the download ;-)) Regards answered 13 Jun '14, 07:45 Kurt Knochner ♦ edited 13 Jun '14, 07:58 |
thank you very much for your reply, that really helps.