Aqua Manga: and another unblock attempt (#18630)
This commit is contained in:
parent
194828449c
commit
1180e8349d
|
@ -3,7 +3,7 @@ package eu.kanade.tachiyomi.extension.en.aquamanga
|
|||
import android.util.Base64
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import okhttp3.Headers
|
||||
import java.nio.charset.Charset
|
||||
import kotlin.random.Random
|
||||
|
||||
class AquaManga : Madara("Aqua Manga", "https://aquamanga.com", "en") {
|
||||
|
||||
|
@ -15,7 +15,7 @@ class AquaManga : Madara("Aqua Manga", "https://aquamanga.com", "en") {
|
|||
.add("Sec-Fetch-Mode", "navigate")
|
||||
.add("Sec-Fetch-Site", "same-origin")
|
||||
.add("Upgrade-Insecure-Requests", "1")
|
||||
.add("X-Requested-With", u)
|
||||
.add("X-Requested-With", randomValue)
|
||||
|
||||
private val littleBitCursedEncodedValue = "ICAgSUFBZ0FFa0FRd0JCQUdjQVNRQkRBRUVBWndCUkFGVUFUZ0JDQUZFQVZRQnNBRUlBVVFCWEFHUUFRZ0JSQURBQVJnQkNBRk1BVlFCR0FFSUFXZ0F3QUVZQVJBQlJBRlVBUmdCVUFGVUFWUUJLQUVVQVVRQlZBRllBUmdCUkFGWUFjQUF6QUZFQWF3QndBRUlBVWdCVkFERUFRZ0JWQUZZQVJnQkRBR0lBYXdCR0FFWUFZUUF3QUVZQVVnQmtBREFBU2dCREFGRUFWUUJrQUdvQVVRQldBRTRBVWdCUkFHc0FVZ0JDQUZJQVZRQnNBRUlBVlFBeUFHUUFRd0JWQUdzQVJnQkhBRllBVlFCR0FGTUFXZ0F3QUVvQU1RQlJBRlVBV2dCR0FGRUFWZ0JhQUZJQVVRQnJBRGtBUWdCU0FGVUFiQUJ" +
|
||||
"DQUZZQVZnQkdBRU1BVmdBd0FFWUFSZ0JPQUVVQVJnQldBRm9BTUFCS0FGTUFVUUJWQUdRQWVnQlJBRllBVmdCdUFGRUFhd0JPQUVJQVVnQnJBR3dBUWdCV0FHd0FSZ0JEQUZZQU1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EMEFJQUFnQUNBQUlBQT0gICA="
|
||||
|
||||
private fun decoder(input: String, outputType: Charset): String {
|
||||
return Base64.decode(input, Base64.DEFAULT).toString(outputType).trim()
|
||||
private fun getRandomSubstring(input: String, length: Int): String {
|
||||
val startIndex = (0 until input.length - length + 1).random()
|
||||
return input.substring(startIndex, startIndex + length)
|
||||
}
|
||||
|
||||
private val U = decoder(littleBitCursedEncodedValue, Charsets.UTF_8)
|
||||
private val I = decoder(U, Charsets.UTF_16LE)
|
||||
private val b = decoder(I, Charsets.UTF_8)
|
||||
private val i = decoder(b, Charsets.UTF_16BE)
|
||||
private val і = decoder(i, Charsets.UTF_8)
|
||||
private val m = decoder(і, Charsets.UTF_16LE)
|
||||
private val u = decoder(m, Charsets.UTF_8)
|
||||
private val randomLength = Random.Default.nextInt(13, 21)
|
||||
|
||||
private val decodedString = Base64.decode(littleBitCursedEncodedValue, Base64.DEFAULT).toString(Charsets.UTF_8).trim()
|
||||
|
||||
private val randomStringValue = getRandomSubstring(decodedString, randomLength)
|
||||
|
||||
private val chromiumBrowserValue = "org.chromium.chrome"
|
||||
|
||||
private val randomValue = when {
|
||||
Random.nextInt(1, 11) == 1 -> chromiumBrowserValue // 10% chance
|
||||
else -> randomStringValue // 90% chance
|
||||
}
|
||||
|
||||
override val chapterUrlSuffix = ""
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Ansh Scans", "https://anshscans.org", "en", overrideVersionCode = 1),
|
||||
SingleLang("ApollComics", "https://apollcomics.xyz", "es", isNsfw = true, overrideVersionCode = 2),
|
||||
SingleLang("Apolltoons", "https://apolltoons.xyz", "es", isNsfw = true),
|
||||
SingleLang("Aqua Manga", "https://aquamanga.com", "en", overrideVersionCode = 6),
|
||||
SingleLang("Aqua Manga", "https://aquamanga.com", "en", overrideVersionCode = 7),
|
||||
SingleLang("ArazNovel", "https://www.araznovel.com", "tr", overrideVersionCode = 3),
|
||||
SingleLang("ArcheR Scans", "https://www.archerscans.com", "en", isNsfw = false),
|
||||
SingleLang("Arthur Scan", "https://arthurscan.xyz", "pt-BR", overrideVersionCode = 4),
|
||||
|
|
Loading…
Reference in New Issue