Windows Script Component

application/octet-stream

Safe

Magic Bytes

Offset: 0
3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D

Windows Script Component (WSC) is an XML-based file format developed by Microsoft for creating COM components using scripting languages such as VBScript or JScript. These files encapsulate logic into reusable objects that can be accessed by applications and scripts throughout the Windows environment. Now a legacy technology, WSC files were historically used for administrative automation and web components before being superseded by more modern development frameworks.

Extension

.wsc

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .wsc files in Python

Python
def is_wsc(file_path: str) -> bool:
    """Check if file is a valid WSC by magic bytes."""
    signature = bytes([0x3C, 0x3F, 0x78, 0x6D, 0x6C, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3D])
    with open(file_path, "rb") as f:
        return f.read(14) == signature

How to validate .wsc files in Node.js

Node.js
function isWSC(buffer: Buffer): boolean {
  const signature = Buffer.from([0x3C, 0x3F, 0x78, 0x6D, 0x6C, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3D]);
  return buffer.subarray(0, 14).equals(signature);
}
Go
func IsWSC(data []byte) bool {
    signature := []byte{0x3C, 0x3F, 0x78, 0x6D, 0x6C, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3D}
    if len(data) < 14 {
        return false
    }
    return bytes.Equal(data[:14], signature)
}

API Endpoint

GET /api/v1/wsc
curl https://filesignature.org/api/v1/wsc

Related Formats