在写入光盘之前处理文件内容 C#

发布于 2024-09-10 05:51:49 字数 368 浏览 4 评论 0原文

所以我解密了一个文件,并留下一个包含此(统一编码)的字节数组:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

勿忘初心 2024-09-17 05:51:49

也许这个 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文