ISO-9660 CD Disc ImageThis signature usually occurs at byte offset 32769
application/x-iso9660-image
Magic Bytes
Offset: 32769
43 44 30 30 31
The ISO 9660 CD Disc Image is an archive file format containing an exact sector-by-sector copy of data on an optical disc, standardized by the International Organization for Standardization. It is primarily utilized for distributing operating system installers, software packages, and creating digital backups of physical media like CD-ROMs and DVDs. Although the file structure itself poses minimal security risks, users should verify the integrity of contained executable files before mounting or burning the image.
Validation Code
How to validate .iso files in Python
Python
def is_iso(file_path: str) -> bool:
"""
Check if file is a valid ISO by magic bytes.
Signature offset: 32769 bytes
"""
signature = bytes([0x43, 0x44, 0x30, 0x30, 0x31])
with open(file_path, "rb") as f:
f.seek(32769)
return f.read(5) == signature
How to validate .iso files in Node.js
Node.js
function isISO(buffer: Buffer): boolean {
// Signature offset: 32769 bytes
const signature = Buffer.from([0x43, 0x44, 0x30, 0x30, 0x31]);
if (buffer.length < 32774) return false;
return buffer.subarray(32769, 32774).equals(signature);
}
Go
func IsISO(data []byte) bool {
// Signature offset: 32769 bytes
signature := []byte{0x43, 0x44, 0x30, 0x30, 0x31}
if len(data) < 32774 {
return false
}
return bytes.Equal(data[32769:32774], signature)
}
API Endpoint
GET
/api/v1/iso
curl https://filesignature.org/api/v1/iso