The Bat!secure e-mail Message Base Index file

application/octet-stream

Safe

Magic Bytes

Offset: 8
00 00 00 00 62 31 05 00 09 00 00 00 00 20 00 00 00 09 00 00 00 00 00 00

The Bat! secure e-mail Message Base Index is a proprietary format created by Ritlabs for managing internal database pointers. These files function as structural maps for associated message storage, allowing the application to quickly locate and sort email records without scanning entire datasets. While inherently safe as a non-executable data structure, the format is unique to The Bat! ecosystem and often requires maintenance during database corruption.

Extension

.tbi

MIME Type

application/octet-stream

Byte Offset

8

Risk Level

Safe

Validation Code

How to validate .tbi files in Python

Python
def is_tbi(file_path: str) -> bool:
    """
    Check if file is a valid TBI by magic bytes.
    Signature offset: 8 bytes
    """
    signature = bytes([0x00, 0x00, 0x00, 0x00, 0x62, 0x31, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00])
    with open(file_path, "rb") as f:
        f.seek(8)
        return f.read(24) == signature

How to validate .tbi files in Node.js

Node.js
function isTBI(buffer: Buffer): boolean {
  // Signature offset: 8 bytes
  const signature = Buffer.from([0x00, 0x00, 0x00, 0x00, 0x62, 0x31, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);
  if (buffer.length < 32) return false;
  return buffer.subarray(8, 32).equals(signature);
}
Go
func IsTBI(data []byte) bool {
    // Signature offset: 8 bytes
    signature := []byte{0x00, 0x00, 0x00, 0x00, 0x62, 0x31, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
    if len(data) < 32 {
        return false
    }
    return bytes.Equal(data[8:32], signature)
}

API Endpoint

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

Related Formats