{"success":true,"data":{"ext":"bin","name":"BIN","description":"BIN is a generic binary file format used by multiple software systems, with no single universal specification or central maintainer. It is commonly used for stored program data, firmware images, disc images, and other application-specific binary resources. Because the extension is shared by many unrelated formats, files should be identified by their originating application before opening; some variants are legacy or proprietary.","mime":["application/octet-stream"],"risk_level":"Safe","signatures":[{"hex":"53 50 30 31","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"7F 45 4C 46","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":["a","adf","com","dll","dmg","elf"],"usage":{"python":"def is_bin(file_path: str) -> bool:\n    \"\"\"Check if file is a valid BIN by magic bytes.\"\"\"\n    signature = bytes([0x53, 0x50, 0x30, 0x31])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isBIN(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x53, 0x50, 0x30, 0x31]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsBIN(data []byte) bool {\n    signature := []byte{0x53, 0x50, 0x30, 0x31}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"},"category":"Disk Images"}}