Skip to content

Commit

Permalink
LeviatanScans : add WpMangaProtector bypass (#5896)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeZeDev authored Jun 16, 2023
1 parent 4dfb23e commit 36410e1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/web/mjs/connectors/LeviatanScans.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,24 @@ export default class LeviatanScans extends WordPressMadara {
return new Request(new URL(`/ranking/page/${page}/`, this.url), this.requestOptions);
}

async _getPages(chapter) {
return await this._getWProtectedPages(chapter);
}

async _getWProtectedPages(chapter) {
const url = new URL(chapter.id, this.url);
const request = new Request(url, this.requestOptions);
const script = `
new Promise((resolve, reject) => {
var imgdata = JSON.parse(CryptoJS.AES.decrypt(chapter_data, wpmangaprotectornonce, {
format: CryptoJSAesJson
}).toString(CryptoJS.enc.Utf8));
resolve(JSON.parse(imgdata));
});
`;
return await Engine.Request.fetchUI(request, script);
}

async _handleConnectorURI(payload) {
let request = new Request(payload.url, this.requestOptions);
request.headers.set('x-referer', payload.referer);
Expand Down

0 comments on commit 36410e1

Please sign in to comment.