Configuring KLBSCAN Parameters

This section discusses the klbscan tool options and its usage.

Syntax

klbscan [options] <path>[//<name>][...]

Parameters

<path>

Mandatory parameter. Specifies a path to the directory to scan. Scanning will be performed with directory recursion. If a relative path is specified, the scanning path is calculated relative to the current directory.

<name>

A file name or a file mask to scan. The "*" (asterisk) and "?" (question mark) wildcards can be used to substitute for any sequence of characters in file names, or a single character, correspondingly.

--disinfect

Optional parameter. This scanning mode switch parameter turns on the KAV_CLEAN_SKIP cleaning mode in the KAV Engine. This mode enables automatic disinfection for threats found during scanning procedure. If disinfection attempt fails, the current file will be skipped. For more information about the cleaning modes, see section "Cleaning modes".

--delete

Optional parameter. This scanning mode switch parameter turns on the KAV_DELETE cleaning mode in the KAV Engine. This mode enables the scanning engine to automatically delete infected files found during scanning procedure. For more information about the cleaning modes, see section "Cleaning modes".

By default, when no scanning mode switch parameter is specified, the KAV Engine works in the KAV_SKIP cleaning mode. No attempt to disinfect a found malware is made in this mode by the KAV Engine. When malware is detected, the scanning engine reports a result and proceeds with the next file thus skipping handling of the current infected file.

When both the --disinfect and --delete parameters are specified, the KAV_CLEAN_DELETE mode is enabled. In this mode the KAV Engine attempts to disinfect the file and, if disinfection is impossible, the infected file will be deleted. If for some reason deletion of the file is not possible, the file will be skipped, and the KAV Engine moves to scanning the next file in the scanning queue (if any).

For more information about the cleaning modes, see section "Cleaning modes".

--scanner-type=[inproc|service|outproc]

Optional parameter. Turns on one of the specified hosting modes for the KAV Engine. The following mode specifiers are available:

By default, when the --scanner-type switch parameter is not specified, the in-process hosting mode is used for the KAV Engine.

For more information about the hosting types, see the "Scanner host types" table in section "Initialization flags".

--task-threads=0…256

Optional parameter. This parameter specifies the number of scanning threads spawned by the scanning engine to provide for multiprocessing and varies from 0 to 256. The default value is 2 and the scanning engine spawns 2 instances. The maximum number of spawned instances should not exceed 256.

On Unix systems the number of the of scanning processes depends on the number of client threads or connections.

--heuristic-level=[shallow|medium|detail]

Optional parameter. Turns on one of the specified levels of heuristic analysis performed by the KAV Engine. The following specifiers are available:

By default, when the --heuristic-level switch parameter is not specified, heuristic analysis is not performed during the scanning procedure.

--archives

Optional parameter. This switch parameter turns on support for scanning within archives and self-extracting (SFX) archives. Specifying this parameter enables the KAV_O_M_ARCHIVED flag for the KAV Engine.

--packed

Optional parameter. This switch parameter turns on support for scanning and unpacking of packed executables, like UPX-packed EXEs and other compressed PE files. Specifying this parameter enables the KAV_O_M_PACKED flag for the KAV Engine.

--mail-bases

Optional parameter. This switch parameter turns on support for scanning within email databases like DBX files. Specifying this parameter enables the KAV_O_M_MAILBASES flag for the KAV Engine.

--mail-plain

Optional parameter. This switch parameter turns on support for scanning within email messages. Specifying this parameter enables the KAV_O_M_MAILPLAIN flag for the KAV Engine.

--license-path

Optional parameter. This parameter allows you to specify a custom location for the appinfo.kli application ID file and the license key file. These files are necessary for the KAV Engine to initialize properly. By default, the KAV Engine looks up for these files within the directory containing the anti-virus database.

By default, the anti-virus database is stored within the ./bases directory related to the KAV SDK program directory.

--database-path

Optional parameter. This parameter allows you to specify a custom location for the anti-virus database files. These files are necessary for the KAV Engine to initialize properly.

By default, the anti-virus database is stored within the ./bases directory related to the KAV SDK program directory.

--comm-socket=<socket>

Optional parameter. Specifies the Unix domain socket name or a TCP socket that will be used by the kavehost scanning service to receive commands (scanning tasks) from the klbscan tool.

The --comm-socket parameter is only supported for the service host mode of the KAV Engine. To use this parameter, you must start the kavehost scanning server as a service, otherwise this parameter will be ignored. Make sure to specify the ‑‑scanner-type parameter in the command line for the klbscan tool and set the parameter value to service.

When the --comm-socket is not specified, the klbscan tool uses the default command connection socket settings, specified in the kavehost.xml service configuration file. For more information about configuring the service configuration file, see section "Kavehost service configuration file".

--scan-socket=<socket>

Optional parameter. Specifies the Unix domain socket name or a TCP socket that will be used by the kavehost scanning service to receive files passed from the klbscan tool for scanning by KAV Engine.

The --scan-socket parameter is only supported for the service host mode of the KAV Engine. To use this parameter, you must start the kavehost scanning server as a service, otherwise this parameter will be ignored. Make sure to specify the ‑‑scanner-type parameter in the command line for the klbscan tool and set the parameter value to service.

When the --scan-socket is not specified, the klbscan tool uses the default data connection socket settings, specified in the kavehost.xml service configuration file. For more information about configuring the service configuration file, see section "Kavehost service configuration file".

--event-socket=<socket>

Optional parameter. Specifies the Unix domain socket name or a TCP socket that will be used by the kavehost scanning service to send diagnostic messages and scanning notifications to the klbscan tool.

The --scan-socket parameter is only supported for the service host mode of the KAV Engine. To use this parameter, you must start the kavehost scanning server as a service, otherwise this parameter will be ignored. Make sure to specify the ‑‑scanner-type parameter in the command line for the klbscan tool and set the parameter value to service.

When the --scan-socket is not specified, the klbscan tool uses the default event connection socket settings, specified in the kavehost.xml service configuration file. For more information about configuring the service configuration file, see section "Kavehost service configuration file".

--version

Optional parameter. Specifying this parameter will display the KAV SDK version and information about the currently used anti-virus database.

This information is displayed in the following format:

"Kaspersky Lab Batch Scanner"<major>"."<minor>"."release"."build"

"Database version: "<database_version>"

"Signatures: "<number_of_signatures>"

<major> — The major number of the product version. Increment in this number indicates significant change to the product core.

<minor> — The minor number of the product version. Change in this number means an enhancement to the product with backward compatibility retained.

<release> — A release number, which is typically the number of the latest patch applied to the product. Shows the version number for the latest update that has been applied to the product, which typically includes a change to resolve a problem.

<build> — The product build number. Indicates a recompilation of the source code. All other components that constitute full product version, and match for the two different versions. By contrast, a difference in the product build number shows that both versions share the same source base but correspond to different compilations that may be specific to a compiler version or some compiler-oriented improvements.

<database_version> — the date in the "YYYMMDD" format, when the currently used anti-virus database has been released.

<number_of_signatures> — the total number of malware definitions present in the currently used anti-virus database.

If you combine this parameter with other parameters, please note that this information will be displayed first, before any other tool output returned to console.

Page top