MCPcopy Create free account
hub / github.com/HexHive/NASS / setup_script

Method setup_script

fuzz/orchestrate.py:180–200  ·  view source on GitHub ↗
(self, script_path, on_message_func)

Source from the content-addressed store, hash-verified

178 return md5 == self.service.onTransact.md5
179
180 def setup_script(self, script_path, on_message_func):
181 self.setup_frida()
182 while 1:
183 try:
184 self.process = self.device.attach(self.service.pid)
185 self.script = self.process.create_script(
186 open(script_path).read()
187 )
188 self.script.on("message", on_message_func)
189 self.frida_injected = True
190 break
191 except frida.NotSupportedError:
192 self.orchestrate_log(
193 "service is in fucked state.. killing service"
194 )
195 adb.kill_service(
196 self.service.service_name, device_id=self.device_id,
197 timeout=5
198 )
199 adb.kill_frida(device_id=self.device_id, timeout=5)
200 time.sleep(10)
201
202 def on_message(self, message, data):
203 logging.debug(f"message received: {message}")

Callers 4

fuzzer_iterationMethod · 0.95
orchestrate.pyFile · 0.45
refine_replay_seedMethod · 0.45
drcov_replay_seedMethod · 0.45

Calls 3

setup_fridaMethod · 0.95
orchestrate_logMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected