Macromedia Shockwave Flash player file
application/vnd.adobe.flash.movie
Magic Bytes
Offset: 0
43 57 53
The Macromedia Shockwave Flash (SWF) format is a multimedia file format originally developed by FutureWave Software and later maintained by Adobe Systems. This format was primarily utilized to deliver vector-based animations, interactive games, and streaming video content across the internet via browser plugins. Although it served as a primary standard for web interactivity for decades, Adobe officially deprecated the format in 2020 due to persistent security vulnerabilities and the industry-wide transition to HTML5.
Validation Code
How to validate .swf files in Python
Python
def is_swf(file_path: str) -> bool:
"""Check if file is a valid SWF by magic bytes."""
signature = bytes([0x43, 0x57, 0x53])
with open(file_path, "rb") as f:
return f.read(3) == signature
How to validate .swf files in Node.js
Node.js
function isSWF(buffer: Buffer): boolean {
const signature = Buffer.from([0x43, 0x57, 0x53]);
return buffer.subarray(0, 3).equals(signature);
}
Go
func IsSWF(data []byte) bool {
signature := []byte{0x43, 0x57, 0x53}
if len(data) < 3 {
return false
}
return bytes.Equal(data[:3], signature)
}
API Endpoint
GET
/api/v1/swf
curl https://filesignature.org/api/v1/swf