83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
# File 'lib/ragweed/trampoline.rb', line 83
def go
mem = @a.alloc(1024)
base = @p.ptr(mem)
data = base + 512
swch = ["OpenProcess",
"DuplicateHandle",
"ResetEvent",
"SetEvent",
"WaitForSingleObject"].
map {|x| @p.get_proc("kernel32!#{x}").to_i}.
pack("LLLLL")
state = [Ragweed::Wrap32::get_current_process_id, @ev1.handle, @ev2.handle].
pack("LLL")
data.write(swch + state)
base.write(event_pair_stub(:debug => false).assemble)
Ragweed::Wrap32::create_remote_thread(@p.handle, base, data)
@ev1.wait
@ev2
end
|