Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _call(s):
try:
args = s.split()
module, command = args[0].split(".")
except:
# exit slently, this is not for us
return Pimp.CMD_NOT_HANDLED
try:
if module == "pimp":
self.handle(command, args[1:])
for r in self.triton_regs:
self.r2p.set_flag("regs", r, self.triton_regs[r].getSize(), triton.getConcreteRegisterValue(self.triton_regs[r]) )
return Pimp.CMD_HANDLED
# not for us
return Pimp.CMD_NOT_HANDLED
except Exception as e:
# this is an actual pimp error.
print e
return Pimp.CMD_HANDLED
def get_current_pc(self):
return triton.getConcreteRegisterValue(self.pcreg)