{"success":true,"data":{"ext":"wri","name":"Microsoft Write file","description":"Microsoft Write (WRI) is a legacy word-processing file format created by Microsoft and associated with the Microsoft Write application in early versions of Windows. It was used for simple text documents such as letters, notes, and basic reports, and can still be opened by some newer word processors through import support. The format is obsolete, and while generally safe, files from untrusted sources should be handled with standard caution.","mime":["application/x-mswrite"],"risk_level":"Safe","signatures":[{"hex":"31 BE 00 00","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"32 BE 00 00","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"31 BE","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]},{"hex":"32 BE","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]},{"hex":"BE 00 00 00 AB 00 00 00 00 00 00 00 00","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":[],"usage":{"python":"def is_wri(file_path: str) -> bool:\n    \"\"\"Check if file is a valid WRI by magic bytes.\"\"\"\n    signature = bytes([0x31, 0xBE, 0x00, 0x00])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isWRI(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x31, 0xBE, 0x00, 0x00]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsWRI(data []byte) bool {\n    signature := []byte{0x31, 0xBE, 0x00, 0x00}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"}}}