{"success":true,"data":{"ext":"wasm","name":"Wasm","description":"WebAssembly (Wasm) is a portable binary instruction format for the web, standardized by the World Wide Web Consortium (W3C) and developed by the WebAssembly Community Group. It is used to run code compiled from languages such as C, C++, Rust, and AssemblyScript in web browsers, serverless environments, and other runtime platforms. As a low-level code format, it should be obtained from trusted sources, although the format itself is not inherently dangerous.","mime":["application/wasm"],"risk_level":"Safe","signatures":[{"hex":"00 61 73 6D","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"},{"name":"Neil Harvey FileSignatures","url":"https://raw.githubusercontent.com/neilharvey/FileSignatures/master/src/FileSignatures/Formats/Wasm.cs"}]}],"related":["a","bin","com","dll","elf","exe"],"usage":{"python":"def is_wasm(file_path: str) -> bool:\n    \"\"\"Check if file is a valid WASM by magic bytes.\"\"\"\n    signature = bytes([0x00, 0x61, 0x73, 0x6D])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isWASM(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x00, 0x61, 0x73, 0x6D]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsWASM(data []byte) bool {\n    signature := []byte{0x00, 0x61, 0x73, 0x6D}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"},"category":"Executables"}}