AndroidFridaManager 1.8.2__py3-none-any.whl → 1.8.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- AndroidFridaManager/FridaManager.py +34 -6
- AndroidFridaManager/about.py +1 -1
- {androidfridamanager-1.8.2.dist-info → androidfridamanager-1.8.3.dist-info}/METADATA +2 -2
- androidfridamanager-1.8.3.dist-info/RECORD +11 -0
- androidfridamanager-1.8.2.dist-info/RECORD +0 -11
- {androidfridamanager-1.8.2.dist-info → androidfridamanager-1.8.3.dist-info}/WHEEL +0 -0
- {androidfridamanager-1.8.2.dist-info → androidfridamanager-1.8.3.dist-info}/entry_points.txt +0 -0
- {androidfridamanager-1.8.2.dist-info → androidfridamanager-1.8.3.dist-info}/licenses/LICENSE +0 -0
- {androidfridamanager-1.8.2.dist-info → androidfridamanager-1.8.3.dist-info}/top_level.txt +0 -0
|
@@ -91,22 +91,50 @@ class FridaManager():
|
|
|
91
91
|
else:
|
|
92
92
|
command = "adb shell su 0 "+ cmd
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
try:
|
|
95
|
+
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|
96
|
+
# Give it a moment to start and potentially fail
|
|
97
|
+
import time
|
|
98
|
+
time.sleep(1)
|
|
99
|
+
|
|
100
|
+
# Check if process failed immediately
|
|
101
|
+
if process.poll() is not None:
|
|
102
|
+
stdout, stderr = process.communicate()
|
|
103
|
+
if "Address already in use" in stderr.decode():
|
|
104
|
+
print("[*] frida-server is already running on the device")
|
|
105
|
+
return
|
|
106
|
+
else:
|
|
107
|
+
self.logger.error(f"Failed to start frida-server: {stderr.decode()}")
|
|
108
|
+
raise RuntimeError(f"Failed to start frida-server: {stderr.decode()}")
|
|
109
|
+
except Exception as e:
|
|
110
|
+
self.logger.error(f"Error starting frida-server: {e}")
|
|
111
|
+
raise
|
|
95
112
|
|
|
96
113
|
|
|
97
114
|
def is_frida_server_running(self):
|
|
98
115
|
"""
|
|
99
116
|
Checks if on the connected device a frida server is running.
|
|
100
|
-
The test is done by
|
|
117
|
+
The test is done by trying multiple methods to detect the frida-server process.
|
|
101
118
|
|
|
102
119
|
:return: True if a frida-server is running otherwise False.
|
|
103
120
|
:rtype: bool
|
|
104
121
|
"""
|
|
105
|
-
|
|
106
|
-
|
|
122
|
+
# Try pidof first (most reliable if available)
|
|
123
|
+
result = self.run_adb_command_as_root("pidof frida-server")
|
|
124
|
+
if result.stdout.strip():
|
|
107
125
|
return True
|
|
108
|
-
|
|
109
|
-
|
|
126
|
+
|
|
127
|
+
# Fallback to ps grep if pidof doesn't work
|
|
128
|
+
result = self.run_adb_command_as_root("ps | grep frida-server | grep -v grep")
|
|
129
|
+
if result.stdout.strip():
|
|
130
|
+
return True
|
|
131
|
+
|
|
132
|
+
# Try alternative ps command format
|
|
133
|
+
result = self.run_adb_command_as_root("ps -A | grep frida-server | grep -v grep")
|
|
134
|
+
if result.stdout.strip():
|
|
135
|
+
return True
|
|
136
|
+
|
|
137
|
+
return False
|
|
110
138
|
|
|
111
139
|
|
|
112
140
|
def stop_frida_server(self):
|
AndroidFridaManager/about.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: AndroidFridaManager
|
|
3
|
-
Version: 1.8.
|
|
3
|
+
Version: 1.8.3
|
|
4
4
|
Summary: A python API in order to install and run the frida-server on an Android device.
|
|
5
5
|
Home-page: https://github.com/fkie-cad/AndroidFridaManager
|
|
6
6
|
Author: Daniel Baier
|
|
@@ -33,7 +33,7 @@ Dynamic: requires-dist
|
|
|
33
33
|
Dynamic: requires-python
|
|
34
34
|
Dynamic: summary
|
|
35
35
|
|
|
36
|
-
[](https://badge.fury.io/py/AndroidFridaManager)
|
|
36
|
+
 [](https://badge.fury.io/py/AndroidFridaManager) [](https://github.com/fkie-cad/AndroidFridaManager/actions/workflows/publish-to-pypi.yml)
|
|
37
37
|
|
|
38
38
|
# AndroidFridaManager
|
|
39
39
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
AndroidFridaManager/FridaManager.py,sha256=kaOua90QoYCZYjE-PLv2jKNbjGsR049iSdguzpS7IOo,15108
|
|
2
|
+
AndroidFridaManager/__init__.py,sha256=T6AKtrGSLQ9M5bJoWDQcsRTJbSEbksdgrx3AAAdozRI,171
|
|
3
|
+
AndroidFridaManager/about.py,sha256=9PIAKC-I68GSVhurcOpqSExKNmRXqkqGHjeJ0eQtdIg,98
|
|
4
|
+
AndroidFridaManager/job.py,sha256=QTSNjdV7XqawSTV19HQt53aiwoT3UaQeQw2K4AWPxY8,3265
|
|
5
|
+
AndroidFridaManager/job_manager.py,sha256=icdNlfqorEM3XVw4h_83IcoupEFDlkzb29VhEZ6dxrQ,12294
|
|
6
|
+
androidfridamanager-1.8.3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
7
|
+
androidfridamanager-1.8.3.dist-info/METADATA,sha256=Juumzl4unTLH2Ee6M0ByzYEDGq7kWCES3YijRSt2htM,5141
|
|
8
|
+
androidfridamanager-1.8.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
+
androidfridamanager-1.8.3.dist-info/entry_points.txt,sha256=GmNngu2fDNCxUcquFRegBa7GWknPKG1jsM4lvWeyKnY,64
|
|
10
|
+
androidfridamanager-1.8.3.dist-info/top_level.txt,sha256=oH2lVMSRlghmt-_tVrOEUqvY462P9hd5Ktgp5-1qF3o,20
|
|
11
|
+
androidfridamanager-1.8.3.dist-info/RECORD,,
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
AndroidFridaManager/FridaManager.py,sha256=tuDTZQ9maNBkobw2-qJtWPM3bhUQZH7eKPXG5XAKPks,13837
|
|
2
|
-
AndroidFridaManager/__init__.py,sha256=T6AKtrGSLQ9M5bJoWDQcsRTJbSEbksdgrx3AAAdozRI,171
|
|
3
|
-
AndroidFridaManager/about.py,sha256=z1dlTh519qWYEK_J_iuyx6_2eEzRI_pdKsVpVgi_DLA,98
|
|
4
|
-
AndroidFridaManager/job.py,sha256=QTSNjdV7XqawSTV19HQt53aiwoT3UaQeQw2K4AWPxY8,3265
|
|
5
|
-
AndroidFridaManager/job_manager.py,sha256=icdNlfqorEM3XVw4h_83IcoupEFDlkzb29VhEZ6dxrQ,12294
|
|
6
|
-
androidfridamanager-1.8.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
7
|
-
androidfridamanager-1.8.2.dist-info/METADATA,sha256=serVQrmt0u7xH5F8wYqBQ1NOMMRqT4g_cvn5vnxT8mc,4886
|
|
8
|
-
androidfridamanager-1.8.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
-
androidfridamanager-1.8.2.dist-info/entry_points.txt,sha256=GmNngu2fDNCxUcquFRegBa7GWknPKG1jsM4lvWeyKnY,64
|
|
10
|
-
androidfridamanager-1.8.2.dist-info/top_level.txt,sha256=oH2lVMSRlghmt-_tVrOEUqvY462P9hd5Ktgp5-1qF3o,20
|
|
11
|
-
androidfridamanager-1.8.2.dist-info/RECORD,,
|
|
File without changes
|
{androidfridamanager-1.8.2.dist-info → androidfridamanager-1.8.3.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{androidfridamanager-1.8.2.dist-info → androidfridamanager-1.8.3.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|