Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.
Комментарий: Published by Scroll Versions from space TMAG and version 7.9
Sv translation
languageru

Файл  Файл /opt/iw/tm5/etc/config-perm/bookworm/extractors.xml xml содержит настройки справочника и  базу базу cигнатур, c помощью которых определяется тип файлов при распаковке архивов и вложений.

Scroll Table Layout
widths30%, 70%

Параметр

Описание и примеры настройки

FilenameCharsets

Если кодировка имени файла отличается от стандартной (ANSI, UTF), то файл будет обрабатываться как соответствующий кодировкам, указанным в данном параметре. Несколько значений перечисляются через запятую; Система будет последовательно пытаться обработать файл в перечисленных кодировках, пока не найдет похожую.

Значения по умолчанию

– 

– UTF-8, cp1251, cp866

MinFileSizeInBytes

Минимальный размер файла (в байтах), подлежащего распаковке. Это ограничение позволяет увеличить производительность Системы, за счет отказа от распаковки небольших файлов.

Значение по умолчанию

– 

– 10

Примечание: Обработка файлов размером меньше 10 байт не поддерживается.


Данное ограничение также распространяется на тип событий Буфер обмена.

 

MaxTextPlainSizeInKb

Верхняя граница размера файла, сигнатура которого не определена. При превышении порогового значения файл автоматически считается бинарным и не отправляется на анализ в iw_cas.

Значение по умолчанию

– 

– 25600

SpeedInKBs

Предположительная скорость работы экстрактора в расчете на 1 ГГц частоты процессора (в Кб/с). Может принимать целочисленные значения от 1 и выше.

Значение по умолчанию – 100

TimeoutInSec

Время ожидания до завершения обработки файла (в секундах).

Значение по умолчанию – 1800

UseLog

Логирование экстрактора.

Значение по умолчанию – false

Если общие значения параметров TimeoutInSec  и  и MinFileSizeInBytes не не подходят для каких-либо типов файлов, включите эти параметры в секции для нужных типов файлов с другими значениями

Примечание
titleПример

Время работы экстрактора можно вычислить по формуле:

Время работы экстрактора = Размер файла в Кб / 1024 / ( SpeedInKBs * Тактовая_частота процессора в МГц / 1000)

Остальные секции содержат сигнатуры, при помощи которых детектируются типы файлов, находящиеся во вложениях и архивах. Секции имеют следующий набор параметров:

Scroll Table Layout
widths30%, 70%

Параметр

Описание и примеры настройки

Extension

Расширение файла архива. Необязательный параметр, необходим для корректной работы некоторых архиваторов, которые требуют наличия правильного расширения входных

файлов 

файлов.

Пример

 

: Ext = arj

Name

Имя формата. Используется для точного определения имени формата при распаковке файла.

 

Для определения/уточнения формата может включать также список имен:

 

"defaultname, name1(code1), name2(code2)" 

В этом случае формат определяется на основании кода (codeN), присвоенного файлу при распаковке. Например, если распаковка завершается с кодом code1, то считается, что файл имеет формат name1. Список имен может также включать имя по умолчанию (defaultname), которое будет присваиваться в случаях, когда код не присвоен:

 

Пример 1
  • Пример 1 (одно имя формата)
 
  • : text/
xml 
  • xml 
Пример 2
  • Пример 2 (список
 
  • имен
 
  • формата)
 
  • : "application/arj, UNKNOWN(9), text/encrypted(4)"
 

По умолчанию формат файла определяется как application/arj. Если формат архива не удается определить, ему присваивается имя UNKNOWN.

 

Для зашифрованного архива используется имя формата text/encrypted.

Signature

Сигнатура формата, которая представляет собой

«образцовую»

"образцовую" последовательность значений (байтов) с начальным смещением и масками. Эта последовательность необходима для однозначного определения формата файлов по их

содержимому 

содержимому.

Сигнатура может включать до 16 триад вида

: 

[OFFSET]:BYTE_VALUE/[MASK]

 

Допускается также и строковая сигнатура, например, "BZh"

,

для BZIP2. Эта сигнатура означает указанную последовательность байтов от

смещения 0

смещения 0. Поиск строковых сигнатур выполняется без учета регистра символов.

 

Параметр OFFSET является необязательным. Для первого байта этот параметр по умолчанию

