Advertisement
Nitorita

Untitled

Jun 24th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. In Nox, open up Tools > File Manager, and then navigate to:
  2.  
  3. storage / emulated / 0 / MangaBox / .data / ep
  4.  
  5. and fetch the latest folder cached by the app by opening the folder, selecting all the webp images (by clicking the three dots at the top and doing Select All), and then navigating and copying the selected files here:
  6.  
  7. mnt / shared / image
  8.  
  9. (You will need root Nox access, so to enable that, you click the gear at the very top of the Nox window and enable it. Then when you try to access that folder above, it'll ask you to confirm root access.)
  10.  
  11. After doing that, click the monitor icon on the right side of Nox, and open the PC folder for Image files. You'll find all the downloaded webp images there.
  12.  
  13. Afterwards, you need to decrypt them, so make sure you have Python installed, and drag and drop the webp images onto the MangaBox.py file (far below is the code). Then, you just need to convert them back to PNG.
  14.  
  15. To batch it, run a BAT file from the same directory with this in the code:
  16.  
  17. for %%a in (*.webp) do (MangaBox.py %%a)
  18.  
  19.  
  20.  
  21.  
  22.  
  23. #!/usr/bin/python
  24.  
  25. import sys
  26. from pathlib import Path
  27. from functools import partial
  28. from io import DEFAULT_BUFFER_SIZE
  29.  
  30. def byteIterator(path):
  31. path = Path(path)
  32. with path.open('rb') as f:
  33. reader = partial(f.read1, DEFAULT_BUFFER_SIZE)
  34. iterator = iter(reader, bytes())
  35. for chunk in iterator:
  36. for byte in chunk:
  37. yield byte
  38.  
  39. if len(sys.argv) == 2:
  40. target = sys.argv[1]
  41. targetBytes = list(byteIterator(target))
  42. keyByte = targetBytes[0] ^ 0x52
  43. for i in range(0, len(targetBytes)):
  44. targetBytes[i] = targetBytes[i] ^ keyByte
  45. outPath = Path(f'{Path(target).stem}_decoded.webp')
  46. outPath.write_bytes(bytes(targetBytes))
  47. else:
  48. print(f'Usage: {sys.argv[0]} target_file')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement