def attach(self): ls_kernel.ptrace(PT_ATTACHEXC, self.pid, 0, 0) self.task().attach()
def clear_signals(self): print "[*] Clearing POSIX signals on thread %d..." % self.port thread_port_struct = mach_port_t(self.port) ls_kernel.ptrace(PT_THUPDATE, self.task.process.pid, thread_port_struct, 0)