Alterserv

RaptorCache => Plugins para RaptorCache => Mensaje publicado por: zeronett en Octubre 24, 2013, 01:21:01 AM

Título: Plugins varios - Ire agregando
Publicado por: zeronett en Octubre 24, 2013, 01:21:01 AM
Código (cpp) [Seleccionar]
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include "../utils.cpp"

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o lucaioli.com.ar.so lucaioli.com.ar.cpp
// Regex
// http.*\.lucaioli\.com\.ar.*(\.swf|\.jpg|\.png|\.gif)

string get_filename(string url) {
               vector<string> resultado;
       string retorna = "";
       stringexplode(url, "/", &resultado);
       retorna = resultado.at(resultado.size()-2) + "-"+resultado.at(resultado.size()-1);
       return retorna;
}

extern "C" resposta getmatch(const string url) {
       resposta r;        
               
 if ( (url.find("lucaioli.com.ar/") != string::npos)
    ) {
     r.file = get_filename(url);
     if (!r.file.empty()) {
        r.match = true;
        r.domain = "Lucaioli";      
     } else {
        r.match = false;
     }
  }
  else
  {
     r.match = false;
  }
  return r;
}
Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Octubre 24, 2013, 01:21:43 AM
Código (cpp) [Seleccionar]
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include "../utils.cpp"

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o rionegro.gov.ar.so rionegro.gov.ar.cpp
// Regex
// http.*\.rionegro\.gov\.ar.*(\.swf|\.jpg|\.png|\.gif)

string get_filename(string url) {
               vector<string> resultado;
       string retorna = "";
       stringexplode(url, "/", &resultado);
       retorna = resultado.at(resultado.size()-2) + "-"+resultado.at(resultado.size()-1);
       return retorna;
}

extern "C" resposta getmatch(const string url) {
       resposta r;        
               
 if ( (url.find("rionegro.gov.ar/") != string::npos)
    ) {
     r.file = get_filename(url);
     if (!r.file.empty()) {
        r.match = true;
        r.domain = "RioNegro.gov.ar";      
     } else {
        r.match = false;
     }
  }
  else
  {
     r.match = false;
  }
  return r;
}
Título: Re:Plugins varios - Ire agregando
Publicado por: david_domh en Octubre 24, 2013, 02:41:06 AM
te falto ponerle 2 extensiones amigo el de pdf y exe ya que hay descargas de formularios y aplicativos
el plugin serìa asi entonces :

Código (cpp) [Seleccionar]
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include "../utils.cpp"

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o rionegro.gov.ar.so rionegro.gov.ar.cpp
// Regex
// http.*\.rionegro\.gov\.ar.*(\.swf|\.jpg|\.png|\.gif|\.pdf|\.exe)

string dominiotxt="Rionegro.gov.ar";     
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()-3)+"_"+resultado.at(resultado.size()-2)+"_"+resultado.at(resultado.size()-1);           
                } else {
                        stringexplode(url, "/", &resultado);
                        return resultado.at(resultado.size()-3)+"_"+resultado.at(resultado.size()-2)+"_"+resultado.at(resultado.size()-1);
                }
    }

extern "C" resposta getmatch(const string url) {
        resposta r;       
               
  if ( (url.find("rionegro.gov.ar/") != string::npos)
     ) {
      r.file = get_filename(url);
      if (!r.file.empty()) {
         r.match = true;
         r.domain = dominiotxt;       
      } else {
         r.match = false;
      }
   }
   else
   {
      r.match = false;
   }
   return r;
}


Saludos

David M.

Buen aporte zeronett a seguir aportando mas plugins.................
Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Octubre 24, 2013, 12:19:16 PM
Gracias david_domh por la correccion. :-*
Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Octubre 24, 2013, 04:05:09 PM
Código (cpp) [Seleccionar]
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include "../utils.cpp"

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o bancopatagonia.com.so bancopatagonia.com.cpp
// Regex
// http.*\.bancopatagonia\.com.*(\.swf|\.jpg|\.png|\.gif|\.pdf|\.exe|\.xls|\.doc)

