Open MEYILLI opened 1 year ago
Let me know the command you ran.
Is there still problem when you download again?
I tried:
java -jar lezhin-comics-downloader-3.1.0.jar -l=ko -n=placebo -j
java -jar lezhin-comics-downloader-3.1.0.jar -l=ko -n=placebo
But it downloads this messed up images
Try to do with option -s
.
-s
didn't fix the problem.
For me.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is a tricky puzzle I'm working on. I've tried to figure it out, but it's still elusive.
Here's the scenario: I found something on this manga chapter link: https://www.lezhinus.com/en/comic/bjalex_en/01.
Firstly, you need to split the image into a 5 by 5 matrix:
var matrix = [
[11, 21, 31, 41, 51],
[12, 22, 32, 42, 52],
[13, 23, 33, 43, 53],
[14, 24, 34, 44, 54],
[15, 25, 35, 45, 55]
];
Consider this as the representation of a secret image.
var matrix = [
[15, 51, 31, 44, 52],
[22, 13, 53, 55, 23],
[33, 41, 32, 35, 43],
[34, 24, 42, 21, 45],
[11, 12, 25, 14, 54]
];
This is a correctly placed image. It works for this chapter, but it might not work in another chapter. There could be some key or information inside the initial chapter response that determines the correct placement. If I find something, I'll share it.
I've finally cracked it! It turns out, it's simpler than I thought. They use the chapter ID as the seed. I initially attempted a Matrix vision approach, but that was a mistake. The solution lies in straightforward XOR and shift operations. The chapter ID is the key to cracking it – that's the essence of the algorithm.
class G {
constructor(value) {
this.value = typeof value === 'bigint' ? value : BigInt(value);
}
xor(other) {
return new G(this.value ^ other.value);
}
shiftRight(bits) {
return new G(this.value >> bits);
}
shiftLeft(bits) {
return new G(this.value << bits);
}
and(mask) {
return new G(this.value & mask);
}
remainder(divisor) {
return new G(this.value % divisor);
}
}
function Se(t) {
return BigInt(t);
}
function seedReader(e) {
e = (e = (e = e.xor(e.shiftRight(Se(12)))).xor(e.shiftLeft(Se(25)).and(Se("18446744073709551615")))).xor(e.shiftRight(Se(27)));
const state = e.and(Se("18446744073709551615"));
const place = e.shiftRight(Se(32)).remainder(Se(25));
return [place.value, state];
}
const decodeID = (id) => {
let i = 0;
let arrays = Array.from({ length: 25 }, () => i++);
let gstate = new G(id);
for (let i = 0; i < 25; i++) {
const [place, state] = seedReader(gstate);
const u = arrays[i];
arrays[i] = arrays[place];
arrays[place] = u;
gstate = state;
}
return arrays;
}
The G
class provides essential operations for bitwise manipulation, forming the backbone of the algorithm. The seedReader
function then uses these operations to generate a shuffled array of indices based on the chapter ID seed.
Sorry if I'm bothering you @diomirox. In the issue #238 you wrote me that:
You might want to give it a try as well. It's running smoothly on my computer. I downloaded some images and successfully decoded them using Node.js XD. If you're interested, you can check out the decoding strategy I used ...
Since @ImSejin seems too busy to fix the problem at the moment and I've many chapters with mixed images, I would kindly ask if you could teach me -in the most intuitive way possible- how to use your decoding strategy. I can download Node.js, but Idk how to proceed from there on.
Hey @Arekkusu1998, I've got some exciting news for you! I'm currently working on a manga downloader that will allow you to easily download content from Lezhinus. I'm aiming to create it as quickly as possible. Stay tuned for updates!
Stay tuned for updates!
Yup, for sure!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
https://ibb.co/hgg5FR0
Is there anyway to fix how the images are downloaded?