Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def do_gdb(self, t):
with archr.arsenal.GDBServerBow(t).fire_context(port=31337) as gbf:
gc = pygdbmi.gdbcontroller.GdbController()
gc.write("target remote %s:%d" % (t.ipv4_address, 31337))
gc.write("continue")
gc.exit()
return gbf.process
def gdb_do(self, t):
with archr.arsenal.GDBServerBow(t).fire_context(port=31337) as gbf:
gc = pygdbmi.gdbcontroller.GdbController()
gc.write("target remote %s:%d" % (t.ipv4_address, 31337))
gc.write("continue")
gc.exit()
return gbf.process
verbose=False):
self._async_message_handler = async_message_handler
self._arch = arch
self._register_mapping = dict(arch.registers)
gdb_args = []
if not enable_init_files:
gdb_args += ['--nx']
gdb_args += ['--quiet', '--interpreter=mi2']
gdb_args += additional_args
if binary is not None:
gdb_args += ['--args', binary]
if local_arguments is not None:
gdb_args += [local_arguments]
self._gdbmi = pygdbmi.gdbcontroller.GdbController(
gdb_path=gdb_executable,
gdb_args=gdb_args,
verbose=verbose) # set to True for debugging
queue = avatar.queue if avatar is not None else None
fast_queue = avatar.fast_queue if avatar is not None else None
self._communicator = GDBResponseListener(
self, self._gdbmi, queue, fast_queue, origin)
self._communicator.daemon = True
self._communicator.start()
self._origin = origin
self.log = logging.getLogger('%s.%s' %
(origin.log.name, self.__class__.__name__)
) if origin else \
logging.getLogger(self.__class__.__name__)