равен 0

равен 0, для всех последующих – увеличивается на единицу. Смещение можно задать с символом

«

"?

»

" – поиск образца в первых N байтах файла. Например, для поиска образца в первых 500 байтах файла, нужно задать смещение

'

"500?

'

".

 

Параметр MASK

,

также является необязательным и

равен 

равен 0xFF

 по

по умолчанию.

 

Пример

 

(сигнатура заголовка WAV-формата): 


Sign = "'RIFF', 0x8: 'WAVEfmt'" 

Начиная от смещения 0, расположена последовательность 'R', 'I', 'F', 'F', далее от смещения 8 должно следовать 'W', 'A', 'V', 'E', 'f', 'm', 't'

Comment

Комментарий с пояснениями.

Например,

Пример (указание используемой версии архиватора):

 

Comment = "bzip2 v. 1.0.x"

Command

Строка команды для извлечения файлов.

Например, 

Пример:

Extract = "/usr/bin/bzip2 -f -dc ${SRC} > ${OUTDIR}/${SRC}"

 

где ${OUTDIR} – каталог, в который будет распакован архив, а ${SRC}

 –

– имя файла, который

нужно

необходимо распаковать

ExcludeFromContext

Если параметр включен (On), то распаковка объекта выполняется, но информация об архиваторе не добавляется в XML-контекст объекта. Это позволяет не отображать в контексте объекта фиктивные контейнеры типа MS-TNEF. По умолчанию параметр отключен (Off).

CaseInsensitive

Учет регистра символов при обработке файла.

Значение по умолчанию – false

CreateTags

Извлечение метаинформации из файла.

Значение по умолчанию – true

Archive

Регламентирует вид извлеченной информации

. При значении true - файлы. При значении false -

:

  • true – файлы;
  • false – данные.
PIRegexp

Содержит описание сигнатуры PIRE для детектирования формата файла. Может быть указан несколько раз в пределах одного Extractor. Имеет атрибуты:

  • assurance
-
  • – достоверность определения формата файла этой сигнатурой
,
  • ;
  • offset
-
  • – смещение, на котором нужно начинать поиск этой сигнатуры
,
  • ;
  • max_length
-
  • – длина проверяемого участка
,
  • ;
  • case_sensitive
-
  • – включение значимости регистра букв в описании сигнатуры.
DetectableByRegexp

Может использоваться для отключения детектирования формата с помощью PIRE (для него будут использоваться сигнатуры из Signature).

OpenFifoRetryTimeoutТаймаут между попытками открыть
fifo
FIFO-очередь
OpenFifoRetryCountКоличество попыток открыть
fifo
FIFO-очередь
ResultCharsetУказывает кодировку извлеченного экстрактором текста.
NeedProcess
Нужно
Требуется ли файлы с
указанным mime
указанным  MIME-типом отправлять на анализ.
Sv translation
languageen

The /opt/iw/tm5/etc/config-perm/bookworm/extractors.xml xml file contains directory settings and signatures base which define file types when unpacking archives and enclosures.

Parameter

Description

FilenameCharsets

If file name encoding differs from the standard one (ANSI, UTF) then the filename processes as corresponding to encodings listed in this setting. Several values are listed comma separated; the System sequentially tries to process the filename in listed encodings while it finds a matched one.

The default

value is

values are UTF-8, cp1251, cp866

MinFileSizeInBytes

Minimum file size (in bytes) subjected to unpacking. This limit lets increase the System performance due to refusing of small files unpacking.

The default value is 10

Note: Processing files

which

whose size is less than 10 bytes is not supported.


This limitation also applies to Clipboard events.

MaxTextPlainSizeInKb

Maximum size of file

, which

whose signature is not defined. Exceeding the threshold value file is automatically considered to be binary and is not sent to iw_cas.

The default value is 25600

SpeedInKBs

Proposed extractor’s operation speed per 1 GHz of the processor (in Kb/s). Can take integer values from 1 and greater.

The default value is 100

TimeoutInSec

Awaiting time till file processing ends (in seconds).

The default value is 1800

UseLog

Logging extractor.

The default value is false

If the general values of TimeoutInSec and MinFileSizeInBytes settings are not appropriated for some file types then enable these parameters in sections of needed file types with other values.

