MGW
application/octet-stream
Magic Bytes
Offset: 0
6D 61 69 6E 2E 62 73
The MGW file format is a proprietary project file created by Mental Image for use within the Mental Works software suite. It serves as a container for visual programming logic, storing configuration data, design schematics, and operational parameters required for simulation or hardware synthesis. As a legacy format associated with older logic design tools, it poses minimal security risks but requires specific obsolete software environments for proper interpretation and editing.
Validation Code
How to validate .mgw files in Python
Python
def is_mgw(file_path: str) -> bool:
"""Check if file is a valid MGW by magic bytes."""
signature = bytes([0x6D, 0x61, 0x69, 0x6E, 0x2E, 0x62, 0x73])
with open(file_path, "rb") as f:
return f.read(7) == signature
How to validate .mgw files in Node.js
Node.js
function isMGW(buffer: Buffer): boolean {
const signature = Buffer.from([0x6D, 0x61, 0x69, 0x6E, 0x2E, 0x62, 0x73]);
return buffer.subarray(0, 7).equals(signature);
}
Go
func IsMGW(data []byte) bool {
signature := []byte{0x6D, 0x61, 0x69, 0x6E, 0x2E, 0x62, 0x73}
if len(data) < 7 {
return false
}
return bytes.Equal(data[:7], signature)
}
API Endpoint
GET
/api/v1/mgw
curl https://filesignature.org/api/v1/mgw