{"success":true,"data":{"ext":"csh","name":"Photoshop Custom Shape","description":"Photoshop Custom Shape (CSH) is a vector shape preset format created and maintained by Adobe for use in Adobe Photoshop. It is used to store reusable custom shape definitions for design work, including logos, icons, illustrations, and interface elements. The format is generally safe and does not typically contain executable content; however, as with any file received from untrusted sources, it should be opened with a current, trusted application.","mime":[],"risk_level":"Safe","signatures":[{"hex":"63 75 73 68 00 00 00 02 00 00 00","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["awk","bash","php","pl","pm","py"],"usage":{"python":"def is_csh(file_path: str) -> bool:\n    \"\"\"Check if file is a valid CSH by magic bytes.\"\"\"\n    signature = bytes([0x63, 0x75, 0x73, 0x68, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00])\n    with open(file_path, \"rb\") as f:\n        return f.read(11) == signature","node":"function isCSH(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x63, 0x75, 0x73, 0x68, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00]);\n  return buffer.subarray(0, 11).equals(signature);\n}","go":"func IsCSH(data []byte) bool {\n    signature := []byte{0x63, 0x75, 0x73, 0x68, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00}\n    if len(data) < 11 {\n        return false\n    }\n    return bytes.Equal(data[:11], signature)\n}"},"category":"Source Code"}}