ClamAV 和 Python

发布于 2024-10-07 23:50:41 字数 187 浏览 0 评论 0原文

我想使用 ClamAV 和 Python 编写一个小型命令行扫描器。我已经尝试了有关此问题的几个教程和说明,但无法使其正常工作。我读到的所有内容都说我需要安装 ClamAV、Clamd 和 Python。我有 Python 和 ClamAV,但我到底从哪里获得 Clamd?这一切是如何协同工作的?我应该使用哪个模块? pyclamav 还是 pyclamd?

I would like to write a small commandline scanner using ClamAV and Python. I have tried several tutorials and instructions on this matter, but have been unable to get this working. Everything I have read says I need ClamAV, Clamd and Python installed. I have Python and ClamAV, but where exactly do I get Clamd? How does it all work together? Which module should I use? pyclamav or pyclamd?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

护你周全 2024-10-14 23:50:41

看起来 clamd 是一个守护进程(服务),应该随 ClamAV 安装一起提供。 文档说它在 TCP/IP 端口上运行并接受某些命令。因此,您在 python 脚本中需要做的就是通过套接字连接到它(阅读套接字编程指南),然后通过套接字发出 SCAN 或 MULTISCAN 等命令。

我希望这就是您正在寻找的。否则,请自行进行一些尝试,并尝试发布失败的内容或遇到的问题。

Looks like clamd is a deamon (service) which should come for you with your ClamAV installation. The documentation says that it runs on TCP/IP port and accepts certain commands. So all you need to do in your python script is to connect to it over socket, (Read Socket Programming Howto) and then issue the commands like SCAN, or MULTISCAN over the socket.

I hope that is what you are looking for. Otherwise give some trials on your own and try to to post the what failed or where you got struck.

情深如许 2024-10-14 23:50:41

推荐使用 pyclamd 而不是 pyclamav。它作为扫描仪工作得很好,但我还没有弄清楚如何使用它来隔离文件。

(是的,我知道这个帖子已经有两年了,但它仍然是有用的信息:))

pyclamd is recommended over pyclamav. It works well as a scanner, but I have not yet figured out how to use it to quarantine a file.

(yes, I realize this thread is 2 years old, but still, it's helpful info :))

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文