Alterserv

RaptorCache => Plugins para RaptorCache => Plugins de Antivirus => Mensaje publicado por: lukkes en Julio 05, 2015, 02:33:52 PM

Título: plugin clamav antivirus lukkes
Publicado por: lukkes en Julio 05, 2015, 02:33:52 PM
funciona ya lo he probado   ;D


Código (javascript) [Seleccionar]

#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"

// use this line to compile
// g++ -I. -fPIC -shared -g -o clamav.net.so clamav.net.cpp
// regex
// http.*\.clamav\.net.*\.cvd

string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-1);           
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-1);
}
}

extern "C" resposta getmatch(const string url) {
    resposta r;

if ( (url.find(".clamav.net/") != string::npos) and (url.find(".cvd") != string::npos)
) {

    r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "clamav_updates";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}



Título: Re:plugin clamav antivirus lukkes
Publicado por: firecold en Julio 07, 2015, 04:37:05 PM
Muchas gracias amigo estaremos probando, Saludos