在写入光盘之前处理文件内容 C#
所以我解密了一个文件,并留下一个包含此(统一编码)的字节数组:
Content-Type: text/plain;
name="testfile.txt"
Content-Transfer-Encoding: binary
Content-Disposition: attachment;
filename="testfile.txt"
My super secret message.
其中“我的超级秘密消息”。是文件的内容,可以是任意时间的文件内容(Word、Excel等)。解析此信息并将原始文件写回驱动器的最佳方法是什么?
该二进制数据有可能实际上是电子邮件附件吗?我将如何重新创建电子邮件附件然后提取原始文件?
So I have decrypted a file and am left with a byte array containing this (Uni-encoded):
Content-Type: text/plain;
name="testfile.txt"
Content-Transfer-Encoding: binary
Content-Disposition: attachment;
filename="testfile.txt"
My super secret message.
Where "My super secret message." is the contents of the file, which could be any time of file contents (Word, Excel, etc.). What would be the best way of parsing this information and writing the original file back to the drive?
Is it possible that this binary data is actually an email attatchment? How would I go about re-creating the email attachment then pull out the original file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许这个 MIME 解析器会有所帮助:
http://www.codeproject.com/KB/cs /mime_project.aspx
Perhaps this MIME parser will help:
http://www.codeproject.com/KB/cs/mime_project.aspx