Simple ClamAV client

Simple Java client for using clamd INSTREAM scanning in your application.

Лицензия

Лицензия

Категории

Категории

CLI Взаимодействие с пользователем
Группа

Группа

fi.solita.clamav
Идентификатор

Идентификатор

clamav-client
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Simple ClamAV client
Simple Java client for using clamd INSTREAM scanning in your application.
Ссылка на сайт

Ссылка на сайт

https://github.com/solita/clamav-java
Система контроля версий

Система контроля версий

https://github.com/solita/clamav-java

Скачать clamav-client

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/fi.solita.clamav/clamav-client/ -->
<dependency>
    <groupId>fi.solita.clamav</groupId>
    <artifactId>clamav-client</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/fi.solita.clamav/clamav-client/
implementation 'fi.solita.clamav:clamav-client:1.0.1'
// https://jarcasting.com/artifacts/fi.solita.clamav/clamav-client/
implementation ("fi.solita.clamav:clamav-client:1.0.1")
'fi.solita.clamav:clamav-client:jar:1.0.1'
<dependency org="fi.solita.clamav" name="clamav-client" rev="1.0.1">
  <artifact name="clamav-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='fi.solita.clamav', module='clamav-client', version='1.0.1')
)
libraryDependencies += "fi.solita.clamav" % "clamav-client" % "1.0.1"
[fi.solita.clamav/clamav-client "1.0.1"]

Зависимости

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.11

Модули Проекта

Данный проект не имеет модулей.

Simple ClamAV Java client. See also ClamAV REST service which builds on top of this.

Travis CI: Build Status

What is provided

Support for basic INSTREAM scanning and PING command.

Clamd protocol is explained here: http://linux.die.net/man/8/clamd

A REST style API and server can be found from another repository, clamav-rest.

Using the client

Code is self explanatory. Something like this is the idea:

  ClamAVClient cl = new ClamAVClient("192.168.50.72", 3310);
  byte[] reply;
  try {
    reply = cl.scan(input);
  } catch (Exception e) {
    throw new RuntimeException("Could not scan the input", e);
  }
  if (!ClamAVClient.isCleanReply(reply)) {
   throw new Exception("aaargh. Something was found");
  }

Maven dependency

<dependency>
  <groupId>fi.solita.clamav</groupId>
  <artifactId>clamav-client</artifactId>
  <version>1.0.1</version>
</dependency>

Creating the jar

mvn install

Testing the client

To run the automated tests you are assumed to run the clamd in a local virtual machine. Configuration for Vagrant and Oracle Virtualbox is provided.

To start test server simply

cd vagrant
vagrant up clamav

This will kick up a CentOS virtual machine and install ClamAV in it.

Alternatively, you could use Docker image to run ClamAV. Automated tests with Travis CI run using Docker image for ClamAV. The test image runs with artificially low MaxStreamLength setting on purpose.

Contributors

License

Copyright © 2014 Solita

Distributed under the GNU Lesser General Public License, either version 2.1 of the License, or (at your option) any later version.

fi.solita.clamav

Solita

Версии библиотеки

Версия
1.0.1
1.0.0