Magic 字节识别器:常见错误与修复方法
实践中真正会出现的失败模式、它们在输出中长什么样,以及具体的修复办法。
使用方法
- 先检查输入编码——多余的字节顺序标记或非 UTF-8 粘贴会在工具运行之前就破坏结果。
- 留意静默截断:如果输出长度是可疑的整数,说明有内容被切掉了。
- 确认你改动的选项正是任务所需;残留的默认值是"结果看似合理却错误"的最常见原因。
- 先用你能手工验证的最小输入重跑,再把真实数据加回去。
示例
The PNG signature followed by the start of its IHDR chunk.
输入
89504E470D0A1A0A0000000D49484452
输出 — 搜索结果
Bytes: 89 50 4E 47 0D 0A 1A 0A ASCII: .PNG.... Detected: PNG image Signature matched: 89504E470D0A1A0A → PNG image Detection is by file signature, not by extension — this is how servers should validate uploads, since a client can rename anything to .png.
运行
说明
Identify a file type from its signature bytes rather than its extension — the safe way to validate uploads.
相关工具
文件 to Base64 转换器Encode any local file to Base64 — nothing is uploaded.Base64to 文件 DownloaderDecode Base64 back into the original file.文件哈希检查器MD5/SHA-1/SHA-256/SHA-512 of any file, computed locally.文件 MetadataViewerInspect name, MIME type, size and modification time.文件 to ZIP 打包器Bundle multiple files into a ZIP archive locally.Base64 编码器Encode text, JSON, URLs or files to Base64, standard or URL-safe.