G7.4. Dr.Web Server Remote Scriptable Diagnostics Utility

Dr.Web Server remote diagnostics utility allows remotely connect to Dr.Web Server for basic controlling and viewing the operation statistics. Unlike the drwcntl, the drwcmd utility can be used at scripting.

The following console versions of Dr.Web Server remote scriptable diagnostics utility are provided:

Executable file

Location

Description

drweb-cmd-<OS>-<bitness>

Control Center, the Administration → Utilities section

Independent version of the utility. Can be launched from any directory or on any computer with corresponding operating system.

The webmin/utilities Dr.Web Server directory

drwcmd

The bin Dr.Web Server directory

Utility version depends on server libraries. Can be launched only from its location directory.

info

The drweb-cmd-<OS>-<bitness> and drwcmd version of the utility are similar in their functions. Further in the section, the drwcmd version is given, but all examples are relevant for both versions.

warning

For connection of the Dr.Web Server remote diagnostics utility, you must enable Dr.Web Server FrontDoor extension. To do this, in the Dr.Web Server configuration section, on the Modules tab, set the Dr.Web Server FrontDoor extension flag.

 

For connection of the Dr.Web Server remote diagnostics utility, administrator that connects via the utility, must have the Use additional features permission. Otherwise, access to Dr.Web Server via the remote diagnostics utility will be forbidden.

The Dr.Web Server settings to connect Dr.Web Server remote diagnostics utility are given in the Administrator Manual, p. Dr.Web Server Remote Access.

The start instruction format

drwcmd [<switches>] [<files>]

Allowed Switches

info

The drwcmd utility uses switches according the general rules described in the Appendix G. Command Line Parameters of the Programs Included in Dr.Web Enterprise Security Suite.

--?—show help message on switches for using the utility.

--help—show help message on switches for using the utility.

--commands=<commands>—execute specified commands (similar to the drwcntl utility commands). To specify several commands, use the ; sign as a separator.

--debug=yes|no—log utility operations in the debug mode (the stderr standard output stream). Default is no.

--files=yes|no—allow execution of the commands (similar to the drwcntl utility commands) from the specified files. Default is yes.

Commands must be set in a file by one on each line. Empty lines are ignored. Use the # sign to start a comment.

--keep=yes|no—keep the connection with Dr.Web Server after the last command is executed till the completion of the utility process. Default is no.

--output=<file>—output file for the Dr.Web Server response. By default, if the file is not specified, the stdout standard output stream is used.

If the file name starts with the (+), then the result of commands execution will be added to the end to file, otherwise—file will be rewritten.

--password=<password>—password for the authorization at Dr.Web Server. Can be defined in the file set in the --resource switch.

--read=yes|no—allow reading the Dr.Web Server connection parameters from the resource file. Default is yes.

--resource=<file>—resource file with the Dr.Web Server connection parameters: the Dr.Web Server address and administrator credentials for the authorization at Dr.Web Server. By default, the .drwcmdrc file is used from the following directory:

For Unix-like OS: $HOME

For Windows OS: %LOCALAPPDATA%

Each line in the file must contain 3 words separated by spaces: <Dr.Web_Server> <user> <password>.

To specify the space in the middle of a word, use the %S. If you need the percent sign, use %P.

For example:

ssl://127.0.0.1 user1 password1

ssl://127.0.0.1 user2 password2

ssl://127.0.0.1 user pass%Sword

warning

When using the --resource switch, you must also specify the --server switch. Utility connects to Dr.Web Server specified in the --server switch according to the credentials that corresponds to the address of this Dr.Web Server from the resource file.

--server=<Server>—the Dr.Web Server address. Default is ssl://127.0.0.1. Can be defined in the file set in the --resource switch.

--user=<user>—user name for the authorization at Dr.Web Server. Can be defined in the file set in the --resource switch.

--verbose=yes|no—print detailed response of Dr.Web Server (the stdout standard output stream). Default is no.

--version—show the utility version.

The procedure for connecting to Dr.Web Server:

1.When defining the data for the Dr.Web Server connection, the priority are given to the values specified in the switches --server, --user and --password.

2.If the --server switch is not specified, the default value is used—ssl://127.0.0.1.

3.If the --user switch is not specified, then the necessary Dr.Web Server is searched in the .drwcmdrc file (can be redefined in the --resource switch) and first user name is taken in the alphabetical order.

4.If the --password switch is not specified, then the search is performed in the.drwcmdrc file (can be redefined in the --resource switch) by Dr.Web Server and user name.

info

User name and password will be read from the .drwcmdrc file (can be redefined in the --resource switch), if it is not forbidden by the --read switch.

5.If a user name and a password are not specified via the switches or the resource file, the utility prompts for credentials to be entered via the console.

Commands execution features:

If the (-) values is set for the files with commands, then the utility reads command entered via the console.

If both command in the --commands switch and the files list are set, then the commands from the --commands switch are executed first.

If neither files of commands in the --commands switch are specified, then the commands entered via the console are read.

For example:

To execute the command from the --command switch and then a console commands, enter the following:

drwcmd --commands=<commands> -- -

Completion Codes

0—successful execution.

1—the help in switches is requested: --help or --?.

2—command line parse error: authorization parameters are not specified, etc.

3—cannot create output file for the Dr.Web Server response.

4—Dr.Web Server authorization error: wrong administrator's login and/or password.

5—Dr.Web Server connection terminated abnormally.

127—unknown fatal error.