Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
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
#!/usr/bin/env python
import archr
import sys
with archr.targets.DockerImageTarget(sys.argv[1]).build().start() as t:
print("target remote %s:1337" % t.ipv4_address)
g = archr.arsenal.GDBServerBow(t)
g.fire(stdout=1, stderr=2, port=1337, timeout=None)