Информация
titleExample:

The extractor operating time can be calculated by the formula:

The extractor operating time = File size in KB / 1024 / (SpeedInKBs * CPU clock speed in MHz / 1000)

Other sections define signatures used for detection of file types from archives and enclosures. Each section contains the same set of parameters:

Parameter

Description

Extension

Extension of archive files.

Optional 

Optional parameter which is needed for correct operation of some archiving utilities requiring correct extensions of incoming files

Example:

Ext = arj

Name

Format name. Used for exact detection of format name when file unpacking.

To define detection/detailing of format the setting can include a list of names:

"defaultname, name1(code1), name2(code2)"

In this case the format can be defined basing on the code (codeN) assigned to the file when unpacking. For example, if the unpacking is ended with code1

code that

, the file is considered as having name1 format. The list of names can include default name (defaultname) which will be assigned when the code is

not 

not assigned:

  • Example 1 (one format name)
  • : text/xml

 

  • Example 2 (list of format names)
  • : "application/arj, UNKNOWN(9), text/encrypted(4)"

By default, the file format is defined as application/arj. Two others for specific cases are: unknown format (UNKNOWN), encrypted format (text/encrypted)

Signature

Format signature which is

«standard»

'standard' sequence of values (bytes) with initial displacement and masks. This sequence is needed for unambiguous definition of files format by the content of those files.

The signature can include up to 16 triades of the following

view

format:

[OFFSET]:BYTE_VALUE/[MASK]

There can be string signature like "BZh" for BZIP2. This signature means specified bytes sequence

from 0

from 0 displacement. The search of string signatures is

performed except for upper/lowercase distinction

not case-sensitive.

The OFFSET setting is optional. By default, it equals 0 for the first byte and increases by 1 for each later one. The displacement can be specified using

«

'?

» symbol 

' symbol – searching of

the 

the pattern in first N bytes of a file. For example, to search pattern in first 500 bytes, you should specify '500?' displacement.

The MASK setting is optional and equals to 0xFF by default.

Example (signature of a heading of WAV format):

Sign = "'RIFF', 0x8: 'WAVEfmt'"

Starting from 0 displacement, there is a sequence 'R',

 

'I',

 

'F',

 

'F', then from 8 displacement there should be 'W',

 

'A',

 

'V',

 

'E',

 

'f',

 

'm',

 

't'

Comment

The explanation commentary

, for example,

Example (indicating the version of archiving utility):

Comment = "bzip2 v. 1.0.x"

Command

Command string for file extracting

, for example,

Example:

Extract = "/usr/bin/bzip2 -f -dc ${SRC} > ${OUTDIR}/${SRC}"

where 

Where ${OUTDIR} is a catalogue where to the archive will be extracted and ${SRC}

 is

is a name of file to unpack.

ExcludeFromContext

If the parameter is enabled (On) then the file is unpacked but information on archiving utility is not added to object’s XML-context. This lets to let out the fictional containers like MS-TNEF from object’s context. By default, the parameter is disabled (Off).

CaseInsensitive

Indicates whether

the symbol register will be taken into account in

file processing

or not. Default value is 

is case-sensitive.

The default value is false

CreateTags

Indicates

if there is an extracting of the

whether to extract metadata from

the

a file

when proceeding by TM extractors

.

The default value is true

Archive

Regulates the kind of retrieved information

. When

:

  • true
-
  • – files
. When
  • ;
  • false
-
  • – data.

PIRegexp

Contains a description of PIRE signature for file format detection. Can be specified several times

withing

within the same Extractor.

 Includes

Includes the following attributes:

  • assurance
-
  • – the accuracy of detecting file format with this signature;
  • offset
-
  • – offset where to start searching for the signature;
  • max_length
-
  • – the length of the section to be checked;
  • case_sensitive
-
  • – enables case sensitivity in the signature description.

DetectableByRegexp

Allows you to disable format detection by means of PIRE (instead, signatures from Signature will be used).

OpenFifoRetryTimeout

Timeout during few attempts to open
fifo
FIFO queue

OpenFifoRetryCount

Number of
attempts to
attempts to open
fifo
FIFO queue

ResultCharset

Specifies the code of extracted text.

NeedProcess

If the files with
mime
MIME type specified should be sent for analysis.