当前位置:网站首页>Installation and use of anti-virus software ClamAV
Installation and use of anti-virus software ClamAV
2022-07-27 03:43:00 【Qingxiao】
Catalog
Two 、 install ClamAV、clamdscan
3、 ... and 、 Update database manually
5、 ... and 、python Determine whether virus is detected
One 、clamAV Introduce
- clamscan command : Universal , Not dependent on services , There are many command parameters , Execution speed is a little slower
- clamdscan command : It's a collocation clamd often Resident service Anti drug tools , The function is very similar clamscan, High efficiency of execution , But there are fewer parameters available ( Because some functions are made of clamd The control of the ). No need to bring it -r , By default, it will recursively scan subdirectories
Two 、 install ClamAV、clamdscan
apt -y install clamav clamtk clamav-daemon clamdscan device-tree-compiler


3、 ... and 、 Update database manually
Four 、 usage
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*4.1、clamscan usage
-i tell ClamAV Show only infected files
-r` Flags make scanning recursive
--max-scansize= Flag setting you want ClamAV The maximum amount of data crawled . The maximum is 4000M please remember , This is the actual data being read , Not the size of the file .
--max-filesize= Set what you want ClamAV The maximum size of the scanned file .2、clamav Configuration file for :/etc/clamav/freshclam.conf
# Automatically created by the clamav-freshclam postinst
# Comments will get lost when you reconfigure the clamav-freshclam package
DatabaseOwner clamav
UpdateLogFile /var/log/clamav/freshclam.log
LogVerbose false
LogSyslog false
LogFacility LOG_LOCAL6
LogFileMaxSize 0
LogRotate true
LogTime true
Foreground false
Debug false
MaxAttempts 5
DatabaseDirectory /var/lib/clamav # Virus library location
DNSDatabaseInfo current.cvd.clamav.net
ConnectTimeout 30
ReceiveTimeout 0 # increase ClamAV Overtime
TestDatabases yes
ScriptedUpdates yes
CompressLocalDatabase no
Bytecode true
NotifyClamd /etc/clamav/clamd.conf # To configure
# Check for new database 24 times a day
Checks 24
DatabaseMirror db.local.clamav.net
DatabaseMirror database.clamav.net
4.2、clamdscan usage
Clam AntiVirus: Daemon Client 0.103.5
By The ClamAV Team: https://www.clamav.net/about.html#credits
(C) 2022 Cisco Systems, Inc.
clamdscan [options] [file/directory/-]
--help -h Show this help
--version -V Print version number and exit
--verbose -v Be verbose
--quiet Be quiet, only output error messages
--stdout Write to stdout instead of stderr. Does not affect 'debug' messages.
(this help is always written to stdout)
--log=FILE -l FILE Save scan report in FILE
--file-list=FILE -f FILE Scan files from FILE
--ping -p A[:I] Ping clamd up to [A] times at optional interval [I] until it responds.
--wait -w Wait up to 30 seconds for clamd to start. Optionally use alongside --ping to set attempts [A] and interval [I] to check clamd.
--remove Remove infected files. Be careful!
--move=DIRECTORY Move infected files into DIRECTORY
--copy=DIRECTORY Copy infected files into DIRECTORY
--config-file=FILE Read configuration from FILE.
--allmatch -z Continue scanning within file after finding a match.
--multiscan -m Force MULTISCAN mode
--infected -i Only print infected files Only the virus files found are output
--no-summary Disable summary at end of scanning
--reload Request clamd to reload virus database
--fdpass Pass filedescriptor to clamd (useful if clamd is running as a different user)
--stream Force streaming files to clamd (for debugging and unit testing)


5、 ... and 、python Determine whether virus is detected
import re
result = '''
----------- SCAN SUMMARY -----------
Infected files: 1
Time: 0.006 sec (0 m 0 s)
Start Date: 2022:07:15 13:34:40
End Date: 2022:07:15 13:34:40
'''
t = re.findall("Infec[\D]+([\d])", result)
print(t) # ['1'] 边栏推荐
- Technology vane | interpretation of cloud native technology architecture maturity model
- Spark Learning Notes (IV) -- spark core programming RDD
- 榕树贷款,
- 网络安全/渗透测试工具AWVS14.9下载/使用教程/安装教程
- MySQL underlying data structure
- [1206. Design skip table]
- app端接口用例设计方法和测试方法
- 768. Block II greed that can complete sorting at most
- Permutation and binary (Ji, DA) (day 84)
- 客户端发送一条sql如何与服务器交互
猜你喜欢

Characteristics and determination scheme of Worthington pectinase

Record the problem of PHP program accessing system files incorrectly

复盘:图像有哪些基本属性?关于图像的知识你知道哪些?图像的参数有哪些

mysql出现不存在错误

代码回滚,你真的理解吗?

How to optimize MySQL

JMeter distributed pressure measurement

Deeply understand the underlying data structure and algorithm of MySQL index

DTS搭载全新自研内核,突破两地三中心架构的关键技术|腾讯云数据库

477-82(236、61、47、74、240、93)
随机推荐
智能体重秤方案主控采用CSU18M91
Meta Quest内容生态总监谈App Lab设计初衷
数字孪生实际应用:智慧城市项目建设解决方案
数据库概论 - 数据库的介绍
Member array and pointer in banyan loan C language structure
Redis source code learning (33), command execution process
PIP3 setting alicloud
[tree chain dissection] template question
Worthington papain dissociation system solution
OC message mechanism
The new version of Alibaba Seata finally solves the idempotence, suspension and empty rollback problems of TCC mode
Ring counting (Northern Polytechnic machine test questions) (day 83)
在typora中插入图片和视频
若依的环境的部署以及系统的运行
Database usage security policy
客户端发送一条sql如何与服务器交互
A new paradigm of distributed deep learning programming: Global tensor
Unity game, the simplest solution of privacy agreement! Just 3 lines of code! (Reprinted)
[learn FPGA programming from scratch -54]: high level chapter - FPGA development based on IP core - principle and configuration of PLL PLL IP core (Altera)
Common weak password Encyclopedia