import json import struct class FixRet(gdb.Breakpoint): def stop(self): print("[SkpsIsProcessDebuggingEnabled] Exit - Fix RAX") gdb.execute("set $rax = 1", to_string=True) # `self.delete` results in a gdb crash self.disable = True return False class EnterProcessDebug(gdb.Breakpoint): def stop(self): print("[SkpsIsProcessDebuggingEnabled] Enter") rsp = int(gdb.parse_and_eval("$rsp")) & 0xFFFFFFFFFFFFFFFF inf = gdb.inferiors()[0] ret_addr = struct.unpack("