ELF Header Only
ELF Header Only is a Executable and Linkable Format sample generated for file format testing. It can be used to test downloads, parsers, previews, and file type detection.
header-only.elfExecutable
Executable and Linkable Format is a executable format commonly identified by .elf, .so, .o. Use the listed signatures, MIME types, and structure notes to validate files beyond the extension.
7F 45 4C 46 .ELFSIGNATURE = bytes.fromhex("7f454c46")
OFFSET = 0
def is_elf(path: str) -> bool:
with open(path, "rb") as f:
f.seek(OFFSET)
head = f.read(len(SIGNATURE))
return head == SIGNATUREconst SIGNATURE = [0x7f, 0x45, 0x4c, 0x46];
const OFFSET = 0;
// bytes: a Uint8Array / Buffer holding the start of the file
export function isElf(bytes) {
return SIGNATURE.every((byte, i) => bytes[OFFSET + i] === byte);
}package fileid
import "bytes"
var iselfSignature = []byte{0x7f, 0x45, 0x4c, 0x46}
const iselfOffset = 0
func IsElf(b []byte) bool {
end := iselfOffset + len(iselfSignature)
if len(b) < end {
return false
}
return bytes.Equal(b[iselfOffset:end], iselfSignature)
}const SIGNATURE: &[u8] = &[0x7f, 0x45, 0x4c, 0x46];
const OFFSET: usize = 0;
fn is_elf(bytes: &[u8]) -> bool {
bytes.get(OFFSET..OFFSET + SIGNATURE.len()) == Some(SIGNATURE)
}<?php
$signature = "\x7f\x45\x4c\x46";
$offset = 0;
function is_elf(string $bytes): bool {
global $signature, $offset;
return substr($bytes, $offset, strlen($signature)) === $signature;
}Executable and Linkable Format is used to identify executables, binary modules, distribution artifacts, and upload restrictions. Inspect headers and structure without executing the file.
Executable formats should be downloaded only for inspection, not execution. Keep analysis isolated and separate extension checks, MIME checks, and execution permissions.
11 samples help test leading-byte detection, parser errors, upload limits, and download behavior.
ELF Header Only is a Executable and Linkable Format sample generated for file format testing. It can be used to test downloads, parsers, previews, and file type detection.
header-only.elfBlue Sky ELF is a Executable and Linkable Format sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
01-blue-sky.elf33d1bd8b7b68e5860a9808088017318e9d779d853b1c13f3a024656b78ae9984Flower Garden ELF is a Executable and Linkable Format sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
02-flower-garden.elf61de85ea51f6a030cc93a76c23024271eaee7d64b7e94b5e8d99d8777bb4c330Navy Blue Sky ELF is a Executable and Linkable Format sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
03-navy-blue-sky.elfce37bb7a1cf27ef7edec7b09300f34aa58f621d135f6d5c40fabee28ef9d3cbcNature of the Sky ELF is a Executable and Linkable Format sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
04-nature-sky.elf8cae3fc75763219223f29e59061f917da0759ec98ae7c8c58740104ff96b97b4Sky Landscape ELF is a Executable and Linkable Format sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
05-sky-landscape.elf5f7267b7c5d4dcf4bb4a0409822491122c352604626aea3fbfcf4cf38f42d4ddStarry Sky ELF is a Executable and Linkable Format sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
06-starry-sky.elf2f29360810b11615c5c4463edf4557f6061a65c07f8c4b9945e36eb69e88ecc1Blue Night Sky ELF is a Executable and Linkable Format sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
07-blue-night-sky.elf02d4e352fa8c3a23968d73cea83c821d6c90ae9dd91a4b0ecff467c887177ea9Hibiscus Flower ELF is a Executable and Linkable Format sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
08-hibiscus-flower.elf562b2bd2bdd21ddef9f73bd62d12f9b4beb3fc4819ed2d00a238e81b2a8703c3Arctic Sky ELF is a Executable and Linkable Format sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
09-arctic-sky.elf774efa9bc2275d012d0f52794ec3e33033db2e1131d6850b79e013c610fa470cNASA Blue Marble ELF is a Executable and Linkable Format sample based on NASA Image and Video Library. It can be used to test downloads, parsers, previews, and file type detection.
nasa-blue-marble-2012-east.elffbf2a14ae155f8399a9dd2e031a346f0949d42adbb5e474dfbb5ae2c58d64f9bExecutable and Linkable Format files begin with the byte signature 7F 45 4C 46 (".ELF"). Detect the format by reading these leading bytes rather than trusting the file extension alone.
The MIME type for Executable and Linkable Format is application/x-elf.
Executable and Linkable Format files use the .elf, .so, .o extension. The extension is a convention only and does not guarantee the file contents, so combine it with signature and structure checks.