{"success":true,"data":{"ext":"dwg","name":"GenericAutoCADdrawing file","description":"DWG is a proprietary image and drawing file format developed and maintained by Autodesk for AutoCAD and related computer-aided design software. It is used to store 2D and 3D technical drawings, architectural plans, engineering schematics, and other vector-based design documents. The format has long-standing industry support, but compatibility can vary across versions and third-party viewers, so files from untrusted sources should still be opened with standard caution.","mime":["image/vnd.dwg"],"risk_level":"Safe","signatures":[{"hex":"4D 43 30 2E 30","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":"41 43 31 2E 32","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":"41 43 31 2E 34 30","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":"41 43 31 2E 35 30","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":"41 43 32 2E 31 30","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":"41 43 32 2E 32 31","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":"41 43 32 2E 32 32","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":"41 43 30 30 30 30","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":"41 43","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["cgm","emf","svg","svgz","wmf","ai"],"usage":{"python":"def is_dwg(file_path: str) -> bool:\n    \"\"\"Check if file is a valid DWG by magic bytes.\"\"\"\n    signature = bytes([0x4D, 0x43, 0x30, 0x2E, 0x30])\n    with open(file_path, \"rb\") as f:\n        return f.read(5) == signature","node":"function isDWG(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x4D, 0x43, 0x30, 0x2E, 0x30]);\n  return buffer.subarray(0, 5).equals(signature);\n}","go":"func IsDWG(data []byte) bool {\n    signature := []byte{0x4D, 0x43, 0x30, 0x2E, 0x30}\n    if len(data) < 5 {\n        return false\n    }\n    return bytes.Equal(data[:5], signature)\n}"},"category":"Images"}}