[GPL v3]

DrWebMirror

Description


Project mission: To develop a simple tool for creating a mirror of DrWeb update server.

Programming language: Plain C (with POSIX or Windows API).

License: GNU GPL v3 (main program), various (3rd party components).


Screenshots

 


Downloads

Sources:
drwebmirror-1.12.tar.gz
drwebmirror-1.12.tar.xz
drwebmirror-1.12.zip

Git:
https://fami.codefreak.ru/gitlab/Rudolf/drwebmirror.git

Win32 binaries:
drwebmirror-1.12_win32.zip

Cygwin binaries:
drwebmirror-1.12_cygwin.zip

Debian binaries:
drwebmirror_1.12-1_i386.deb
drwebmirror_1.12-1_amd64.deb
drwebmirror_1.12-1_armhf.deb

All versions:
files/


Changelog

[v1.12] - 15 Feb 2016 Previous versions
[v1.11] - 19 Jan 2016
  • Updated default key values
  • Added support of DrWeb for BlackBerry
  • Added support of DrWeb for Novell NetWare
  • Added support of DrWeb 9.1/9.2 for Android
  • Added support of DrWeb for Symbian
  • Added support of DrWeb for Windows Mobile
  • Ported to MSVC 2003+
  • Added Readme and Contributors files
  • Updated LZMA SDK to 15.14
  • Added support of basic HTTP authentication
  • Fixed a lot of bugs in cl arguments parser
  • Fixed bugs in network module for Win32
  • Added update server autodetection
  • Changed User-Agent: empty by default
[v1.10] - 04 Dec 2015
  • Ported to Windows (Native, MinGW)
  • Added basic support of HTTP proxy
  • Added support of Keep-Alive connection
  • Added support of DrWeb 9.1 for Windows
  • Added support of DrWeb 10.1 for Unix
  • Added support of DrWeb 10.1 for Android
  • Deleted Code::Blocks project file
  • Added list of known update servers
  • Added support of 307 redirect response
  • Added support of 203 response
  • Disabled repeat when fatal error occur
  • Added delay when correctable error occur
  • Fixed possible bug with send()
[v1.9] - 14 Sep 2015
  • Added support of DrWeb 10 for Android
  • Dropped support of DrWeb 9.0 Beta for Windows
  • Improvements in fast mode
  • Improved MD5 Algorithm implementation
  • Fixed file mode bits for Cygwin
  • Updated Makefile
  • Updated links
[v1.8] - 14 Jun 2015
  • Added support of DrWeb 11
[v1.7] - 15 May 2015
  • Added support of DrWebWCL and DrWeb Beta
  • Improvements in lock algorithm
[v1.6] - 09 Mar 2015
  • Added support of DrWeb LiveDisk
  • Disabled downloading some unneeded files
  • Added checking size of files for v5, v7 and vA
  • Changed autodetect to v5 by default
  • Added locks
  • Added auto-disabling fast mode if something wrong
[v1.5] - 07 Feb 2015
  • Fixed some bugs and memory leaks
[v1.4] - 06 Feb 2015
  • Added support of version 5 of update protocol
  • Added options for fast checksum checking
  • Refactored some parts of code
  • Fixed some bugs in network module
  • Added project file for QtCreator
[v1.3] - 31 Jan 2015
  • Added support of DrWeb for Android
  • Added protocol autodetection
  • Improved help and diagnostic messages
[v1.2] - 20 Jan 2015
  • Fixed strcpy buffers overflow
  • Added option for even more verbose output
  • Improved help and diagnostic messages
[v1.1] - 16 Jan 2015
  • Added support of DrWeb 10 for Windows and Unix
  • Added options for manual set UserID and MD5
  • Added option for custom server port
  • Added support of X-DrWeb-SysHash
  • Added support of 30x redirect responses
  • Added description of responses 451, 452 and 600
  • Updated default key values
  • Increased size of some buffers
[v1.0] - 27 Sep 2014
  • Initial release


Debian Repository

