XPCOM type libraries for the XPIDL compiler (.xpt)
.xpt file signature | application/octet-stream
XPCOM type libraries for the XPIDL compiler
Magic Bytes
Offset 0
48 45 41 44 45 52 20 52 45 43 4F 52 44 2A 2A 2A
Sources: Gary Kessler
All Known Signatures
3 signature variants are documented for .xpt files across multiple sources.
| Hex Signature | Offset | Sources |
|---|---|---|
| 48 45 41 44 45 52 20 52 45 43 4F 52 44 2A 2A 2A | 0 | Gary Kessler |
| 50 4B 03 04 | 0 | Gary Kessler |
| 58 50 43 4F 4D 0A 54 79 70 65 4C 69 62 | 0 | Gary Kessler |
Extension
.xpt
MIME Type
application/octet-stream
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .xpt files in Python
def is_xpt(file_path: str) -> bool:
"""Check if file is a valid XPT by magic bytes."""
signature = bytes([0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x20, 0x52, 0x45, 0x43, 0x4F, 0x52, 0x44, 0x2A, 0x2A, 0x2A])
with open(file_path, "rb") as f:
return f.read(16) == signature
How to validate .xpt files in Node.js
function isXPT(buffer: Buffer): boolean {
const signature = Buffer.from([0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x20, 0x52, 0x45, 0x43, 0x4F, 0x52, 0x44, 0x2A, 0x2A, 0x2A]);
return buffer.subarray(0, 16).equals(signature);
}
How to validate .xpt files in Go
func IsXPT(data []byte) bool {
signature := []byte{0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x20, 0x52, 0x45, 0x43, 0x4F, 0x52, 0x44, 0x2A, 0x2A, 0x2A}
if len(data) < 16 {
return false
}
return bytes.Equal(data[:16], signature)
}
API Endpoint
/api/v1/xpt
curl https://filesignature.org/api/v1/xpt
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .xpt file?
A .xpt file is a XPCOM type libraries for the XPIDL compiler file. XPCOM type libraries for the XPIDL compiler
What are the magic bytes for .xpt files?
The magic bytes for XPCOM type libraries for the XPIDL compiler files are 48 45 41 44 45 52 20 52 45 43 4F 52 44 2A 2A 2A at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .xpt file?
To validate a .xpt file, read the first bytes of the file and compare them against the known magic bytes (48 45 41 44 45 52 20 52 45 43 4F 52 44 2A 2A 2A) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .xpt files?
There is no officially registered MIME type for .xpt files. Systems typically use application/octet-stream as a generic fallback when handling this format.
Is it safe to open .xpt files?
XPCOM type libraries for the XPIDL compiler (.xpt) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.