ALIAS (.alias)
.alias file signature | application/octet-stream
macOS file Alias[75](Symbolic link)
Magic Bytes
Offset 0
62 6F 6F 6B 00 00 00 00 6D 61 72 6B 00 00 00 00
Sources: Wikipedia
Extension
.alias
MIME Type
application/octet-stream
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .alias files in Python
def is_alias(file_path: str) -> bool:
"""Check if file is a valid ALIAS by magic bytes."""
signature = bytes([0x62, 0x6F, 0x6F, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x61, 0x72, 0x6B, 0x00, 0x00, 0x00, 0x00])
with open(file_path, "rb") as f:
return f.read(16) == signature
How to validate .alias files in Node.js
function isALIAS(buffer: Buffer): boolean {
const signature = Buffer.from([0x62, 0x6F, 0x6F, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x61, 0x72, 0x6B, 0x00, 0x00, 0x00, 0x00]);
return buffer.subarray(0, 16).equals(signature);
}
How to validate .alias files in Go
func IsALIAS(data []byte) bool {
signature := []byte{0x62, 0x6F, 0x6F, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x61, 0x72, 0x6B, 0x00, 0x00, 0x00, 0x00}
if len(data) < 16 {
return false
}
return bytes.Equal(data[:16], signature)
}
API Endpoint
/api/v1/alias
curl https://filesignature.org/api/v1/alias
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .alias file?
A .alias file is a ALIAS file. macOS file Alias[75](Symbolic link)
What are the magic bytes for .alias files?
The magic bytes for ALIAS files are 62 6F 6F 6B 00 00 00 00 6D 61 72 6B 00 00 00 00 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .alias file?
To validate a .alias file, read the first bytes of the file and compare them against the known magic bytes (62 6F 6F 6B 00 00 00 00 6D 61 72 6B 00 00 00 00) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .alias files?
There is no officially registered MIME type for .alias files. Systems typically use application/octet-stream as a generic fallback when handling this format.
Is it safe to open .alias files?
ALIAS (.alias) 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.