c - Clamd INSTREAM checking -
i'm trying check file using clamd ninstream.
struct clam_chunk { unsigned int fsize; char data[1024]; }; .............................................................................. st_data.fsize = __bswap_32(st_data.fsize); //big-endian format { ret = send(fd, "ninstream\n", 11, msg_nosignal); ret = send(fd, &st_data, sizeof(st_data), msg_nosignal); ret = send (fd,"",0,msg_nosignal); } while (ret < 0 && errno == eintr);
i have response: "stream: ok", it's wrong, because data contains eicar-test-signature.
ping recive pong, simple scan work too.