ClamAV Signature Mirroring Tool
Project description
Why
The existing clamdownloader.pl script does not have any error correction it simply bails out if a downloaded file is not valid and is unable to retry different mirrors if one fails.
This script will retry if a download fails with an http code that is not 404, it will connect to another mirror if retries fail or file not found or if the downloaded file is invalid.
It has options to set the locations for the working and mirror directory as well as user/group ownership for the downloaded files. It uses locking to prevent multiple instances from running at the same time.
Requirements
Urllib3 module - https://urllib3.readthedocs.org
DNS-Python module - http://www.dnspython.org/
Usage
$ clamavmirror -h
Usage: clamavmirror [options]
Options:
-h, --help show this help message and exit
-a HOSTNAME, --hostname=HOSTNAME
ClamAV source server hostname
-r TXTRECORD, --text-record=TXTRECORD
ClamAV Updates TXT record
-w WORKDIR, --work-directory=WORKDIR
Working directory
-d MIRRORDIR, --mirror-directory=MIRRORDIR
The mirror directory
-u USER, --user=USER Change file owner to this user
-g GROUP, --group=GROUP
Change file group to this group
-l LOCKDIR, --locks-directory=LOCKDIR
Lock files directory
Example Usage
$ clamavmirror -w ~/tmp/clamavtmp/ \ -d ~/tmp/clamavmirror/ -u andrew -g staff -a db.za.clamav.net \ -l ~/Downloads/
Installation
Install from PyPi
pip install clamavmirror
Install from Githib
git clone https://github.com/akissa/clamavmirror.git cd clamavmirror python setup.py install
Contributing
Create your feature branch (git checkout -b my-new-feature)
Commit your changes (git commit -am 'Add some feature')
Push to the branch (git push origin my-new-feature)
Create new Pull Request
License
All code is licensed under the MPLv2 License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file clamavmirror-0.0.4.tar.bz2
.
File metadata
- Download URL: clamavmirror-0.0.4.tar.bz2
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.18.1 setuptools/38.5.1 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe6d2b9a8c987e45fc0ff28c282c2858e5be1ee0d39b1a8b7b5dcbb91ba88787 |
|
MD5 | f6e77ce27b1d6073ada1632d6dcc8866 |
|
BLAKE2b-256 | 3f9cd9234fcbd95afcfba4be7a716a1109d029266aed110c30cab160bdafad4c |
File details
Details for the file clamavmirror-0.0.4-py2-none-any.whl
.
File metadata
- Download URL: clamavmirror-0.0.4-py2-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.18.1 setuptools/38.5.1 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5c74a40cbd30c0aa59e591236ad58dd8fb2d7ba9abf3c580e5121d31a690551 |
|
MD5 | a402dbe3303a68b4ead820a73e8e7c3c |
|
BLAKE2b-256 | aaf58470f2a9637678483a077f6c8abafe64bd40c66d1d4aa2cc24ec0e4ba5c4 |