NguyenDanPhuong / MangaRipper

This software helps you download manga (Japanese Comic) from several websites for your offline viewing.
MIT License
190 stars 43 forks source link

KissManga strikes again #64

Closed GambitKZ closed 6 years ago

GambitKZ commented 7 years ago

I found interesting thing: I have successfully download manga with the "72nnasdasd9asdn123nasdbasd612basd" Chko key, which I took from "lo.js": image

I have tried to do the same on my home PC by putting this key into config. However, it failed. Thinking something like "it's better to return to the option with finding two key parts, and then create a correct key from them". I have build the branch with this option on my work PC, add the logger, and it wrote to me "KissManga | Chko key - 72nnasdasd9asdn123nasdbasd612basd". I have copied this project to my home PC, execute it, and it has failed with the following error: "| INFO | ParserHelper | > Parse: var _0xa5a2 = ["(?.[^"]*)"]; | ERROR | ParserHelper | Cannot parse below content."

I check the content, and get the following picture: image

chko was "undefined", so it took the "mshsdf832nsdbash20asdm" value of "_0x331e[21]": image So I took the latest code and set chko in config to "mshsdf832nsdbash20asdm". It successfully passed.

I can see the following options for the future:

  1. Leave it as is. All we need to do, is add the necessary instruction into the F.A.Q. Which explains (with pictures) to users how can they get this "chko" key.

    • Pros:

      • Less job for developers.
      • If key is calculated with some kind of rule based on IP, user can easily get his unique key.
    • Cons:

      • Create a very detailed instruction (Chrome, Firefox), so it will be understandable for everyone
      • A lot of work for users
  2. Return to PhantomJS.

    • Pros:

      • Already was implemented, so it's easy to change the code to previous state.
      • No more changes for KissManga
    • Cons:

      • Lower performance
      • Maybe it's better to use HttpClient, which probably won't hurt performance. Need investigation anyway
  3. Return to option with getting two part of a key (their name were not changed). And wrap it in "try/catch", in case if there no key, and take the "_0x331e[21]" value ("mshsdf832nsdbash20asdm"). It can be set in config as "chko", or use additional request to download "http://kissmanga.com/Scripts/lo.js" and find it there.

    • Pros:

      • The names of those keys were not changed, so I assume it may be kept as is. With this there is no need to change the config with new values
      • Was previously implemented (without work with "lo.js"), so also easy to use it
    • Cons:

      • If names of those properties will be changed - it will require changes in config/code
      • Changes in logic will require some time to understand them, and change the code accordingly
  4. @JedBurke will try Jurassic library once again.

    • Pros:

      • No performance issues like with PhantomJS
      • Will help us later with any JS issues
    • Cons:

      • Need time for investigation/implementation

@NguyenDanPhuong @JedBurke What do you think guys?

NguyenDanPhuong commented 7 years ago

I have a simpler way for user to get chko and iv.

I will update the F.A.Q. if KissManga changed again. I think we may come back with PhantomJS and add a splash screen for long startup time.

JedBurke commented 7 years ago

It's not my call to make, but I wouldn't want to ask the user to fetch the keys themselves.

With that said, I am personally very interested in seeing what Jurassic can do.

In my fork, I've used HTML Agility Pack in conjunction with Jurassic. What it does is, it looks for the keys in the live version of the page before getting and decrypting the image URIs.

The binaries were uploaded after @GambitKZ made this post, but the source has been unchanged since before the last change. I haven't tested it on many series, but as of writing, it still works.

Need time for investigation/implementation

True, using this method, it's uncertain how long it will take to implement.

By the way, @GambitKZ you did a nice job detailing the issue and possible solutions.

GambitKZ commented 7 years ago

I am personally very interested in seeing what Jurassic can do

Double this. It's better to keep PhantomJS as a wild card for a very hard cases. And who knows, maybe we will find a good performance solution with Jurassic.

True, using this method, it's uncertain how long it will take to implement.

I'm also will try to read a little bit more about Jurassic.

By the way, @GambitKZ you did a nice job detailing the issue and possible solutions.

Thanks. Spent two working weeks on Tech Analysis, have tried to relax on weekends...and look what I've got :(

GambitKZ commented 7 years ago

Looks like something happens once again. It's time to return to PhantomJS and Jurassic.

JedBurke commented 7 years ago

I'm going to be busy until the end of the month, so I'll tentatively not be able to work on implementing Jurassic during this time.

JedBurke commented 7 years ago

If the KissManga situation hasn't changed, I'm free to begin looking at implementing Jurassic.

GambitKZ commented 7 years ago

Feel free. I'm too busy with work, so I don't know when I will be able to check Jurassic.

JedBurke commented 7 years ago

Cool, will do.

JedBurke commented 7 years ago

I've implemented Jurassic and have done some preliminary tests with it. There are indeed some interesting changes server-side, so I won't say when it'll be done. Will push the commits soon though.

GambitKZ commented 7 years ago

Ok, I'm already excited https://m.popkey.co/3a81df/rbZYW.gif

JedBurke commented 7 years ago

I doubt it's worthy of such excitement. :) Besides the issue with the encryption, there was / is was one with a CF backed CDN where error pages (521 & 503) were served instead of images. Though another series used the Blogspot domain to serve the images and all was well. We'll see if it's a new development or not.

I've pushed the work-in-progress, checks and optimizations are still underway.

GambitKZ commented 6 years ago

I see a number of issues regarding KissManga. However, I haven't seen any of this errors myself. I have tried all the links which were provided in #103 and #102. It downloaded smoothly. @JedBurke @NguyenDanPhuong HAve you received the errors with KissManga?

NguyenDanPhuong commented 6 years ago

@GambitKZ: I don't see any error. But let's continous monitor it.