This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zipfile | |
import os | |
import stat | |
def extract_file(zf, info, extract_dir): | |
out_path = os.path.join(extract_dir, info.filename) | |
perm = info.external_attr >> 16 | |
if (stat.S_ISLNK(perm)): | |
src = zf.open(info).read() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import sys | |
import time | |
import zipfile | |
startingdir = os.getcwd() | |
if (len(sys.argv) == 1): | |
print("Usage: " + os.path.basename(sys.argv[0]) + " path/to/application.app [path/to/output.zip]") |