File Identification
    • PDF

    File Identification

    • PDF

    Article summary

    Glasswall provides the ability to quickly determine the file type for a given file without fully processing the file, provided that the file format is supported by the Glasswall engine. This enables the user to accurately determine the file type regardless of the presence of a file extension or where the file extension has been modified. The Glasswall Embedded Engine utilises one or more methods to provide a reliable best guess of the file type.

    Identification of Supported Filetypes

    For file formats supported by the Glasswall Embedded Engine, the engine can attempt to determine the file type regardless of the presence of a file extension or where the file extension has been modified. One or more of the following methods are used to provide a reliable best guess of the file type:

    • Parsing parts of the file structure.
    • Magic number and header signature checks.
    • Class ID (GUID) lookups.

    This approach can be combined with alternative filetype detection methods (e.g., the `GW2GetFileTypeID` API call which identifies the filetype from the extension) to detect potential cases of file masquerading.

    Character Encoding Detection

    The Glasswall Embedded Engine can also detect the encoding of different text file formats not normally supported by the Glasswall engine. This is performed after the input file has been checked against "best guess" identification for all supported filetypes and will discern whether the input file uses ASCII or UTF-8 encoding.

    Learn more


    Was this article helpful?

    What's Next