def callafter(self, pid, call, result, state): subcall, handle, handle2, info = state scratch.free(handle) if handle2 != -1: scratch.free(handle2) if subcall == 'socket' and result >= 0: try: self.fdmap[pid][result] = info except: self.fdmap[pid] = {} self.fdmap[pid][result] = info
def callafter(self, pid, call, result, state): "don't let program see that we wrote extra bytes" handle , addr = scratch.alloc_str(disclaimer) # FIXME: I really should not hardcode call numbers like this p_linux_i386.force_syscall(pid, 4, state, addr, len(disclaimer)) scratch.free(handle)
def callafter(self, pid, call, result, state): for i in range(6): if state[i] != -1: scratch.free(state[i])