Skip to content

Instantly share code, notes, and snippets.

@yuyosy
Last active February 24, 2021 16:06
Show Gist options
  • Save yuyosy/6bec47e05412246fb09867cb33fc4ed6 to your computer and use it in GitHub Desktop.
Save yuyosy/6bec47e05412246fb09867cb33fc4ed6 to your computer and use it in GitHub Desktop.
import base64
import os
import sys
def basestr_to_file(s, outfile_path):
with open(outfile_path, "wb") as f:
f.write(base64.b85decode(s))
if __name__ == "__main__":
args = sys.argv
path = input('Path> ') if len(args) == 1 else args[1]
with open(path, mode='rb') as f:
data = f.read()
basestr_to_file(data, os.path.join(os.path.dirname(path), 'get.zip'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment