{"success":true,"data":{"ext":"cwk","name":"CWK","description":"CWK is a legacy document format used by ClarisWorks and later AppleWorks, originally developed by Claris, a division of Apple. It was used for word processing documents and was opened and edited in those desktop office suites on classic Mac OS and Windows systems. The format is largely obsolete, and files from untrusted sources should be handled with care because older documents may not be supported by modern software.","mime":["application/x-appleworks"],"risk_level":"Safe","signatures":[{"hex":"02 00 5A 57 52 54 00 00 00 00 00 00 00 00 00 00","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"05 07 00 00 42 4F 42 4F","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"05 07 00 00 00 00 00 00","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"00 00 00 00 00 01","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"06 07 E1 00 42 4F 42 4F","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"06 07 E1 00 00 00 00 00","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":[],"usage":{"python":"def is_cwk(file_path: str) -> bool:\n    \"\"\"Check if file is a valid CWK by magic bytes.\"\"\"\n    signature = bytes([0x02, 0x00, 0x5A, 0x57, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00])\n    with open(file_path, \"rb\") as f:\n        return f.read(16) == signature","node":"function isCWK(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x02, 0x00, 0x5A, 0x57, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);\n  return buffer.subarray(0, 16).equals(signature);\n}","go":"func IsCWK(data []byte) bool {\n    signature := []byte{0x02, 0x00, 0x5A, 0x57, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}\n    if len(data) < 16 {\n        return false\n    }\n    return bytes.Equal(data[:16], signature)\n}"}}}