Add the following line to your /etc/apt/sources.list:
deb http://fami.codefreak.ru/osp/drwebmirror/repo/debian etch main
According to your distribution, replace 'etch' by 'stretch', 'jessie', 'wheezy', 'squeeze', 'lenny', 'testing', 'stable', 'oldstable', or 'oldoldstable'.

The FAMI Net public key for apt-secure can be downloaded here. You can add this key with
$ wget -q https://fami.codefreak.ru/osp/drwebmirror/repo/faminet-pub.asc -O- | sudo apt-key add -
The key fingerprint is
4096R/CFAFDC3E 2013-08-25
72A5 0C8A E6BD 2BF1 3E5E  13B3 43FD 37CC CFAF DC3E
FAMI Net Team <faminet@yandex.ru>
To install DrWebMirror, do
$ sudo apt-get update
$ sudo apt-get install drwebmirror

Compilation


Submitting Bugs


Help

$ ./drwebmirror --help
DrWebMirror 1.12, tool for creating a mirror of DrWeb update server.
Homepage: https://fami.codefreak.ru/osp/drwebmirror

Usage: drwebmirror <options>

Options:
  -k,  --keyfile=FILE              set key file
  -u,  --user=NUMBER               set UserID number from key file
  -m,  --md5=STRING                set MD5 sum of key file
  -H,  --syshash=STRING            set X-DrWeb-SysHash header
  -a,  --agent=STRING              set custom User Agent
  -s,  --server=ADDRESS[:PORT]     set update server address and port
  -S,  --server-fb=ADDRESS[:PORT]  set fallback update server address and port
       --http-user=USER            set username for HTTP connection
       --http-password=PASS        set password for HTTP connection
  -p,  --proto=PROTO               set update protocol (4, 5, 7 or A)
  -r,  --remote=PATH               set remote directory or file
  -l,  --local=DIR                 set local directory
       --proxy=ADDRESS[:PORT]      set HTTP proxy address and port
       --proxy-user=USER           set username for HTTP proxy
       --proxy-password=PASS       set password for HTTP proxy
  -f,  --fast                      use fast checksums checking (dangerous)
  -v,  --verbose                   show verbose output
  -V,  --verbose-full              show even more verbose output
  -h,  --help                      show this help

Example:

  drwebmirror -k drweb32.key -s update.drweb.com -p 4 -r unix/500 -l .

Known update servers:

  update.drweb.com         update.msk.drweb.com     update.msk3.drweb.com
  update.msk4.drweb.com    update.msk5.drweb.com    update.msk6.drweb.com
  update.msk7.drweb.com    update.msk8.drweb.com    update.msk9.drweb.com
  update.msk10.drweb.com   update.msk11.drweb.com   update.msk12.drweb.com
  update.msk13.drweb.com   update.msk14.drweb.com   update.msk15.drweb.com
  update.us.drweb.com      update.us1.drweb.com     update.fr1.drweb.com
  update.kz.drweb.com      update.nsk1.drweb.com    update.geo.drweb.com

Known remote directories and update protocol versions:

