Alterserv

ThunderCache 3.1.x => Plugins para ThunderCache 3.1.2 => Plugins de Antivirus => Mensaje publicado por: dgonzaleznet en Noviembre 18, 2012, 02:05:43 AM

Título: Plugin AVG
Publicado por: dgonzaleznet en Noviembre 18, 2012, 02:05:43 AM
Joemg creo que Nessa había también comentado que este pluggin no está funcionando correctamente, muchas gracias
Título: Re:Plugin AVG
Publicado por: joemg6 en Noviembre 22, 2012, 08:09:19 PM
Códigos actualizados.

aa.avg.com.cpp
Código (cpp) [Seleccionar]

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


// use this line to compile
// g++ -I. -fPIC -shared -g -o aa.avg.com.so aa.avg.com.cpp  
// Regex
// http.*\.avg\.com.*(\.exe|\.bin)

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("aa.avg.com/") != string::npos)
) {

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

return r;

}


pupdate-aa.avg.com.cpp
Código (cpp) [Seleccionar]

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


// use this line to compile
// g++ -I. -fPIC -shared -g -o pupdate-aa.avg.com.so pupdate-aa.avg.com.cpp  
// Regex
// http.*\.avg\.com.*(\.exe|\.bin)

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("pupdate-aa.avg.com/") != string::npos)
) {

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

return r;

}


aa-download.avg.com.cpp
Código (cpp) [Seleccionar]

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


// use this line to compile
// g++ -I. -fPIC -shared -g -o aa-download.avg.com.so aa-download.avg.com.cpp  
// Regex
// http.*\.avg\.com.*(\.exe|\.bin)

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("aa-download.avg.com/") != string::npos)
) {

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

return r;

}

Título: Re:Plugin AVG
Publicado por: dgonzaleznet en Noviembre 22, 2012, 11:54:40 PM
Se te agradece nuevamente Joemg ya los implementé... testeando
Título: Re:Plugin AVG
Publicado por: roxdng en Noviembre 24, 2012, 12:29:44 AM
Testeado y funcionando
Título: Re:Plugin AVG
Publicado por: rifranco202325 en Marzo 16, 2013, 04:38:23 PM
amigo todavia estoy usando el tc3.1.2 ya actualize el avg pero no me funicona o hay q hacerle algo mas en la config del tc para sacar los hit anterior si me puedes dar una mano con eso gravias

Cita de: joemg6 en Noviembre 22, 2012, 08:09:19 PM
Códigos actualizados.

aa.avg.com.cpp
Código (cpp) [Seleccionar]

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


// use this line to compile
// g++ -I. -fPIC -shared -g -o aa.avg.com.so aa.avg.com.cpp  
// Regex
// http.*\.avg\.com.*(\.exe|\.bin)

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("aa.avg.com/") != string::npos)
) {

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

return r;

}


pupdate-aa.avg.com.cpp
Código (cpp) [Seleccionar]

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


// use this line to compile
// g++ -I. -fPIC -shared -g -o pupdate-aa.avg.com.so pupdate-aa.avg.com.cpp  
// Regex
// http.*\.avg\.com.*(\.exe|\.bin)

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("pupdate-aa.avg.com/") != string::npos)
) {

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

return r;

}


aa-download.avg.com.cpp
Código (cpp) [Seleccionar]

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


// use this line to compile
// g++ -I. -fPIC -shared -g -o aa-download.avg.com.so aa-download.avg.com.cpp  
// Regex
// http.*\.avg\.com.*(\.exe|\.bin)

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("aa-download.avg.com/") != string::npos)
) {

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

return r;

}