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.