Advertisement
Guest User

plugion haarp speedtest

a guest
Apr 12th, 2013
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. #include <vector>
  4. #include "../utils.cpp"
  5.  
  6. // use this line to compile
  7. // g++ -I. -fPIC -shared -g -o speedtest.net.so speedtest.net.cpp
  8. // regex
  9. // http.*\.movistar\.com\.pe.*\.jpg
  10. // http.*\.claro\.com\.pe.*\.jpg
  11. // http.*\.olo\.com\.pe.*\.jpg
  12.  
  13.  
  14. string get_filename(string url) {
  15. vector<string> resultado;
  16. if (url.find("?") != string::npos) {
  17. stringexplode(url, "?", &resultado);
  18. stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
  19. return resultado.at(resultado.size()-1);
  20. } else {
  21. stringexplode(url, "/", &resultado);
  22. return resultado.at(resultado.size()-1);
  23. }
  24. }
  25.  
  26. extern "C" resposta hgetmatch2(const string url) {
  27. resposta r;
  28. r.range_min = 0;
  29. r.range_max = 0;
  30.  
  31. if ( (url.find(".movistar.com.pe/") != string::npos) and
  32. ( (url.find(".jpg") != string::npos) or (url.find(".swf") != string::npos) ) and
  33. (url.find("claro.com.pe") == string::npos) and
  34. (url.find("olo.com.pe") == string::npos)
  35. ) {
  36.  
  37. r.file = get_filename(url);
  38. if (!r.file.empty()) {
  39. r.match = true;
  40. r.domain = "speedtest";
  41. } else {
  42. r.match = false;
  43. }
  44. } else {
  45. r.match = false;
  46. }
  47. return r;
  48. }
  49.  
  50.  
  51. //HEADERS
  52.  
  53.  
  54. Request URL:http://speedtest4.claro.com.pe/speedtest/upload.php?x=0.7752903765067458
  55.  
  56. Request URL:http://speedtest.movistar.com.pe/speedtest/latency.txt?x=1365780932390
  57.  
  58. Request URL:http://o.speedtest.olo.com.pe/speedtest/latency.txt?x=1365781928671
  59.  
  60. Request URL:http://c.speedtest.net/flash/standard-wide-long.swf?v=326308
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement