Joemg creo que Nessa había también comentado que este pluggin no está funcionando correctamente, muchas gracias
Códigos actualizados.
aa.avg.com.cpp
#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
#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
#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;
}
Se te agradece nuevamente Joemg ya los implementé... testeando
Testeado y funcionando
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
#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
#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
#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;
}