1. JavaScript / Говнокод #25446

    +1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    // http://pacipfs2.antizapret.prostovpn.org/proxy-ssl.js
    
    function FindProxyForURL(url, host) {
      if (d_ipaddr.length < 10) return "DIRECT"; // list is broken
    
      if (!az_initialized) {
        var prev_ipval = 0;
        for (var i = 0; i < d_ipaddr.length; i++) {
         d_ipaddr[i] = parseInt(d_ipaddr[i], 36) + prev_ipval;
         prev_ipval = d_ipaddr[i];
        }
        for (var i = 0; i < special.length; i++) {
         special[i][1] = nmfc(special[i][1]);
        }
        az_initialized = 1;
      }
    
      var shost;
      if (/\.(ru|co|cu|com|info|net|org|gov|edu|int|mil|biz|pp|ne|msk|spb|nnov|od|in|ho|cc|dn|i|tut|v|dp|sl|ddns|dyndns|livejournal|herokuapp|azurewebsites|cloudfront|ucoz|3dn|nov|linode|amazonaws|sl-reverse|kiev)\.[^.]+$/.test(host))
        shost = host.replace(/(.+)\.([^.]+\.[^.]+\.[^.]+$)/, "$2");
      else
        shost = host.replace(/(.+)\.([^.]+\.[^.]+$)/, "$2");
      // Script optimization, see https://bugs.chromium.org/p/chromium/issues/detail?id=678022
      for (var k in dn) {
        var r = new RegExp('\\.'+k+'$');
        if (r.test(shost)) {shost = shost.replace(r, dn[k]); break;}
      }
      var curarr;
      if (/^[a-d]/.test(shost)) curarr = d_ad;
      else if (/^[e-h]/.test(shost)) curarr = d_eh;
      else if (/^[i-l]/.test(shost)) curarr = d_il;
      else if (/^[m-p]/.test(shost)) curarr = d_mp;
      else if (/^[q-t]/.test(shost)) curarr = d_qt;
      else if (/^[u-z]/.test(shost)) curarr = d_uz;
      else curarr = d_other;
    
      var oip = dnsResolve(host);
      var iphex = "";
      if (oip) {
       iphex = oip.toString().split(".");
       iphex = parseInt(iphex[3]) + parseInt(iphex[2])*256 + parseInt(iphex[1])*65536 + parseInt(iphex[0])*16777216;
      }
      var yip = 0;
      if (iphex) {
       for (var i = 0; i < d_ipaddr.length; i++) {
        if (iphex === d_ipaddr[i]) {yip = 1; break;}
       }
      }
      for (var i = 0; i < curarr.length; i++) {
        if (yip === 1 || shost === curarr[i]) {
          return "HTTPS proxy.antizapret.prostovpn.org:3143; PROXY proxy.antizapret.prostovpn.org:3128; DIRECT";
        }
      }
      for (var i = 0; i < special.length; i++) {
        if (isInNet(oip, special[i][0], special[i][1])) {return "PROXY CCAHIHA.antizapret.prostovpn.org:3128; DIRECT;";}
      }
    
      return "DIRECT";
    }

    CCAHIHA

    Запостил: j123123, 13 Марта 2019

    Комментарии (11) RSS

    Добавить комментарий