SCR
application/octet-stream
⚠️
High Risk Format
This file type can contain executable code. Always validate source and scan with antivirus before opening.
Magic Bytes
Offset: 0
4D 5A
The Windows Screen Saver (SCR) format is a specialized executable file developed by Microsoft for use within the Windows operating system environment. These files are primarily utilized to display animations or patterns after a period of user inactivity to prevent phosphor burn-in on older monitors. Because SCR files are functionally identical to standard EXE binaries, they pose a significant security risk and have historically been exploited by malicious actors for unauthorized code execution.
Validation Code
How to validate .scr files in Python
Python
def is_scr(file_path: str) -> bool:
"""Check if file is a valid SCR by magic bytes."""
signature = bytes([0x4D, 0x5A])
with open(file_path, "rb") as f:
return f.read(2) == signature
How to validate .scr files in Node.js
Node.js
function isSCR(buffer: Buffer): boolean {
const signature = Buffer.from([0x4D, 0x5A]);
return buffer.subarray(0, 2).equals(signature);
}
Go
func IsSCR(data []byte) bool {
signature := []byte{0x4D, 0x5A}
if len(data) < 2 {
return false
}
return bytes.Equal(data[:2], signature)
}
API Endpoint
GET
/api/v1/scr
curl https://filesignature.org/api/v1/scr