string get_filename(string url) {
               vector<string> resultado;
       string retorna = "";
       stringexplode(url, "/", &resultado);
       retorna = resultado.at(resultado.size()-2) + "-"+resultado.at(resultado.size()-1);
       return retorna;
}

extern "C" resposta getmatch(const string url) {
       resposta r;        
               
 if ( (url.find("bancopatagonia.com/") != string::npos)
    ) {
     r.file = get_filename(url);
     if (!r.file.empty()) {
        r.match = true;
        r.domain = "bancopatagonia";      
     } else {
        r.match = false;
     }
  }
  else
  {
     r.match = false;
  }
  return r;
}
Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Octubre 24, 2013, 04:05:52 PM
Código (cpp) [Seleccionar]
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include "../utils.cpp"

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o neunet.com.ar.so neunet.com.ar.cpp
// Regex
// http.*\.neunet\.com.ar.*(\.swf|\.jpg|\.png|\.gif)

string get_filename(string url) {
               vector<string> resultado;
       string retorna = "";
       stringexplode(url, "/", &resultado);
       retorna = resultado.at(resultado.size()-2) + "-"+resultado.at(resultado.size()-1);
       return retorna;
}

extern "C" resposta getmatch(const string url) {
       resposta r;        
               
 if ( (url.find("neunet.com.ar/") != string::npos)
    ) {
     r.file = get_filename(url);
     if (!r.file.empty()) {
        r.match = true;
        r.domain = "SpeedTestNeunet";      
     } else {
        r.match = false;
     }
  }
  else
  {
     r.match = false;
  }
  return r;
}
Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Octubre 24, 2013, 04:06:54 PM
Código (cpp) [Seleccionar]
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include "../utils.cpp"

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o bravotube.net.so bravotube.net.cpp
// Regex
// http.*\.bravotube\.net.*(\.swf|\.jpg|\.png|\.gif|\.flv|\.mp4)

string get_filename(string url) {
               vector<string> resultado;
       string retorna = "";
       stringexplode(url, "/", &resultado);
       retorna = resultado.at(resultado.size()-2) + "-"+resultado.at(resultado.size()-1);
       return retorna;
}

extern "C" resposta getmatch(const string url) {
       resposta r;        
               
 if ( (url.find("bravotube.net/") != string::npos)
    ) {
     r.file = get_filename(url);
     if (!r.file.empty()) {
        r.match = true;
        r.domain = "bravotubexxx";      
     } else {
        r.match = false;
     }
  }
  else
  {
     r.match = false;
  }
  return r;
}
Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Octubre 24, 2013, 04:07:23 PM
Código (cpp) [Seleccionar]
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include "../utils.cpp"

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o barilochedigital.com.so barilochedigital.com.cpp
// Regex
// http.*\.barilochedigital\.com.*(\.swf|\.jpg|\.png|\.gif)

string get_filename(string url) {
               vector<string> resultado;
       string retorna = "";
       stringexplode(url, "/", &resultado);
       retorna = resultado.at(resultado.size()-2) + "-"+resultado.at(resultado.size()-1);
       return retorna;
}

extern "C" resposta getmatch(const string url) {
       resposta r;        
               
 if ( (url.find("barilochedigital.com/") != string::npos)
    ) {
     r.file = get_filename(url);
     if (!r.file.empty()) {
        r.match = true;
        r.domain = "barilochedigital";      
     } else {
        r.match = false;
     }
  }
  else
  {
     r.match = false;
  }
  return r;
}
Título: Re:Plugins varios - Ire agregando
Publicado por: david_domh en Octubre 24, 2013, 04:57:50 PM
justo en los 10 plugins que estoy testeando esta el de bravotube lo estarè pùblicando de aca a unos dias


Buenos aportes............................................................



Saludos


David M.
Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Octubre 24, 2013, 06:59:26 PM
 :)
Título: Re:Plugins varios - Ire agregando
Publicado por: david_domh en Octubre 31, 2013, 01:02:52 AM
falta corregir el plugin de neunet.com.ar


Título: Re:Plugins varios - Ire agregando
Publicado por: david_domh en Octubre 31, 2013, 01:05:22 AM
te falto poner un slash en .com.ar

