Advertisement
e55db081d05f58a

unicodeDomain.js ... XD

Feb 8th, 2017
6,602
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Example use:
  2. //obfuscate.unicodeDomain("www.example.com/poc.exe");
  3. var obfuscate=(function(window,undefined){
  4.    
  5.     window.unicode={
  6.         "a":["ª","Ⓐ","ⓐ","A","a"],
  7.         "b":["ℬ","Ⓑ","ⓑ","B","b"],
  8.         "c":["ℂ","ℭ","Ⅽ","ⅽ","Ⓒ","ⓒ","C","c","ⅽ"],
  9.         "d":["ⅅ","ⅆ","Ⅾ","ⅾ","Ⓓ","ⓓ","D","d","ⅾ"],
  10.         "e":["ℯ","ℰ","ⅇ","Ⓔ","ⓔ","E","e"],
  11.         "f":["ℱ","Ⓕ","ⓕ","F","f"],
  12.         "g":["ℊ","Ⓖ","ⓖ","G","g"],
  13.         "h":["h","H","ⓗ","Ⓗ","ℍ","ℎ","ℋ","ʰ"],
  14.         "i":["ℑ","ℐ","ℹ","ⅈ","Ⅰ","ⅰ","Ⓘ","ⓘ"],
  15.         "j":["ⓙ","Ⓙ","ⅉ","ʲ","j","J"],
  16.         "k":["k","K","ⓚ","Ⓚ","K"],
  17.         "l":["ℒ","ℓ","Ⅼ","ⅼ","Ⓛ","ⓛ","L","l"],
  18.         "m":["m","M","ⓜ","Ⓜ","ℳ"],
  19.         "n":["n","N","ⓝ","Ⓝ","ⁿ"],
  20.         "o":["o","O","ⓞ","Ⓞ"],
  21.         "p":["p","P","ⓟ","Ⓟ"],
  22.         "q":["q","Q","ⓠ","Ⓠ","ℚ"],
  23.         "r":["r","R","ⓡ","Ⓡ","ℛ","ℜ","ℝ"],
  24.         "s":["s","S","ⓢ","Ⓢ"],
  25.         "t":["t","T","ⓣ","Ⓣ"],
  26.         "u":["u","U","ⓤ","Ⓤ"],
  27.         "v":["v","V","ⓥ","Ⓥ","Ⅴ","ⅴ"],
  28.         "w":["w","W","ⓦ","Ⓦ"],
  29.         "x":["ˣ","Ⅹ","ⅹ","Ⓧ","ⓧ","X","x"],
  30.         "y":["y","Y","ⓨ","Ⓨ"],
  31.         "z":["z","Z","ⓩ","Ⓩ","ℤ","ℨ",],
  32.         "0":["⁰","₀","⓪","0","⁰","₀"],
  33.         "1":["¹","₁","①","1"],
  34.         "2":["²","₂","②","2"],
  35.         "3":["³","₃","③","3"],
  36.         "4":["⁴","₄","④","4"],
  37.         "5":["⁵","₅","⑤","5"],
  38.         "6":["⁶","₆","⑥","6"],
  39.         "7":["⁷","₇","⑦","7"],
  40.         "8":["⁸","⑧","8","₈"],
  41.         "9":["⁹","⑨","9","₉"]
  42.     };
  43.    
  44.     function random(min,max){
  45.         return Math.floor((Math.random()*max)+min);
  46.     }
  47.    
  48.     function isUrl(s){
  49.        var regexp = /(?:http|https)?(?:\:\/\/)?(?:www.)?(([A-Za-z0-9-]+\.)*[A-Za-z0-9-]+\.[A-Za-z]+)(?:\/.*)?/i;
  50.        return regexp.test(s);
  51.     }
  52.    
  53.     function isIp(ip){
  54.         ip=ip.replace(/http(s)?:\/\//,"");
  55.         if (/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(ip)){
  56.             return (true);
  57.         }
  58.         return (false)  
  59.     }  
  60.    
  61.     function unicodeDomain(url){
  62.         if(isUrl(url) || isIp(url)){
  63.             p=(url.match(/http(s)?:\/\//)!=null)?url.match(/http(s)?:\/\//)[0]:"http://";
  64.             url=url.replace(/http(s)?:\/\//,"");
  65.             su=url.split("/");
  66.             domain=su[0];
  67.             path=url.replace(domain,"");
  68.             i=0;
  69.             l=domain.length;
  70.             obfuscated_domain="";
  71.             while(i<l){
  72.                 tmp=(typeof window.unicode[domain[i]]!="undefined")?window.unicode[domain[i]]:domain[i];
  73.                 if(typeof tmp == "object"){
  74.                     r=random(0,tmp.length);
  75.                     obfuscated_domain+=tmp[r];
  76.                 }else{
  77.                     console.log(tmp);
  78.                     obfuscated_domain+=tmp;
  79.                 }
  80.                 i++;
  81.             }
  82.             return p+obfuscated_domain+path;
  83.         }
  84.         else{
  85.             console.log("Nope!");
  86.         }
  87.     }
  88.    
  89.     return{
  90.         unicodeDomain:unicodeDomain
  91.     }
  92.    
  93. })(window);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement