WordStar Version 5
application/octet-stream
Magic Bytes
Offset: 0
1F 8B 08
WordStar Version 5 is a proprietary word processing format developed by MicroPro International for early personal computer operating systems. It was extensively utilized for drafting long-form manuscripts, legal papers, and structured documents that required specific printer control codes for advanced formatting. This legacy format is currently obsolete; while it poses minimal security risk, modern users generally require legacy software or dedicated file converters to view or extract the original data.
Validation Code
How to validate .ws files in Python
Python
def is_ws(file_path: str) -> bool:
"""Check if file is a valid WS by magic bytes."""
signature = bytes([0x1F, 0x8B, 0x08])
with open(file_path, "rb") as f:
return f.read(3) == signature
How to validate .ws files in Node.js
Node.js
function isWS(buffer: Buffer): boolean {
const signature = Buffer.from([0x1F, 0x8B, 0x08]);
return buffer.subarray(0, 3).equals(signature);
}
Go
func IsWS(data []byte) bool {
signature := []byte{0x1F, 0x8B, 0x08}
if len(data) < 3 {
return false
}
return bytes.Equal(data[:3], signature)
}
API Endpoint
GET
/api/v1/ws
curl https://filesignature.org/api/v1/ws