ahi esta

Código (cpp) [Seleccionar]
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include "../utils.cpp"

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o neunet.com.ar.so neunet.com.ar.cpp
// Regex
// http.*\.neunet\.com\.ar.*(\.swf|\.jpg|\.png|\.gif)

string dominiotxt="SpeedTestNeunet";
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()-3)+"_"+resultado.at(resultado.size()-2)+"_"+resultado.at(resultado.size()-1);          
                   } else {
                           stringexplode(url, "/", &resultado);
                           return resultado.at(resultado.size()-3)+"_"+resultado.at(resultado.size()-2)+"_"+resultado.at(resultado.size()-1);
                   }
       }


extern "C" resposta getmatch(const string url) {
       resposta r;        
               
 if ( (url.find("neunet.com.ar/") != string::npos)
    ) {

     r.file = get_filename(url);
     if (!r.file.empty()) {
        r.match = true;
        r.domain = dominiotxt;      
     } else {
        r.match = false;
     }
  }
  else
  {
     r.match = false;
  }
  return r;
}
Título: Re:Plugins varios - Ire agregando
Publicado por: firecold en Octubre 31, 2013, 12:04:04 PM
Cita de: zeronett en Octubre 24, 2013, 04:07:23 PM
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include "../utils.cpp"

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o barilochedigital.com.so barilochedigital.com.cpp
// Regex
// http.*\.barilochedigital\.com.*(\.swf|\.jpg|\.png|\.gif)

string get_filename(string url) {
                vector<string> resultado;
        string retorna = "";
        stringexplode(url, "/", &resultado);
        retorna = resultado.at(resultado.size()-2) + "-"+resultado.at(resultado.size()-1);
        return retorna;
}

extern "C" resposta getmatch(const string url) {
        resposta r;       
               
  if ( (url.find("barilochedigital.com/") != string::npos)
     ) {
      r.file = get_filename(url);
      if (!r.file.empty()) {
         r.match = true;
         r.domain = "barilochedigital";       
      } else {
         r.match = false;
      }
   }
   else
   {
      r.match = false;
   }
   return r;
}


Amigo Zeronett con una molestia, es que nos dejas con la interrogante de que pagina son los sitios y como consejo usa code o # en la barra de herramientas para postear tus codigos, por lo demas felicitaciones y gracias por aportar a este foro, Saludos
Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Octubre 31, 2013, 11:19:10 PM
Los nuevos plugins iran con code.

CitarTodos los tus plugins le fueron agregados los code, Abrazos Firecold
Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Noviembre 01, 2013, 12:17:26 PM
Gracias Fire.  :-*
Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Noviembre 01, 2013, 04:44:48 PM
www.movistar.com.ar

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

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o movistar.com.ar.so movistar.com.ar.cpp
// Regex
// http.*\.movistar\.com\.ar.*(\.swf|\.jpg|\.png|\.gif)

string get_filename(string url) {
               vector<string> resultado;
       string retorna = "";
       stringexplode(url, "/", &resultado);
       retorna = resultado.at(resultado.size()-2) + "-"+resultado.at(resultado.size()-1);
       return retorna;
}

extern "C" resposta getmatch(const string url) {
       resposta r;        
               
 if ( (url.find("movistar.com.ar/") != string::npos)
    ) {
     r.file = get_filename(url);
     if (!r.file.empty()) {
        r.match = true;
        r.domain = "Movistar Argentina";      
     } else {
        r.match = false;
     }
  }
  else
  {
     r.match = false;
  }
  return r;
}




Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Noviembre 01, 2013, 04:45:39 PM
movistararg.com

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

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o movistararg.com.so movistararg.com.cpp
// Regex
// http.*\.movistararg\.com.*(\.swf|\.jpg|\.png|\.gif)

string get_filename(string url) {
                vector<string> resultado;
        string retorna = "";
        stringexplode(url, "/", &resultado);
        retorna = resultado.at(resultado.size()-2) + "-"+resultado.at(resultado.size()-1);
        return retorna;
}

