Skip to content

Instantly share code, notes, and snippets.

@yukixz
Last active January 22, 2017 17:40
Show Gist options
  • Save yukixz/eb8c7a87b0f59ff540a7 to your computer and use it in GitHub Desktop.
Save yukixz/eb8c7a87b0f59ff540a7 to your computer and use it in GitHub Desktop.
Decode kancolle's Core.swf.
#!/usr/bin/env python3
import sys
ORDER = [0, 7, 2, 5, 4, 3, 6, 1]
SRC = sys.argv[1]
DEST = sys.argv[2]
with open(SRC, "rb") as f:
org = f.read()
with open(DEST, "wb") as dec:
size = (len(org) - 128) >> 3
dec.write(org[0:128])
for i in ORDER:
dec.write(org[ i*size+128 : (i+1)*size+128 ])
@AtarisMio
Copy link

mainD2.swf不就能直接decode么?

@yukixz
Copy link
Author

yukixz commented Mar 28, 2016

@atrismio mainD2 的 decode 算法混淆的妈都不认识了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment