-
-
[推荐]分析这个apk文件,并显示其所有信息,所有方法,保存在一个文件中
-
发表于: 2024-1-27 11:34 2860
-
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #分析这个apk文件,并显示其所有方法,save it in a file from androguard.core.bytecodes.apk import APK from androguard.core.bytecodes.dvm import DalvikVMFormat from androguard.core.analysis import analysis from androguard.core.bytecodes.dvm import DalvikVMFormat from androguard.core.analysis import analysis def get_permissions(apk_path): apk = APK(apk_path) permissions = apk.get_permissions() for permission in permissions: print (permission) return permissions def get_methods(apk_path): apk = APK(apk_path) vm = DalvikVMFormat(apk.get_dex()) # vmx = analysis.VMAnalysis(vm) vmx = analysis.Analysis(vm) for method in vm.get_methods(): print (method.get_class_name(), method.get_name(), method.get_descriptor()) return vm.get_methods() if __name__ = = '__main__' : f = open ( '1.txt' , 'w' ) f.write( "\n" .join( str (item) for item in get_permissions( "/home/kali/code/python/2.apk" ))) f.write( "\n" .join( str (item) for item in get_methods( "/home/kali/code/python/2.apk" ))) f.close() |
赞赏
看原图
赞赏
雪币:
留言: