anka-213 / webcomic_reader

Webcomic Reader userscript at
https://openuserjs.org/scripts/anka-213/Webcomic_Reader
MIT License
120 stars 27 forks source link

Kissmanga.com stopped working #67

Closed dem0z closed 6 years ago

dem0z commented 7 years ago

it was working with it a week ago or so, maybe something changed with the site? am not sure. Kissmanga.com

Tmp341 commented 7 years ago

Kissmanga started using encryption.

dem0z commented 7 years ago

don't really know anything about that stuff i just hope it can be fixed on kissmanga

anka-213 commented 7 years ago

@Tmp341 How silly. Why use encryption when you are forced to store the key at the same place as the encrypted data. All that's needed is easily available.

Note to self: Here is a simplified version of the decryption code:

decryptUrl = function(input) {
  var myKey = CryptoJS.enc.Base64.parse("CZxn6MGmKX2zSpiR5NvkGRZuv3uxG29HrVyhP6KvVBg=");
  var myIv = CryptoJS.enc.Base64.parse("peji6cJyG+CoStZgxHLB8w==");

  var output = null;
  try {
    var ciphertext = CryptoJS.lib.CipherParams.create({
      ciphertext : CryptoJS.enc.Base64.parse(input)
    });
    var plaintext = CryptoJS.AES.decrypt(ciphertext, myKey, {
      mode : CryptoJS.mode.CBC,
      iv : myIv,
      padding : CryptoJS.pad.Pkcs7
    });
    output = plaintext.toString(CryptoJS.enc.Utf8);
    return output;
  } catch (e) {
    console.error(e);
  }
}
Tmp341 commented 7 years ago

I dunno. I remember them using others readers' urls, like batoto.

Lunarhawk commented 6 years ago

Seems like Kiss still isnt' working, at least for me. Has the script not been updated yet or should I be copying what anka posted into it somewhere?

dem0z commented 6 years ago

Nothing was updated so the problem is still the same.

ghost commented 6 years ago

Hi. The problem with kissmanga.com still present.

ghost commented 6 years ago

I tried change the regexp html.match(/lstImages\.push\(".+?"\);/g) for html.match(/lstImages\.push\(wrapKA\(".+?"\)\);/g) then the screen goes dark with null on the center.

url:    'kissmanga.com',
  img: function(html, pos){
    var imgs = html.match(/lstImages\.push\(wrapKA\(".+?"\)\);/g);
    var num = 0;
    try {num = Number(link[pos].match(/##(-?\d+)/)[1]);}
    catch (e) {num = 0;}
    if (num == -1) num = imgs.length - 1;
    return imgs[num].match(/"(.+)"/)[1];
},
anka-213 commented 6 years ago

Sorry, I haven't had much time to work on WCR lately. I'll look into solving this when I get the time.

Lunarhawk commented 6 years ago

I pray for your fortune and success

Lunarhawk commented 6 years ago

Hey I know you closed this but I just installed the version updated 2 days ago that says it fixes this and it... doesn't. It just breaks kissmanga entirely, at least in Firefox 56 (pre-quantum). Is having 57+ a requirement for it working?

dem0z commented 6 years ago

Yeah this breaks image loading somehow.

crazygolem commented 6 years ago

@Lunarhawk I tested with a chrome-based browser, not firefox. However the change was pretty generic, I don't expect it to break depending on the browser's version. I'll try to take another look this week.

@dem0z could you give more details? browser, version, urls, ...

dem0z commented 6 years ago

I am on Opera 51 using latest version of the script. I tried on this http://kissmanga.com/Manga/Onepunch-Man/Punch-071-005?id=406817 it works without the script just fine but with it, it's like this https://i.imgur.com/7XQ6NfN.png I tried on Chrome too, same thing.

anka-213 commented 6 years ago

Oh, sorry. I merged the pull request without testing it myself first. I'll revert it for now.

@crazygolem Do you have any custom settings for the site? Because the pull request you sent is not working at all. You are not actually using the wrapKA functions that you said you are using.

anka-213 commented 6 years ago

Ok, now I've fixed it again. Now it should work on all browsers.

Thanks @crazygolem for the help.

crazygolem commented 6 years ago

@anka-213 I effectively messed up with the commit, sorry for that. I'm not sure that your commit correctly matches the URLs in the first place, but I will take a look and propose a new PR if needed. Edit: Sorry should have looked more carefully at your commits, I just saw that you applied my changes again before your last commit :)