Dubz

Linkvalidator Bypass by 3nvisi0n

Dec 19th, 2014 (edited)
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name          Linkvalidator Bypass by 3nvisi0n
  3. // @description   Bypasses the Xat Link Validator(includes bypassing blocked pages)
  4. // @namespace     http://newhax.com/forums/
  5. // @include       http://linkvalidator.net/warn.php?p=*
  6. // @version       0.1
  7. // ==/UserScript==
  8. /**
  9.  * Base64 Decoding code is not mine, it is taken from Stephen Ostermiller(ostermiller.org) and is a wonderful piece of code.
  10.  * The page it was obtained from on June 27th, 2011 is http://ostermiller.org/calc/encode.html
  11.  * Copyright Stephen Ostermiller 2003-2006
  12.  */
  13. var END_OF_INPUT = -1;
  14. var base64Chars = new Array(
  15.     'A','B','C','D','E','F','G','H',
  16.     'I','J','K','L','M','N','O','P',
  17.     'Q','R','S','T','U','V','W','X',
  18.     'Y','Z','a','b','c','d','e','f',
  19.     'g','h','i','j','k','l','m','n',
  20.     'o','p','q','r','s','t','u','v',
  21.     'w','x','y','z','0','1','2','3',
  22.     '4','5','6','7','8','9','+','/'
  23. );
  24.  
  25. var reverseBase64Chars = new Array();
  26. for (var i=0; i < base64Chars.length; i++){
  27.     reverseBase64Chars[base64Chars[i]] = i;
  28. }
  29.  
  30. var base64Str;
  31. var base64Count;
  32. function setBase64Str(str){
  33.     base64Str = str;
  34.     base64Count = 0;
  35. }
  36. function readReverseBase64(){  
  37.     if (!base64Str) return END_OF_INPUT;
  38.     while (true){      
  39.         if (base64Count >= base64Str.length) return END_OF_INPUT;
  40.         var nextCharacter = base64Str.charAt(base64Count);
  41.         base64Count++;
  42.         if (reverseBase64Chars[nextCharacter]){
  43.             return reverseBase64Chars[nextCharacter];
  44.         }
  45.         if (nextCharacter == 'A') return 0;
  46.     }
  47.     return END_OF_INPUT;
  48. }
  49.  
  50. function ntos(n){
  51.     n=n.toString(16);
  52.     if (n.length == 1) n="0"+n;
  53.     n="%"+n;
  54.     return unescape(n);
  55. }
  56.  
  57. function decodeBase64(str){
  58.     setBase64Str(str);
  59.     var result = "";
  60.     var inBuffer = new Array(4);
  61.     var done = false;
  62.     while (!done && (inBuffer[0] = readReverseBase64()) != END_OF_INPUT
  63.         && (inBuffer[1] = readReverseBase64()) != END_OF_INPUT){
  64.         inBuffer[2] = readReverseBase64();
  65.         inBuffer[3] = readReverseBase64();
  66.         result += ntos((((inBuffer[0] << 2) & 0xff)| inBuffer[1] >> 4));
  67.         if (inBuffer[2] != END_OF_INPUT){
  68.             result +=  ntos((((inBuffer[1] << 4) & 0xff)| inBuffer[2] >> 2));
  69.             if (inBuffer[3] != END_OF_INPUT){
  70.                 result +=  ntos((((inBuffer[2] << 6)  & 0xff) | inBuffer[3]));
  71.             } else {
  72.                 done = true;
  73.             }
  74.         } else {
  75.             done = true;
  76.         }
  77.     }
  78.     return result;
  79. }
  80.  
  81.  
  82. location.href = decodeBase64(location.href.replace("http://linkvalidator.net/warn.php?p=",""));
Add Comment
Please, Sign In to add comment