CopyManga: Fix missing decrypt password (#9193)
* CopyManga: Allow passing in null for decrypt password. When we end up with a decrypt password of null (that is, there is no manga- specific decryption password), fall back to the default password. Previously, we ended up passing in null instead of a default password. Also update the default password. Fixes #9114 * CopyManga: bump extVersionCode.
This commit is contained in:
parent
e9a29618d7
commit
f26a96c95f
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'CopyManga'
|
||||
pkgNameSuffix = 'zh.copymanga'
|
||||
extClass = '.CopyManga'
|
||||
extVersionCode = 15
|
||||
extVersionCode = 16
|
||||
}
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
||||
|
|
|
@ -449,10 +449,10 @@ class CopyManga : ConfigurableSource, HttpSource() {
|
|||
}
|
||||
|
||||
// thanks to unpacker toolsite, http://matthewfl.com/unPacker.html
|
||||
private fun decryptChapterData(disposableData: String, disposablePass: String? = "hotmanga.aes.key"): String {
|
||||
private fun decryptChapterData(disposableData: String, disposablePass: String?): String {
|
||||
val prePart = disposableData.substring(0, 16)
|
||||
val postPart = disposableData.substring(16, disposableData.length)
|
||||
val disposablePassByteArray = disposablePass?.toByteArray(Charsets.UTF_8)
|
||||
val disposablePassByteArray = (disposablePass ?: "xxxmanga.abc.key").toByteArray(Charsets.UTF_8)
|
||||
val prepartByteArray = prePart.toByteArray(Charsets.UTF_8)
|
||||
val dataByteArray = hexStringToByteArray(postPart)
|
||||
|
||||
|
|
Loading…
Reference in New Issue