About Custom Media Type Signatures
The Custom Media Type allows you to define a hexadecimal signature that can be identified at the start or end of a media type file and the offset, in bytes, from the start or end of the file.
When adding a new signature:
- The Signature Pattern cannot be longer than the offset +1, if searching from the end of the file.
- The Signature Pattern must only contain valid hexadecimal values within the range of 0-255.
- Each byte in the Signature Pattern must be separated by a space.
- The value of the offset that the search will start from must be between 0 and 2147483647, where an offset of zero would search from the start or end of a file.
A Hex Editor can be used to identify a particular signature in a file. For further information, see knowledge base article #1161 "Custom Media Types using Fingerprint Utilities" on the Clearswift Support Portal.
Examples
These examples are based on the following hexadecimal strings at the start and end of a file:
84 2A 4B 3D 22............20 56 68 00 00 2A 17 4A 65
Example 1
To identify the value 4A one byte from the end of a file:
- Enter 4A in the Signature Pattern field.
- Select end of the file in the From field.
- Enter 1 in the Offset field.
Example 2
To identify the value 20 56 68 00 00 2A 17 4A 65 nine bytes from the end of a file:
- Enter 20 56 68 00 00 2A 17 4A 65 in the Signature Pattern field.
- Select end of the file in the From field.
- Enter 9 in the Offset field.
Example 3
To identify the value 84 2A 4B 3D 22 at the start of a file:
- Enter 84 2A 4B 3D 22 in the Signature Pattern field.
- Select start of the file in the From field.
- Enter 0 in the Offset field.
Example 4
To identify the value 4B 3D 22 two bytes from the start of a file:
- Enter 4B 3D 22 in the Signature Pattern field.
- Select start of the file in the From field.
- Enter 2 in the Offset field.
|
We recommend that defined signatures should be as long as possible. Single byte sequences are not recommended. |