This repository has been archived by the owner on May 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for KissManga encrypted urls.
- Loading branch information
Roel van Uden
committed
May 18, 2017
1 parent
bf68557
commit b01cd2e
Showing
4 changed files
with
43 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
declare let require: any; | ||
let decode: any; | ||
let d18052017 = 'var _0x331e=["\x6C\x69\x62","\x57\x6F\x72\x64\x41\x72\x72\x61\x79","\x48\x61\x73\x68\x65\x72","\x61\x6C\x67\x6F","\x73\x71\x72\x74","\x70\x6F\x77","\x53\x48\x41\x32\x35\x36","\x5F\x68\x61\x73\x68","\x73\x6C\x69\x63\x65","\x69\x6E\x69\x74","\x77\x6F\x72\x64\x73","\x5F\x64\x61\x74\x61","\x5F\x6E\x44\x61\x74\x61\x42\x79\x74\x65\x73","\x73\x69\x67\x42\x79\x74\x65\x73","\x66\x6C\x6F\x6F\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x61\x6C\x6C","\x63\x6C\x6F\x6E\x65","\x65\x78\x74\x65\x6E\x64","\x48\x6D\x61\x63\x53\x48\x41\x32\x35\x36","\x61\x35\x65\x38\x65\x32\x65\x39\x63\x32\x37\x32\x31\x62\x65\x30\x61\x38\x34\x61\x64\x36\x36\x30\x63\x34\x37\x32\x63\x31\x66\x33","\x6D\x73\x68\x73\x64\x66\x38\x33\x32\x6E\x73\x64\x62\x61\x73\x68\x32\x30\x61\x73\x64\x6D","\x70\x61\x72\x73\x65","\x48\x65\x78","\x65\x6E\x63","\x42\x61\x73\x65\x36\x34","\x63\x72\x65\x61\x74\x65","\x43\x69\x70\x68\x65\x72\x50\x61\x72\x61\x6D\x73","\x43\x42\x43","\x6D\x6F\x64\x65","\x50\x6B\x63\x73\x37","\x70\x61\x64","\x64\x65\x63\x72\x79\x70\x74","\x41\x45\x53"];(function(_0xfac5x1){for(var _0xfac5x2=CryptoJS,_0xfac5x3=_0xfac5x2[_0x331e[0]],_0xfac5x4=_0xfac5x3[_0x331e[1]],_0xfac5x5=_0xfac5x3[_0x331e[2]],_0xfac5x3=_0xfac5x2[_0x331e[3]],_0xfac5x6=[],_0xfac5x7=[],_0xfac5x8=function(_0xfac5xb){return 4294967296*(_0xfac5xb-(_0xfac5xb|0))|0},_0xfac5x9=2,_0xfac5xa=0;64>_0xfac5xa;){var _0xfac5xc;a:{_0xfac5xc=_0xfac5x9;for(var _0xfac5xd=_0xfac5x1[_0x331e[4]](_0xfac5xc),_0xfac5xe=2;_0xfac5xe<=_0xfac5xd;_0xfac5xe++){if(!(_0xfac5xc%_0xfac5xe)){_0xfac5xc=!1;break a}};_0xfac5xc=!0}_0xfac5xc&&(8>_0xfac5xa&&(_0xfac5x6[_0xfac5xa]=_0xfac5x8(_0xfac5x1[_0x331e[5]](_0xfac5x9,0.5))),_0xfac5x7[_0xfac5xa]=_0xfac5x8(_0xfac5x1[_0x331e[5]](_0xfac5x9,1/3)),_0xfac5xa++);_0xfac5x9++};var _0xfac5xf=[],_0xfac5x3=_0xfac5x3[_0x331e[6]]=_0xfac5x5[_0x331e[18]]({_doReset:function(){this[_0x331e[7]]=new _0xfac5x4[_0x331e[9]](_0xfac5x6[_0x331e[8]](0))},_doProcessBlock:function(_0xfac5xb,_0xfac5x3){for(var _0xfac5x10=this[_0x331e[7]][_0x331e[10]],_0xfac5x11=_0xfac5x10[0],_0xfac5xc=_0xfac5x10[1],_0xfac5xa=_0xfac5x10[2],_0xfac5x1=_0xfac5x10[3],_0xfac5x12=_0xfac5x10[4],_0xfac5x2=_0xfac5x10[5],_0xfac5x5=_0xfac5x10[6],_0xfac5x9=_0xfac5x10[7],_0xfac5x13=0;64>_0xfac5x13;_0xfac5x13++){if(16>_0xfac5x13){_0xfac5xf[_0xfac5x13]=_0xfac5xb[_0xfac5x3+ _0xfac5x13]|0}else{var _0xfac5x14=_0xfac5xf[_0xfac5x13- 15],_0xfac5x15=_0xfac5xf[_0xfac5x13- 2];_0xfac5xf[_0xfac5x13]=((_0xfac5x14<<25|_0xfac5x14>>>7)^(_0xfac5x14<<14|_0xfac5x14>>>18)^_0xfac5x14>>>3)+ _0xfac5xf[_0xfac5x13- 7]+((_0xfac5x15<<15|_0xfac5x15>>>17)^(_0xfac5x15<<13|_0xfac5x15>>>19)^_0xfac5x15>>>10)+ _0xfac5xf[_0xfac5x13- 16]};_0xfac5x14=_0xfac5x9+((_0xfac5x12<<26|_0xfac5x12>>>6)^(_0xfac5x12<<21|_0xfac5x12>>>11)^(_0xfac5x12<<7|_0xfac5x12>>>25))+(_0xfac5x12&_0xfac5x2^~_0xfac5x12&_0xfac5x5)+ _0xfac5x7[_0xfac5x13]+ _0xfac5xf[_0xfac5x13];_0xfac5x15=((_0xfac5x11<<30|_0xfac5x11>>>2)^(_0xfac5x11<<19|_0xfac5x11>>>13)^(_0xfac5x11<<10|_0xfac5x11>>>22))+(_0xfac5x11&_0xfac5xc^_0xfac5x11&_0xfac5xa^_0xfac5xc&_0xfac5xa);_0xfac5x9=_0xfac5x5;_0xfac5x5=_0xfac5x2;_0xfac5x2=_0xfac5x12;_0xfac5x12=_0xfac5x1+ _0xfac5x14|0;_0xfac5x1=_0xfac5xa;_0xfac5xa=_0xfac5xc;_0xfac5xc=_0xfac5x11;_0xfac5x11=_0xfac5x14+ _0xfac5x15|0};_0xfac5x10[0]=_0xfac5x10[0]+ _0xfac5x11|0;_0xfac5x10[1]=_0xfac5x10[1]+ _0xfac5xc|0;_0xfac5x10[2]=_0xfac5x10[2]+ _0xfac5xa|0;_0xfac5x10[3]=_0xfac5x10[3]+ _0xfac5x1|0;_0xfac5x10[4]=_0xfac5x10[4]+ _0xfac5x12|0;_0xfac5x10[5]=_0xfac5x10[5]+ _0xfac5x2|0;_0xfac5x10[6]=_0xfac5x10[6]+ _0xfac5x5|0;_0xfac5x10[7]=_0xfac5x10[7]+ _0xfac5x9|0},_doFinalize:function(){var _0xfac5xc=this[_0x331e[11]],_0xfac5xa=_0xfac5xc[_0x331e[10]],_0xfac5x10=8*this[_0x331e[12]],_0xfac5x11=8*_0xfac5xc[_0x331e[13]];_0xfac5xa[_0xfac5x11>>>5]|=128<<24- _0xfac5x11%32;_0xfac5xa[(_0xfac5x11+ 64>>>9<<4)+ 14]=_0xfac5x1[_0x331e[14]](_0xfac5x10/4294967296);_0xfac5xa[(_0xfac5x11+ 64>>>9<<4)+ 15]=_0xfac5x10;_0xfac5xc[_0x331e[13]]=4*_0xfac5xa[_0x331e[15]];this._process();return this[_0x331e[7]]},clone:function(){var _0xfac5xa=_0xfac5x5[_0x331e[17]][_0x331e[16]](this);_0xfac5xa[_0x331e[7]]=this[_0x331e[7]][_0x331e[17]]();return _0xfac5xa}});_0xfac5x2[_0x331e[6]]=_0xfac5x5._createHelper(_0xfac5x3);_0xfac5x2[_0x331e[19]]=_0xfac5x5._createHmacHelper(_0xfac5x3)})(Math);var boxzq=_0x331e[20];var chko=_0x331e[21];var iv,key;iv=CryptoJS[_0x331e[24]][_0x331e[23]][_0x331e[22]](boxzq);key=CryptoJS.SHA256(chko);function wrapKA(_0xfac5x1b){var _0xfac5x1c=null;try{var _0xfac5x1d=CryptoJS[_0x331e[0]][_0x331e[27]][_0x331e[26]]({ciphertext:CryptoJS[_0x331e[24]][_0x331e[25]][_0x331e[22]](_0xfac5x1b)});var _0xfac5x1e=CryptoJS[_0x331e[33]][_0x331e[32]](_0xfac5x1d,key,{mode:CryptoJS[_0x331e[29]][_0x331e[28]],iv:iv,padding:CryptoJS[_0x331e[31]][_0x331e[30]]});_0xfac5x1c=_0xfac5x1e.toString(CryptoJS[_0x331e[24]].Utf8);return _0xfac5x1c}catch(err){alert(err)}}'; | ||
|
||
/** | ||
* Represents the collection of site utilities. | ||
*/ | ||
export let site = { | ||
/** | ||
* Decodes an image url. | ||
* @param url The url. | ||
* @return The decoded image url. | ||
*/ | ||
decodeImageUrl(url: string): string { | ||
decode = decode || createDecoder(); | ||
return decode(url); | ||
} | ||
}; | ||
|
||
/** | ||
* Creates a decoder. | ||
* @return The decoder. | ||
*/ | ||
function createDecoder(): any { | ||
var CryptoJS = require('crypto-js'); | ||
if (CryptoJS) { | ||
var out = {wrapKA: undefined}; | ||
eval(`${d18052017};out.wrapKA = wrapKA`); | ||
return out.wrapKA; | ||
} else { | ||
throw new Error('Invalid CryptoJS module.'); | ||
} | ||
} |