-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathad.py
34 lines (29 loc) · 858 Bytes
/
ad.py
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
import sys
import os
from androguard.misc import AnalyzeAPK
def analyze_app(apk_path):
a, _, dx = AnalyzeAPK(apk_path)
# 获取类列表
target_cls = ''
for cls in dx.get_classes():
if cls.name.lower().find('securitycipher') > -1:
print("found target " + cls.name)
target_cls = cls.name
break
a, _, dx = AnalyzeAPK('classes15.zip')
for cls in dx.get_classes():
if cls.name.lower().find('securitycipher') > -1:
print("found target " + cls.name)
break
for s in dx.get_strings():
if s.get_value().lower().find('securitycipher') > -1:
print("found target " + cls.name)
break
print(s.get_orig_value())
break
if __name__ == "__main__":
app = ""
if len(sys.argv) > 1:
app = sys.argv[1]
print(f"分析apk {app}")
analyze_app(app)