{"success":true,"data":{"ext":"wks","name":"Works for Windows spreadsheet file","description":"Works for Windows spreadsheet files are legacy worksheet documents created by Microsoft for the Microsoft Works productivity suite. They were used for budgeting, simple data analysis, and tabular recordkeeping, and could be opened and edited in Microsoft Works and some later Microsoft Office compatibility tools. As a discontinued format, WKS files may not render correctly in modern software, but they are generally considered safe to open when obtained from trusted sources.","mime":["application/vnd.ms-works"],"risk_level":"Safe","signatures":[{"hex":"0E 57 4B 53","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"},{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]},{"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"}]},{"hex":"FF 00 02 00 04 04 05 54 02 00","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["ods","ots","xls","xlsx","xlt","wcm"],"usage":{"python":"def is_wks(file_path: str) -> bool:\n    \"\"\"Check if file is a valid WKS by magic bytes.\"\"\"\n    signature = bytes([0x0E, 0x57, 0x4B, 0x53])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isWKS(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x0E, 0x57, 0x4B, 0x53]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsWKS(data []byte) bool {\n    signature := []byte{0x0E, 0x57, 0x4B, 0x53}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"},"category":"Office"}}