{"success":true,"data":{"ext":"wps","name":"MSWorks text document","description":"Microsoft Works text document (WPS) is a word-processing file format created by Microsoft for the Works productivity suite. It was used to store letters, reports, simple manuscripts, and other basic documents in Microsoft Works and compatible office applications. The format is now considered legacy, and support in modern software is limited; opening files from untrusted sources should still be handled cautiously.","mime":["application/vnd.ms-works"],"risk_level":"Safe","signatures":[{"hex":"D0 CF 11 E0 A1 B1 1A E1","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"},{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["odt","ott","rtf","wpd","doc","dot"],"usage":{"python":"def is_wps(file_path: str) -> bool:\n    \"\"\"Check if file is a valid WPS by magic bytes.\"\"\"\n    signature = bytes([0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1])\n    with open(file_path, \"rb\") as f:\n        return f.read(8) == signature","node":"function isWPS(buffer: Buffer): boolean {\n  const signature = Buffer.from([0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1]);\n  return buffer.subarray(0, 8).equals(signature);\n}","go":"func IsWPS(data []byte) bool {\n    signature := []byte{0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1}\n    if len(data) < 8 {\n        return false\n    }\n    return bytes.Equal(data[:8], signature)\n}"},"category":"Office"}}