{"success":true,"data":{"ext":"vhd","name":"Virtual PC Virtual HD imagedynamic disk header","description":"Virtual Hard Disk (VHD) is a disk image file format developed by Microsoft for Virtual PC and later maintained for use with Hyper-V and related Windows virtualization tools. It is used to store the contents of a virtual hard drive, support operating systems in virtual machines, and create backup, deployment, and testing images. VHD is a legacy format in some environments, but it remains widely supported; files should still be obtained from trusted sources.","mime":["application/x-vhd"],"risk_level":"Safe","signatures":[{"hex":"63 6F 6E 65 63 74 69 78","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"},{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]},{"hex":"63 78 73 70 61 72 73 65","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["vmdk","adf","dmg","bin","iso","toast"],"usage":{"python":"def is_vhd(file_path: str) -> bool:\n    \"\"\"Check if file is a valid VHD by magic bytes.\"\"\"\n    signature = bytes([0x63, 0x6F, 0x6E, 0x65, 0x63, 0x74, 0x69, 0x78])\n    with open(file_path, \"rb\") as f:\n        return f.read(8) == signature","node":"function isVHD(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x63, 0x6F, 0x6E, 0x65, 0x63, 0x74, 0x69, 0x78]);\n  return buffer.subarray(0, 8).equals(signature);\n}","go":"func IsVHD(data []byte) bool {\n    signature := []byte{0x63, 0x6F, 0x6E, 0x65, 0x63, 0x74, 0x69, 0x78}\n    if len(data) < 8 {\n        return false\n    }\n    return bytes.Equal(data[:8], signature)\n}"},"category":"Disk Images"}}