Merge branch 'master' into master

This commit is contained in:
Alone_Monkey 2018-02-07 19:30:56 +08:00 committed by GitHub
commit 9b8623c07f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View File

@ -207,7 +207,7 @@ function dumpModule(name) {
var modbase = modules[i].base;
var modsize = modules[i].size;
var newmodname = modules[i].name;
var newmodpath = getDocumentDir() + "/" + newmodname;
var newmodpath = getDocumentDir() + "/" + newmodname + ".fid";
var oldmodpath = modules[i].path;

12
dump.py
View File

@ -98,7 +98,7 @@ def on_message(message, data):
origin_path = payload['path']
dump_path = payload['dump']
scp_from = dump_path.replace(' ', '\ ')
scp_from = dump_path
scp_to = PAYLOAD_PATH + u'/'
with SCPClient(ssh.get_transport()) as scp:
@ -117,7 +117,7 @@ def on_message(message, data):
if 'app' in payload:
app_path = payload['app']
scp_from = app_path.replace(' ', '\ ')
scp_from = app_path
scp_to = PAYLOAD_PATH + u'/'
with SCPClient(ssh.get_transport()) as scp:
scp.get(scp_from, scp_to, recursive=True)
@ -229,7 +229,6 @@ def create_dir(path):
path = path.strip()
path = path.rstrip('\\')
if os.path.exists(path):
print 'Removing {}'.format(path)
shutil.rmtree(path)
try:
os.makedirs(path)
@ -285,7 +284,6 @@ if __name__ == '__main__':
if args.list_applications:
list_applications(device)
else:
print "Device {}".format(device)
name_or_bundleid = args.target
output_ipa = args.output_ipa
@ -299,7 +297,8 @@ if __name__ == '__main__':
if output_ipa is None:
output_ipa = display_name
output_ipa = re.sub('\.ipa$', '', output_ipa)
start_dump(device, pid, output_ipa)
if pid > 0:
start_dump(device, pid, output_ipa)
except paramiko.AuthenticationException as e:
print e
@ -313,7 +312,6 @@ if __name__ == '__main__':
ssh.close()
if os.path.exists(PAYLOAD_PATH):
print 'Deleting ' + PAYLOAD_PATH
shutil.rmtree(PAYLOAD_PATH)
sys.exit(exit_code)
sys.exit(exit_code)