Clamav签名镜像工具
clamavmirror的Python项目详细描述
为什么
存在 clamdownloader.pl 脚本没有任何错误更正,它只是在 下载的文件无效,如果 一个失败了。
如果下载失败,而http代码不是 404,如果重试失败或找不到文件,它将连接到另一个镜像 或者下载的文件无效。
它可以选择设置工作目录和镜像目录的位置 以及下载文件的用户/组所有权。它使用 锁定以防止多个实例同时运行。
要求
- urllib3模块-https://urllib3.readthedocs.org
- dns python模块-http://www.dnspython.org/
用法
$ clamavmirror -h
用法:clamavmirror[选项]
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
示例用法
$ clamavmirror -w ~/tmp/clamavtmp/ \ -d ~/tmp/clamavmirror/ -u andrew -g staff -a db.za.clamav.net \ -l ~/Downloads/
安装
从pypi安装
pip install clamavmirror
从githib安装
git clone https://github.com/akissa/clamavmirror.git cd clamavmirror python setup.py install
贡献
- 用叉子叉(https://github.com/akissa/clamavmirror/fork)
- 创建功能分支(git checkout -bmy-new-feature)
- 提交更改(git commit -am 'Add some feature')
- 推到分支(git push origin my-new-feature)
- 创建新的拉取请求
许可证
所有代码都是根据MPLv2 License授权的。