Skip to content

AOL and AIM buddy list file (.bag)

.bag file signature | application/octet-stream

AOL and AIM buddy list file

Safe

Magic Bytes

Offset 0
41 4F 4C 20 46 65 65 64 62 61 67

Sources: Gary Kessler

Extension

.bag

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .bag files in Python

Python
def is_bag(file_path: str) -> bool:
    """Check if file is a valid BAG by magic bytes."""
    signature = bytes([0x41, 0x4F, 0x4C, 0x20, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x67])
    with open(file_path, "rb") as f:
        return f.read(11) == signature

How to validate .bag files in Node.js

Node.js
function isBAG(buffer: Buffer): boolean {
  const signature = Buffer.from([0x41, 0x4F, 0x4C, 0x20, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x67]);
  return buffer.subarray(0, 11).equals(signature);
}

How to validate .bag files in Go

Go
func IsBAG(data []byte) bool {
    signature := []byte{0x41, 0x4F, 0x4C, 0x20, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x67}
    if len(data) < 11 {
        return false
    }
    return bytes.Equal(data[:11], signature)
}

API Endpoint

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

See the full API documentation for all endpoints and parameters.

Frequently Asked Questions

What is a .bag file?

A .bag file is a AOL and AIM buddy list file file. AOL and AIM buddy list file

What are the magic bytes for .bag files?

The magic bytes for AOL and AIM buddy list file files are 41 4F 4C 20 46 65 65 64 62 61 67 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .bag file?

To validate a .bag file, read the first bytes of the file and compare them against the known magic bytes (41 4F 4C 20 46 65 65 64 62 61 67) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .bag files?

There is no officially registered MIME type for .bag files. Systems typically use application/octet-stream as a generic fallback when handling this format.

Is it safe to open .bag files?

AOL and AIM buddy list file (.bag) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.