|--------------------------------------+--------------------------------+-----|
|           DrWeb Version              |   Remote directory or file     |  P  |
|--------------------------------------+--------------------------------+-----|
| DrWeb 4.33 for Windows               | windows                        |  4  |
|                                      | 433/windows                    |  4  |
| DrWeb 4.33 for Windows + Antispam    | 433/vr/windows                 |  4  |
| DrWeb 4.33 for Windows Server        | servers/433/windows            |  4  |
|--------------------------------------+--------------------------------+-----|
| DrWeb 4.44 for Windows               | 444/windows                    |  4  |
| DrWeb 4.44 for Windows + Antispam    | 444/vr/windows                 |  4  |
| DrWeb 4.44 for Windows Server        | 444/servers/windows            |  4  |
|--------------------------------------+--------------------------------+-----|
| DrWeb 5.00 for Novell NetWare        | netware/500                    |  4  |
| DrWeb 5.01 for Novell NetWare        | netware/700                    |  4  |
|--------------------------------------+--------------------------------+-----|
| DrWeb 5.0 for Windows                | 500/windows                    | 4/5 |
|                                      | 500/winold/windows             | 4/5 |
| DrWeb 5.0 Security Space for Windows | 500/sspace/windows             | 4/5 |
| DrWeb 5.0 for Windows Server         | 500/servers/windows            | 4/5 |
|                                      | 500/servers/nt4srv/windows     | 4/5 |
| DrWeb 5.0/6.0 for Microsoft Exchange | 500/exchange/windows           | 4/5 |
| DrWebWCL 5.0                         | 500/winconsole/windows         | 4/5 |
|--------------------------------------+--------------------------------+-----|
| DrWeb 6.0 for Windows                | x86/600/av/windows             | 4/5 |
|                                      | x64/600/av/windows             | 4/5 |
| DrWeb 6.0 Security Space for Windows | x86/600/sspace/windows         | 4/5 |
|                                      | x64/600/sspace/windows         | 4/5 |
| DrWeb 6.0 for Windows Server         | x86/600/servers/windows        | 4/5 |
|                                      | x64/600/servers/windows        | 4/5 |
| DrWeb 6.0 for IBM Lotus Domino       | x86/600/lotus/windows          | 4/5 |
|                                      | x64/600/lotus/windows          | 4/5 |
| DrWeb 6.0 for Kerio WinRoute         | x86/600/keriowinroute/windows  | 4/5 |
|                                      | x64/600/keriowinroute/windows  | 4/5 |
| DrWeb 6.0 for Kerio MailServer      / x86/600/keriomailserver/windows | 4/5 |
|                                     \ x64/600/keriomailserver/windows | 4/5 |
|--------------------------------------+--------------------------------+-----|
| DrWeb 5.0/6.0 for Unix               | unix/500                       | 4/5 |
| DrWeb 6.0/8.0 for Unix               | unix/700                       | 4/5 |
| DrWeb 9.0 for Unix                   | unix/900                       | 4/5 |
| DrWeb 10.0/10.1 for Unix/OS X        | unix/1000/vdb                  | 4/5 |
|                                      | unix/1000/dws                  | 4/5 |
|                                      | unix/1000/macosx               | 4/5 |
|--------------------------------------+--------------------------------+-----|
| DrWeb 9.0 LiveDisk                   | livecd/900/windows             | 4/5 |
|--------------------------------------+--------------------------------+-----|
| DrWeb 7.0 for Windows                | xmlzone/release/700/av         |  7  |
| DrWeb 7.0 Security Space for Windows | xmlzone/release/700/sspace     |  7  |
| DrWeb 7.0 for Windows Server         | xmlzone/release/700/servers    |  7  |
|--------------------------------------+--------------------------------+-----|
| DrWeb 8.0 for Windows                | xmlzone/release/800/av         |  7  |
| DrWeb 8.0 Security Space for Windows | xmlzone/release/800/sspace     |  7  |
| DrWeb 8.0 for Windows Server         | xmlzone/release/800/servers    |  7  |
|--------------------------------------+--------------------------------+-----|
| DrWeb 9.0/9.1 for Windows            | xmlzone/release/900/windows    |  7  |
| DrWeb 10.0 for Windows               | xmlzone/release/1000/windows   |  7  |
| DrWeb 11.0 for Windows               | xmlzone/release/1100/windows   |  7  |
| DrWeb 11.0 Beta for Windows          | xmlzone/beta/1100/windows      |  7  |
|--------------------------------------+--------------------------------+-----|
| DrWeb for Symbian                    | 500/symbian/drwebce.lst        |  A  |
| DrWeb for Windows Mobile             | wince/600/drwebce.lst          |  A  |
| DrWeb 6.0-8.0 for Android            | android/6.1/drwebce.lst        |  A  |
| DrWeb 9.0-9.2 for Android            | android/9/version.lst          |  A  |
| DrWeb 10.0 for Android/BlackBerry    | android/10/version.lst         |  A  |
| DrWeb 10.1 for Android/BlackBerry    | android/10.1/version.lst       |  A  |
|--------------------------------------+--------------------------------+-----|

Tricks for Apache