extern "C" resposta getmatch(const string url) {
        resposta r;       
               
  if ( (url.find("movistararg.com/") != string::npos)
     ) {
      r.file = get_filename(url);
      if (!r.file.empty()) {
         r.match = true;
         r.domain = "Movistar Argentina";       
      } else {
         r.match = false;
      }
   }
   else
   {
      r.match = false;
   }
   return r;
}
Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Noviembre 01, 2013, 05:07:20 PM
telefonica.com.ar

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

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o telefonica.com.ar.so telefonica.com.ar.cpp
// Regex
// http.*\.telefonica\.com\.ar.*(\.swf|\.jpg|\.png|\.gif)

string get_filename(string url) {
                vector<string> resultado;
        string retorna = "";
        stringexplode(url, "/", &resultado);
        retorna = resultado.at(resultado.size()-2) + "-"+resultado.at(resultado.size()-1);
        return retorna;
}

extern "C" resposta getmatch(const string url) {
        resposta r;       
               
  if ( (url.find("telefonica.com.ar/") != string::npos)
     ) {
      r.file = get_filename(url);
      if (!r.file.empty()) {
         r.match = true;
         r.domain = "Telefonica Argentina";       
      } else {
         r.match = false;
      }
   }
   else
   {
      r.match = false;
   }
   return r;
}

Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Noviembre 01, 2013, 05:07:53 PM
tiendamovistar.com.ar

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

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o tiendamovistar.com.ar.so tiendamovistar.com.ar.cpp
// Regex
// http.*\.tiendamovistar\.com\.ar.*(\.swf|\.jpg|\.png|\.gif)

string get_filename(string url) {
                vector<string> resultado;
        string retorna = "";
        stringexplode(url, "/", &resultado);
        retorna = resultado.at(resultado.size()-2) + "-"+resultado.at(resultado.size()-1);
        return retorna;
}

extern "C" resposta getmatch(const string url) {
        resposta r;       
               
  if ( (url.find("tiendamovistar.com.ar/") != string::npos)
     ) {
      r.file = get_filename(url);
      if (!r.file.empty()) {
         r.match = true;
         r.domain = "TiendaMovistar";       
      } else {
         r.match = false;
      }
   }
   else
   {
      r.match = false;
   }
   return r;
}
Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Noviembre 01, 2013, 05:08:34 PM
tmoviles.com.ar   (movistar)

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

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o tmoviles.com.ar.so tmoviles.com.ar.cpp
// Regex
// http.*\.tmoviles\.com\.ar.*(\.swf|\.jpg|\.png|\.gif)

string get_filename(string url) {
                vector<string> resultado;
        string retorna = "";
        stringexplode(url, "/", &resultado);
        retorna = resultado.at(resultado.size()-2) + "-"+resultado.at(resultado.size()-1);
        return retorna;
}

extern "C" resposta getmatch(const string url) {
        resposta r;       
               
  if ( (url.find("tmoviles.com.ar/") != string::npos)
     ) {
      r.file = get_filename(url);
      if (!r.file.empty()) {
         r.match = true;
         r.domain = "Tienda Movistar";       
      } else {
         r.match = false;
      }
   }
   else
   {
      r.match = false;
   }
   return r;
}
Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Noviembre 02, 2013, 12:39:35 AM
Test de velocidad de speedtest.net a:
Silicanetworks.net.ar     

    #include <iostream>
    #include <cstring>
    #include <string>
    #include <vector>
    #include "../utils.cpp"
     
    using namespace std;
     
    // use this line to compile
    // g++ -I. -fPIC -shared -g -o silicanetworks.net.ar.so silicanetworks.net.ar.cpp
    // Regex
    // http.*\.silicanetworks\.net\.ar.*(\.swf|\.jpg|\.png|\.gif)
     
     string dominiotxt="SpeedTest SilicaNetworks";
     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()-3)+"_"+resultado.at(resultado.size()-2)+"_"+resultado.at(resultado.size()-1);         
                        } else {
                                stringexplode(url, "/", &resultado);
                                return resultado.at(resultado.size()-3)+"_"+resultado.at(resultado.size()-2)+"_"+resultado.at(resultado.size()-1);
                        }
            }
     
     
    extern "C" resposta getmatch(const string url) {
            resposta r;       
                   
      if ( (url.find("silicanetworks.net.ar/") != string::npos)
         ) {
     
          r.file = get_filename(url);
          if (!r.file.empty()) {
             r.match = true;
             r.domain = dominiotxt;     
          } else {
             r.match = false;
          }
       }
       else
       {
          r.match = false;
       }
       return r;
    }
Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Noviembre 02, 2013, 10:12:31 PM
PAGINA DE UBIQUITI   UBNT.COM

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

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o ubnt.com.so ubnt.com.cpp
// Regex
// http.*\.ubnt\.com.*(\.swf|\.jpg|\.png|\.gif)

