{"success":true,"data":{"ext":"m","name":"M","description":"M is a file archive format associated with the M2 game development environment and maintained by its original developer, M2. It is used to package game assets and related resources for distribution, loading, and application data management. The format is generally considered safe, with no widely documented security concerns; however, as with any archive, files from untrusted sources should be handled with caution.","mime":[],"risk_level":"Safe","signatures":[{"hex":"6D 64 66 00","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":["c","h"],"usage":{"python":"def is_m(file_path: str) -> bool:\n    \"\"\"Check if file is a valid M by magic bytes.\"\"\"\n    signature = bytes([0x6D, 0x64, 0x66, 0x00])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isM(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x6D, 0x64, 0x66, 0x00]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsM(data []byte) bool {\n    signature := []byte{0x6D, 0x64, 0x66, 0x00}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"},"category":"Source Code"}}