Skip to content

Instantly share code, notes, and snippets.

@tpai
Last active August 29, 2015 14:14
Show Gist options
  • Save tpai/2e68ad86c0e34be6259a to your computer and use it in GitHub Desktop.
Save tpai/2e68ad86c0e34be6259a to your computer and use it in GitHub Desktop.
圖源連結解密
  1. view source of the link below
  1. chapternew_v2.js

  2. target function "ajaxloadimage()"

$.ajax({
    url: "chapterfun.ashx",
    data: {
      cid: DM5_CID,
      page: DM5_PAGE,
      key: mkey,
      language: 1
    },
    type: "GET",
    ...
})
  1. got this from chrome devtool network panel

http://www.dm9.com/m85797/chapterfun.ashx?cid=[comic_id]&page=[page_num]&key=[#dm5_key]

  1. return the code below
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('j 9(){2 6=4;2 8=\'a\';2 7="h://g.l-k-b-c.f.e/1/p/4";2 3=["/r.5","/m.5"];q(2 i=0;i<3.o;i++){3[i]=7+3[i]+\'?6=4&8=a\'}n 3}2 d;d=9();',28,28,'||var|pvalue|85797|jpg|cid|pix|key|dm5imagefun|699c0ec84a14ac047f5c72063d44081b|243|170||com|cdndm5|manhua1019|http||function|181|107|45_7665|return|length|432|for|44_7665'.split('|'),0,{}))
  1. after eval()
function dm5imagefun() {
    var cid = 85797;
    var key = '699c0ec84a14ac047f5c72063d44081b';
    var pix = "http://manhua1019.107-181-243-170.cdndm5.com/1/432/85797";
    var pvalue = ["/44_7665.jpg", "/45_7665.jpg"];
    for (var i = 0; i < pvalue.length; i++) {
        pvalue[i] = pix + pvalue[i] + '?cid=85797&key=699c0ec84a14ac047f5c72063d44081b'
    }
    return pvalue
}
var d;
d = dm5imagefun();
  1. return array d contains...
[img_src, next_img_src]
  1. that's it! :D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment