small fix for aes_cbc_decrypt_text

This commit is contained in:
Mike Fährmann
2017-06-30 15:21:04 +02:00
parent 21064146c1
commit 4414aefe97
2 changed files with 2 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ def aes_cbc_decrypt_text(data, key, iv):
data = base64.standard_b64decode(bytes(data, "ascii"))
charcodes = aes_cbc_decrypt(list(data), key, iv)
last = charcodes[-1]
if last < 16:
if last <= 16:
charcodes = charcodes[:-last]
return bytes(charcodes).decode()

View File

@@ -17,7 +17,7 @@ class DokireaderChapterExtractor(foolslide.FoolslideChapterExtractor):
pattern = foolslide.chapter_pattern(r"kobato\.hologfx\.com/reader")
test = [(("https://kobato.hologfx.com/reader/read/"
"hitoribocchi_no_oo_seikatsu/en/3/34"), {
"keyword": "f28811c01b64031671108a4a3d6eea1040816b82",
"keyword": "1dc1ec8264df4126552dbe53f42c5643fd2a4cf3",
})]