# DrWebUpW clients should receive files from the mirrors/drweb/
RewriteCond %{HTTP_USER_AGENT} ^Dr\.?Web(.*) [NC,OR]
RewriteCond %{HTTP:X-DrWeb-KeyNumber} ^[0-9]+ [OR]
RewriteCond %{HTTP:X-DrWeb-Validate} ^[0-9a-f]+ [NC]
RewriteRule ^([^(mirrors)](.*))$ mirrors/drweb/$1 [L]

Tricks for Nginx

# DrWebUpW clients should receive files from the /mirrors/drweb/
if ($http_user_agent ~* "^Dr\.?Web(.*)") { rewrite ^/([^(mirrors)](.*))$ /mirrors/drweb/$1 break; }
if ($http_x_drweb_keynumber)             { rewrite ^/([^(mirrors)](.*))$ /mirrors/drweb/$1 break; }
if ($http_x_drweb_validate)              { rewrite ^/([^(mirrors)](.*))$ /mirrors/drweb/$1 break; }


#1 Alex Tuesday, 17-Feb-15 04:09:35 OMST
Здравствуйте,
Где можно почитать мануал, по созданию зеркала Др.Веб?
Спасибо.
--------
Hello,
Where can I read a manual, new mirrors Dr.Web?
Thanks.
#2 Rudolf Sikorski Monday, 09-Mar-15 17:03:30 OMST
Hello!
Sorry, currently the manual isn't written yet. Perhaps it will be written later. If you want you can write the manual and send it to me :)
#3 eloki Tuesday, 22-Sep-15 19:19:11 OMST
thank you for your app!
I made mirror in our local network by configuring apache (I use XAMPP) as fake proxy. So, in drweb settings you should set proxy to IP/name of Apache web server (example: 10.60.12.18:8080).
Part of my Apache config (section httpd-vhosts.conf):
<VirtualHost 10.60.12.18:8080>
DocumentRoot "D:\sites\drweb\www"
ServerName up
ServerAlias drweb www.drweb7 update.drweb.com update.msk.drweb.com update.msk3.drweb.com update.us.drweb.com update.msk5.drweb.com update.msk6.drweb.com update.msk7.drweb.com update.msk11.drweb.com update.msk12.drweb.com update.fr1.drweb.com update.us1.drweb.com update.kz.drweb.com 87.242.75.216 89.111.188.80 89.111.188.126 91.121.123.94 92.46.53.252 81.176.67.171 81.177.37.3 83.222.3.90 87.242.75.215
ErrorLog "d:\sites\drweb\logs\error.log"
#CustomLog "d:\sites\drweb\logs\access.log"
<Directory "D:\sites\drweb\www">
AllowOverride All
Order Deny,Allow
Allow from 127.
Allow from 10.60.
</Directory>
</VirtualHost>
Of course, it shold has directory structure like at original servers.
For DrWeb7 Antivirus
d:\sites\drweb\www\xmlzone\release\700\av\
d:\sites\drweb\www\xmlzone\release\700\servers\
For DrWeb 8 Antivirus
d:\sites\drweb\www\xmlzone\release\800\servers\
and so on
#4 eloki Tuesday, 22-Sep-15 19:21:51 OMST
Оказывается, можно было писать по-русски)
#5 Yegor Wednesday, 28-Oct-15 17:34:51 OMST
Спасибо!
Было бы здорово добавить поддержку прокси для программы.
Need to add proxy support for application.
#6 Rudolf Sikorski Saturday, 05-Dec-15 02:22:40 OMST
>> Need to add proxy support for application.
It has been added in v1.10.
#7 don Rumata Wednesday, 23-Dec-15 16:02:03 OMST
Доброго времени суток. А планируется ли собирать deb-пакеты с программой?
#8 Rudolf Sikorski Thursday, 21-Jan-16 06:17:18 OMST
>> Доброго времени суток. А планируется ли собирать deb-пакеты с программой?
Please write in English!
Done.
#9 andr Friday, 05-Feb-16 22:01:54 OMST
please make arm distrib. For raspberry pi! thanks!
#10 Rudolf Sikorski Tuesday, 16-Feb-16 00:16:42 OMST
>> please make arm distrib. For raspberry pi! thanks!
Done, but I have no hardware to test.