Windows application log
application/octet-stream
Magic Bytes
Offset: 0
7B 22 75 72 6C 22 3A 20 22 68 74 74 70 73 3A 2F
The Windows application log file format, identified by the .lgc extension, is a text-based logging standard utilized by Microsoft Windows and associated software components. These files primarily store diagnostic data, operational events, and system telemetry in a structured JSON format to assist administrators in troubleshooting software errors and performance issues. As plain text containers, they pose minimal security risks, though they may contain sensitive system configuration details readable by standard text editors.
Validation Code
How to validate .lgc files in Python
Python
def is_lgc(file_path: str) -> bool:
"""Check if file is a valid LGC by magic bytes."""
signature = bytes([0x7B, 0x22, 0x75, 0x72, 0x6C, 0x22, 0x3A, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3A, 0x2F])
with open(file_path, "rb") as f:
return f.read(16) == signature
How to validate .lgc files in Node.js
Node.js
function isLGC(buffer: Buffer): boolean {
const signature = Buffer.from([0x7B, 0x22, 0x75, 0x72, 0x6C, 0x22, 0x3A, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3A, 0x2F]);
return buffer.subarray(0, 16).equals(signature);
}
Go
func IsLGC(data []byte) bool {
signature := []byte{0x7B, 0x22, 0x75, 0x72, 0x6C, 0x22, 0x3A, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3A, 0x2F}
if len(data) < 16 {
return false
}
return bytes.Equal(data[:16], signature)
}
API Endpoint
GET
/api/v1/lgc
curl https://filesignature.org/api/v1/lgc