Windows prefetch file
application/octet-stream
Magic Bytes
Offset: 0
53 43 48 6C
A Windows prefetch file is a proprietary data format created by Microsoft for the Windows operating system to improve application startup performance. The system uses these files to store information about the memory and disk resources required by an executable during its initial launch. While primarily used for system optimization, these files are highly significant in digital forensics for proving application execution and establishing timelines of user activity on a workstation.
Validation Code
How to validate .pf files in Python
Python
def is_pf(file_path: str) -> bool:
"""Check if file is a valid PF by magic bytes."""
signature = bytes([0x53, 0x43, 0x48, 0x6C])
with open(file_path, "rb") as f:
return f.read(4) == signature
How to validate .pf files in Node.js
Node.js
function isPF(buffer: Buffer): boolean {
const signature = Buffer.from([0x53, 0x43, 0x48, 0x6C]);
return buffer.subarray(0, 4).equals(signature);
}
Go
func IsPF(data []byte) bool {
signature := []byte{0x53, 0x43, 0x48, 0x6C}
if len(data) < 4 {
return false
}
return bytes.Equal(data[:4], signature)
}
API Endpoint
GET
/api/v1/pf
curl https://filesignature.org/api/v1/pf