是否可以在十六进制编辑器中修复ZIP文件的标头?

发布于 2025-01-30 08:38:35 字数 468 浏览 3 评论 0原文

我是文件结构或该领域的完全初学者。

我正在尝试提取一个.7Z文件,但它显示“无法打开file_name.7z作为存档”。因此,我研究并发现在六角编辑器中查看文件后,标头有问题 看起来像这样(许多行中的前3行): 我损坏的7Z文件的屏幕截图

在查看其他7Z文件之后,我看到了前两行中有数据与上述损坏的文件不同。例如: hex编辑器的工作7z文件的屏幕截图以供

参考还是缺少固定标头并提取文件?还是那里有从这个7Z文件中获取数据?

请帮助我获取这些信息,因为这些文件是我备份的数据,我没有它们的副本。

I am a completely beginner in file structures or in this field.

I am trying to extract a .7z file, but it shows "Cannot open file_name.7z as an archive". So i researched and found that there is something wrong in headers after looking the file in hex editor
which look like this(first 3 lines out of many lines):
hex editor screenshot of my corrupted 7z file

After looking at other 7z files hex editor, i saw that there is data in first two lines unlike the above corrupted file. For example:
hex editor screenshot of working 7z file for reference

I just want to know that can i get this corrupted or missing header fixed and extract file? or is there anyway to get data from this 7z file?

please help me with this information as these files are my backed up data and i dont have copy of them.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

躲猫猫 2025-02-06 08:38:35

假设标头是唯一受影响的部分,则可以使用hexedit37 7a Bc af50 4B 03 04替换。

  • 50 4B 03 04表示pk
  • 在任何修改示例之前备份文件

00000000   50 4B 03 04  14 00 00 00  00 00 27 6F  C6 54 00 00  00 00 00 00  00 00 00 00  00 00 0A 00  20 00 47 6F  20 69 6D 61  67 65 73 2F  55 54 0D 00  07 0B 4E 9E  PK........'o.T.............. .Go images/UT....N.
00000030   62 0C 4E 9E  62 0C 4E 9E  62 75 78 0B  00 01 04 F6  01 00 00 04  14 00 00 00  50 4B 03 04  14 00 08 00  08 00 27 6F  C6 54 00 00  00 00 00 00  00 00 D2 00  b.N.b.N.bux.............PK........'o.T..........

hexedit linux: https://linux.die.net/man/1/hexedit

Assuming the header is the only part affected, you can use hexedit to replace the 37 7A BC AF with 50 4B 03 04.

  • 50 4B 03 04 means ASCII translation of PK
  • Backup the file before any modification

example:

00000000   50 4B 03 04  14 00 00 00  00 00 27 6F  C6 54 00 00  00 00 00 00  00 00 00 00  00 00 0A 00  20 00 47 6F  20 69 6D 61  67 65 73 2F  55 54 0D 00  07 0B 4E 9E  PK........'o.T.............. .Go images/UT....N.
00000030   62 0C 4E 9E  62 0C 4E 9E  62 75 78 0B  00 01 04 F6  01 00 00 04  14 00 00 00  50 4B 03 04  14 00 08 00  08 00 27 6F  C6 54 00 00  00 00 00 00  00 00 D2 00  b.N.b.N.bux.............PK........'o.T..........

Hexedit linux: https://linux.die.net/man/1/hexedit

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