Added opt delay to file_dropper
parent
bf0375f0e9
commit
b58a775af5
|
@ -3,6 +3,15 @@
|
||||||
module Msf
|
module Msf
|
||||||
module Exploit::FileDropper
|
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
|
# When a new session is created, attempt to delete any files that the
|
||||||
# exploit created.
|
# exploit created.
|
||||||
|
@ -88,6 +97,12 @@ module Exploit::FileDropper
|
||||||
end
|
end
|
||||||
|
|
||||||
if respond_to?(:file_rm)
|
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|
|
@dropped_files.delete_if do |file|
|
||||||
begin
|
begin
|
||||||
file_rm(file)
|
file_rm(file)
|
||||||
|
|
Loading…
Reference in New Issue