Spaces:
Running
Running
vrkforever
commited on
Commit
•
1d65809
1
Parent(s):
f606f69
Update app.py
Browse files
app.py
CHANGED
@@ -11,33 +11,33 @@ def extract_apk_info(apk_file):
|
|
11 |
try:
|
12 |
# Create a temporary file
|
13 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".apk") as temp_apk:
|
14 |
-
# Write the content directly
|
15 |
-
temp_apk.write(apk_file.
|
16 |
temp_apk_path = temp_apk.name
|
17 |
|
18 |
a, d, dx = AnalyzeAPK(temp_apk_path)
|
19 |
-
|
20 |
output = []
|
21 |
output.append(f"Package: {a.get_package()}")
|
22 |
output.append(f"Version: {a.get_androidversion_name()}")
|
23 |
output.append(f"Main Activity: {a.get_main_activity()}")
|
24 |
-
|
25 |
output.append("\nPermissions:")
|
26 |
for permission in a.get_permissions():
|
27 |
output.append(f"- {permission}")
|
28 |
-
|
29 |
output.append("\nActivities:")
|
30 |
for activity in a.get_activities():
|
31 |
output.append(f"- {activity}")
|
32 |
-
|
33 |
output.append("\nServices:")
|
34 |
for service in a.get_services():
|
35 |
output.append(f"- {service}")
|
36 |
-
|
37 |
output.append("\nReceivers:")
|
38 |
for receiver in a.get_receivers():
|
39 |
output.append(f"- {receiver}")
|
40 |
-
|
41 |
output.append("\nProviders:")
|
42 |
for provider in a.get_providers():
|
43 |
output.append(f"- {provider}")
|
|
|
11 |
try:
|
12 |
# Create a temporary file
|
13 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".apk") as temp_apk:
|
14 |
+
# Write the content directly as binary data
|
15 |
+
temp_apk.write(apk_file.read()) # Read the uploaded file content
|
16 |
temp_apk_path = temp_apk.name
|
17 |
|
18 |
a, d, dx = AnalyzeAPK(temp_apk_path)
|
19 |
+
|
20 |
output = []
|
21 |
output.append(f"Package: {a.get_package()}")
|
22 |
output.append(f"Version: {a.get_androidversion_name()}")
|
23 |
output.append(f"Main Activity: {a.get_main_activity()}")
|
24 |
+
|
25 |
output.append("\nPermissions:")
|
26 |
for permission in a.get_permissions():
|
27 |
output.append(f"- {permission}")
|
28 |
+
|
29 |
output.append("\nActivities:")
|
30 |
for activity in a.get_activities():
|
31 |
output.append(f"- {activity}")
|
32 |
+
|
33 |
output.append("\nServices:")
|
34 |
for service in a.get_services():
|
35 |
output.append(f"- {service}")
|
36 |
+
|
37 |
output.append("\nReceivers:")
|
38 |
for receiver in a.get_receivers():
|
39 |
output.append(f"- {receiver}")
|
40 |
+
|
41 |
output.append("\nProviders:")
|
42 |
for provider in a.get_providers():
|
43 |
output.append(f"- {provider}")
|