Flight Simulator Aircraft Configuration file

application/octet-stream

Safe

Magic Bytes

Offset: 0
5B 70 6C 61 79 6C 69 73 74 5D

Flight Simulator Aircraft Configuration (CFG) is a plain text settings format developed by Microsoft for use within the Microsoft Flight Simulator franchise. It utilizes a structured initialization syntax to define essential aircraft parameters, including flight dynamics, visual model references, and cockpit gauge layouts. While inherently safe to view and edit using standard text editors, incorrect modifications to configuration variables can result in simulation instability or aircraft loading failures.

Extension

.cfg

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .cfg files in Python

Python
def is_cfg(file_path: str) -> bool:
    """Check if file is a valid CFG by magic bytes."""
    signature = bytes([0x5B, 0x70, 0x6C, 0x61, 0x79, 0x6C, 0x69, 0x73, 0x74, 0x5D])
    with open(file_path, "rb") as f:
        return f.read(10) == signature

How to validate .cfg files in Node.js

Node.js
function isCFG(buffer: Buffer): boolean {
  const signature = Buffer.from([0x5B, 0x70, 0x6C, 0x61, 0x79, 0x6C, 0x69, 0x73, 0x74, 0x5D]);
  return buffer.subarray(0, 10).equals(signature);
}
Go
func IsCFG(data []byte) bool {
    signature := []byte{0x5B, 0x70, 0x6C, 0x61, 0x79, 0x6C, 0x69, 0x73, 0x74, 0x5D}
    if len(data) < 10 {
        return false
    }
    return bytes.Equal(data[:10], signature)
}

API Endpoint

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

Related Formats