Added opt delay to file_dropper

unstable
Meatballs 2013-04-25 18:11:45 +01:00
parent 2c41ca6598
commit 78c9e9a203
1 changed files with 15 additions and 0 deletions

View File

@ -3,6 +3,15 @@
module Msf
module Exploit::FileDropper
def initialize(info = {})
super
register_advanced_options(
[
OptInt.new( 'FileDropperDelay', [ false, 'Time, in s, to wait before attempting file cleanup' ])
], self.class)
end
#
# When a new session is created, attempt to delete any files that the
# exploit created.
@ -88,6 +97,12 @@ module Exploit::FileDropper
end
if respond_to?(:file_rm)
delay = datastore['FileDropperDelay']
if delay
print_status("Waiting #{delay}s before file cleanup...")
select(nil,nil,nil,delay)
end
@dropped_files.delete_if do |file|
begin
file_rm(file)