WinAmp Playlist file
application/octet-stream
Magic Bytes
Offset: 0
5D FC C8 00
The Winamp Playlist (PLS) file format is a multimedia playlist specification originally developed by Nullsoft for use with the Winamp media player. It serves primarily to store lists of digital audio files or internet radio streams for sequential playback across various compatible media players. Although now largely considered a legacy format, it remains functional and presents minimal security risk as a structured configuration file that lacks executable code or embedded macro capabilities.
Validation Code
How to validate .pls files in Python
Python
def is_pls(file_path: str) -> bool:
"""Check if file is a valid PLS by magic bytes."""
signature = bytes([0x5D, 0xFC, 0xC8, 0x00])
with open(file_path, "rb") as f:
return f.read(4) == signature
How to validate .pls files in Node.js
Node.js
function isPLS(buffer: Buffer): boolean {
const signature = Buffer.from([0x5D, 0xFC, 0xC8, 0x00]);
return buffer.subarray(0, 4).equals(signature);
}
Go
func IsPLS(data []byte) bool {
signature := []byte{0x5D, 0xFC, 0xC8, 0x00}
if len(data) < 4 {
return false
}
return bytes.Equal(data[:4], signature)
}
API Endpoint
GET
/api/v1/pls
curl https://filesignature.org/api/v1/pls