{"success":true,"data":{"ext":"onepkg","name":"OneNote Package file","description":"OneNote Package (ONEPKG) is a Microsoft file format used to package Microsoft OneNote notebook content for distribution and archiving. It is used for sharing notebooks, transferring notes between devices, and storing collections of pages, sections, and attachments in a single file. The format is generally safe, but like other document containers it may include embedded files or links, so opening packages from untrusted sources should be done with caution.","mime":["application/onenote; format=package"],"risk_level":"Safe","signatures":[{"hex":"4D 53 43 46","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["cab","snp"],"usage":{"python":"def is_onepkg(file_path: str) -> bool:\n    \"\"\"Check if file is a valid ONEPKG by magic bytes.\"\"\"\n    signature = bytes([0x4D, 0x53, 0x43, 0x46])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isONEPKG(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x4D, 0x53, 0x43, 0x46]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsONEPKG(data []byte) bool {\n    signature := []byte{0x4D, 0x53, 0x43, 0x46}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"}}}