string get_filename(string url) {
                vector<string> resultado;
        string retorna = "";
        stringexplode(url, "/", &resultado);
        retorna = resultado.at(resultado.size()-2) + "-"+resultado.at(resultado.size()-1);
        return retorna;
}

extern "C" resposta getmatch(const string url) {
        resposta r;       
               
  if ( (url.find("ubnt.com/") != string::npos)
     ) {
      r.file = get_filename(url);
      if (!r.file.empty()) {
         r.match = true;
         r.domain = "Ubiquiti";       
      } else {
         r.match = false;
      }
   }
   else
   {
      r.match = false;
   }
   return r;
}
Título: Re:Plugins varios - Ire agregando
Publicado por: seth750km en Diciembre 01, 2013, 07:19:51 PM
Cita de: zeronett en Noviembre 01, 2013, 04:45:39 PM
movistararg.com

que diferencia hay con el de movistar.com.ar si al introducirlo en el navegar automaticamente te redirecciona??
Título: Re:Plugins varios - Ire agregando
Publicado por: seth750km en Diciembre 01, 2013, 07:31:25 PM
Cita de: zeronett en Noviembre 01, 2013, 05:08:34 PM
tmoviles.com.ar   (movistar)

porq no permite acceder con solo ingresar el dir en el navegador te da como incorrecta la dir??
Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Diciembre 01, 2013, 11:56:34 PM
tmoviles.com.ar es la url donde se alojan algunos archivos. la pagina visible es movistar.com.ar
Título: Re:Plugins varios - Ire agregando
Publicado por: seth750km en Diciembre 05, 2013, 12:19:47 AM
Cita de: david_domh en Octubre 24, 2013, 02:41:06 AM
te falto ponerle 2 extensiones amigo el de pdf y exe ya que hay descargas de formularios y aplicativos
el plugin serìa asi entonces :

Código (cpp) [Seleccionar]
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include "../utils.cpp"

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o rionegro.gov.ar.so rionegro.gov.ar.cpp
// Regex
// http.*\.rionegro\.gov\.ar.*(\.swf|\.jpg|\.png|\.gif|\.pdf|\.exe)

string dominiotxt="Rionegro.gov.ar";    
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()-3)+"_"+resultado.at(resultado.size()-2)+"_"+resultado.at(resultado.size()-1);          
               } else {
                       stringexplode(url, "/", &resultado);
                       return resultado.at(resultado.size()-3)+"_"+resultado.at(resultado.size()-2)+"_"+resultado.at(resultado.size()-1);
               }
   }

extern "C" resposta getmatch(const string url) {
       resposta r;        
               
 if ( (url.find("rionegro.gov.ar/") != string::npos)
    ) {
     r.file = get_filename(url);
     if (!r.file.empty()) {
        r.match = true;
        r.domain = dominiotxt;      
     } else {
        r.match = false;
     }
  }
  else
  {
     r.match = false;
  }
  return r;
}


Saludos

David M.

Buen aporte zeronett a seguir aportando mas plugins.................

Hola una duda ya q soy muy nuevo en esto, aunq decis q faltaron un par de extenciones en la linea del redex, porque el codigo del plugin q dejas es mas largo q el original de zeronett?. Q diferencia hay con el otro?
Título: Re:Plugins varios - Ire agregando
Publicado por: zeronett en Diciembre 05, 2013, 10:46:18 PM
 seth750km lo que hizo fue agregar mas tipos de extenciones para que haga cache.