MCPcopy Create free account
hub / github.com/hoothin/UserScripts / Decryption

Function Decryption

True URL downloads/True URL downloads.user.js:49–84  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

47 var linksArr = [];
48 //迅雷、快车、旋风URL解码解密从这里开始
49 var Decryption = function(url) { //先解密再解码
50 if (url != '') {
51 var str = url.href,
52 sr = url.href;
53 var type = 0;
54 if (Rstr.test(str)) {
55 var str1 = str.match(Rstr);
56 var temp;
57 try{
58 temp = utf8to16(base64decode(str1[1].replace(aff, ''))).replace(aft, '');
59 if(!isCleanStr(temp)){
60 temp = decode64(str1[1].replace(aff, '')).replace(aft, '');
61 }else{
62 type = 1;
63 }
64 }catch(e){
65 temp = decode64(str1[1].replace(aff, '')).replace(aft, '');
66 }
67 str = temp;
68 } else {
69 return;
70 }
71 if (str.indexOf(":") < 0) {
72 str = "http://" + str.split("|")[0];
73 } else if (type == 0 && /[^(\w|\/|\.|\?|\=|\&|\:|\[|\])]/ig.test(str)) {
74 str = strAnsi2Unicode(str);
75 }
76 if (sr != str) {
77 url.title = '├此链接已解密┤';
78 url.style.outline = '#f0f dashed 2px';
79 url.href = str;
80 if(linksArr.toString().indexOf(str) == -1)
81 linksArr.push(str);
82 }
83 }
84 }
85
86 document.addEventListener('mouseup', function(o) {
87 if (o.button == 0 && (o.ctrlKey || o.metaKey)) {

Callers 2

decThisFunction · 0.85
seekUrlFunction · 0.85

Calls 5

utf8to16Function · 0.85
base64decodeFunction · 0.85
isCleanStrFunction · 0.85
decode64Function · 0.85
strAnsi2UnicodeFunction · 0.85

Tested by

no test coverage detected