Firebird and Interbase database files
application/octet-stream
Magic Bytes
Offset: 0
01 01 47 19 A4 00 00 00 00 00 00 00
The GDB file format represents relational database files originally associated with Borland InterBase and subsequently maintained by the open-source Firebird SQL project. These files function as main storage containers for schema definitions, data tables, indices, and metadata within older database deployments. Although modern versions of these systems have largely transitioned to FDB or IB extensions to support newer architecture, GDB files remain viewable using compatible legacy database client software.
Validation Code
How to validate .gdb files in Python
Python
def is_gdb(file_path: str) -> bool:
"""Check if file is a valid GDB by magic bytes."""
signature = bytes([0x01, 0x01, 0x47, 0x19, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00])
with open(file_path, "rb") as f:
return f.read(12) == signature
How to validate .gdb files in Node.js
Node.js
function isGDB(buffer: Buffer): boolean {
const signature = Buffer.from([0x01, 0x01, 0x47, 0x19, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);
return buffer.subarray(0, 12).equals(signature);
}
Go
func IsGDB(data []byte) bool {
signature := []byte{0x01, 0x01, 0x47, 0x19, 0xA4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
if len(data) < 12 {
return false
}
return bytes.Equal(data[:12], signature)
}
API Endpoint
GET
/api/v1/gdb
curl https://filesignature.org/api/v1/gdb