#include <iostream>
#include <cstring>
#include <vector>
// use this line to compile
// g++ -I. -fPIC -shared -g -o mediafire.com.so mediafire.com.cpp
// Regex
// (205\.196\.|199\.91\.)[0-9]{2,3}\.[0-9]{1,3}\/.*(\.exe|\.iso|\.zip|\.rar|\.pdf|\.mp3|\.mp4|\.avi|\.wmv)
using namespace std;
struct resposta {
bool match;
string domain;
string file;
};
void stringExplode(string str, string separator, vector<string>* results){
int found;
found = str.find_first_of(separator);
while(found != string::npos){
if(found > 0){
results->push_back(str.substr(0,found));
}
str = str.substr(found+10);
found = str.find_first_of(separator);
}
if(str.length() > 0){
results->push_back(str);
}
}
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("mediafire.com/") == string::npos )
{
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "mediafire";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Cita de: joemg6 en Abril 23, 2013, 08:38:55 PM
#include <iostream>
#include <cstring>
#include <vector>
// use this line to compile
// g++ -I. -fPIC -shared -g -o mediafire.com.so mediafire.com.cpp
// Regex
// (205\.196\.|199\.91\.)[0-9]{2,3}\.[0-9]{1,3}\/.*(\.exe|\.iso|\.zip|\.rar|\.pdf|\.mp3|\.mp4|\.avi|\.wmv)
using namespace std;
struct resposta {
bool match;
string domain;
string file;
};
void stringExplode(string str, string separator, vector<string>* results){
int found;
found = str.find_first_of(separator);
while(found != string::npos){
if(found > 0){
results->push_back(str.substr(0,found));
}
str = str.substr(found+10);
found = str.find_first_of(separator);
}
if(str.length() > 0){
results->push_back(str);
}
}
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("mediafire.com/") == string::npos )
{
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "mediafire";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Amigo este plugin funciona para 32bits, o solo para 64bits, Saludos
/Regex ficaria assim??
http.*\.mediafire\.com.*(\.exe|\.iso|\.torrent|\.zip|\.rar|\.pdf|\.doc|\.tar|\.mp3|\.mp4|\.avi|\.wmv)
ou
(205\.196\.|199\.91\.)[0-9]{2,3}\.[0-9]{1,3}\/.*(\.exe|\.iso|\.zip|\.rar|\.pdf|\.mp3|\.mp4|\.avi|\.wmv)
ou
http.*\.mediafire\.com.*(205\.196\.|199\.91\.)[0-9]{2,3}\.[0-9]{1,3}\/.*(205\.196\.|199\.91\.)[0-9]{2,3}\.[0-9]{1,3}\/.*(\.exe|\.iso|\.zip|\.rar|\.pdf|\.mp3|\.mp4|\.avi|\.wmv)
Cita de: firecold en Abril 23, 2013, 11:08:00 PM
Amigo este plugin funciona para 32bits, o solo para 64bits, Saludos
Funciona tanto para 32 como 64 bits pero para el caso de 32 bits recién se publicará la actualización del binario para este soporte.
Cita de: mauquinhos en Abril 24, 2013, 07:02:47 PM
/Regex ficaria assim??
http.*\.mediafire\.com.*(\.exe|\.iso|\.torrent|\.zip|\.rar|\.pdf|\.doc|\.tar|\.mp3|\.mp4|\.avi|\.wmv)
ou
(205\.196\.|199\.91\.)[0-9]{2,3}\.[0-9]{1,3}\/.*(\.exe|\.iso|\.zip|\.rar|\.pdf|\.mp3|\.mp4|\.avi|\.wmv)
ou
http.*\.mediafire\.com.*(205\.196\.|199\.91\.)[0-9]{2,3}\.[0-9]{1,3}\/.*(205\.196\.|199\.91\.)[0-9]{2,3}\.[0-9]{1,3}\/.*(\.exe|\.iso|\.zip|\.rar|\.pdf|\.mp3|\.mp4|\.avi|\.wmv)
Tienes que usar el Regex
(205\.196\.|199\.91\.)[0-9]{2,3}\.[0-9]{1,3}\/.*(\.exe|\.iso|\.zip|\.rar|\.pdf|\.mp3|\.mp4|\.avi|\.wmv)
Aqui não está funcionando oq pode ser? o regex ta certinho igual ao postado aqui, eu testei com ping esse ip e não tem resposta, está correto mesmo?
Lo acabo de probar en la nueva instalacion que acabo de hacer y funciona de perlas, Saludos
amigo farecol joemg necesito de sus ayudas para que me ayude en este error que me esta dando cuando quiero pasar el plugin al thunder por winscp427 meda el siguiente error la foto esta en esta URL de facebook
https://www.facebook.com/photo.php?fbid=10201522435361940&set=a.2557111366266.2151159.1208452088&type=1&theater[/img][/url]
gracias por la ayudas espero sus repuestas
Cita de: gero02 en Julio 10, 2013, 01:05:06 PM
amigo farecol joemg necesito de sus ayudas para que me ayude en este error que me esta dando cuando quiero pasar el plugin al thunder por winscp427 meda el siguiente error la foto esta en esta URL de facebook
https://www.facebook.com/photo.php?fbid=10201522435361940&set=a.2557111366266.2151159.1208452088&type=1&theater[/img][/url]
gracias por la ayudas espero sus repuestas
Facebook no me da permiso para ver la imagen, puedes subir la imagen a imageshack o a subirimagenes.com y postearla en el foro, Saludos
esta es la foto en la pagina que publicaste
http://www.subirimagenes.com/otros-problemadepasaat-8531338.html
gracias mi hermano por tu pronta repuesta
Cita de: gero02 en Julio 10, 2013, 01:37:48 PM
esta es la foto en la pagina que publicaste
http://www.subirimagenes.com/otros-problemadepasaat-8531338.html
gracias mi hermano por tu pronta repuesta
(http://s2.subirimagenes.com/otros/previo/thump_8531338problema-de-pasa-a-t.jpg) (http://www.subirimagenes.com/otros-problemadepasaat-8531338.html)
El directorio de compilacion es etc/thunder/pluginmaker/plugins y el directorio que se muestra en la imagen es donde se colocan los plugins compilados, Saludos
Gran aporte , muchos agradecimientos ,
Cita de: firecold en Julio 10, 2013, 02:32:57 PM
(http://s2.subirimagenes.com/otros/previo/thump_8531338problema-de-pasa-a-t.jpg) (http://www.subirimagenes.com/otros-problemadepasaat-8531338.html)
El directorio de compilacion es etc/thunder/pluginmaker/plugins y el directorio que se muestra en la imagen es donde se colocan los plugins compilados, Saludos
doc lo corregiste