赞
踩
#-*-conding:utf-8-*- import os from androguard.misc import AnalyzeAPK from androguard.core.bytecodes.apk import APK from androguard.core.bytecodes.dvm import DalvikVMFormat from androguard.core.analysis.analysis import Analysis path = r"/media/gsm/SeagateExp_1TB/androguard/test/apk/2012" out_path = r"/media/gsm/SeagateExp_1TB/androguard/test/perm/2012" files = [] for name in os.listdir(path): if os.path.isfile(os.path.join(path, name)): files.append(name) # print(files) files.sort() def main(): for apk in files: print(apk) a, d, dx = AnalyzeAPK(path + '/'+ apk) apk_name = os.path.splitext(apk)[0] # 获取申请权限 with open(os.path.join(out_path, apk_name + ".txt"), 'w', encoding='utf-8') as f: for i in a.get_permissions(): f.write(str(i) + '\n') f.close() print("end"+apk) if __name__=='__main__': main()
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。