Skip to content

Instantly share code, notes, and snippets.

@CatTail
Created April 11, 2016 03:17
Show Gist options
  • Save CatTail/15aa5cea176a68187d41498ce0df1a1a to your computer and use it in GitHub Desktop.
Save CatTail/15aa5cea176a68187d41498ce0df1a1a to your computer and use it in GitHub Desktop.
Decode(encode) don't starve saved file
# see http://forums.kleientertainment.com/topic/33321-how-to-get-decoded-save-game-files/
from base64 import b64decode
from sys import argv
from os import path
if __name__ == '__main__':
if len(argv)>1:
try: open(path.join(path.dirname(path.realpath(argv[0])),'my_output_file.txt'),'w').write(b64decode(open(argv[1], 'rb').read()[11:])[16:].decode('zlib'))
except Exception, e: print(e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment