-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
The Mixins::BuildDir mixin creates a temporary build directory in perform_build, then calls build, but only deletes the directory later in perform_cleanup. The ronin-payloads build command does not call @payload.perform_cleanup after calling @payload.perform_build, thus the temporary build directories never get deleted.
Mixins::BuildDir#perform_build should delete the build directory after calling super:
@build_dir = Dir.mktmpdir("ronin-payloads-#{payload_name}-")
super
FileUtils.rm_r(@build_dir)
@build_dir = nilOr call Dir.mktmpdir with a block and let Dir.mktmpdir automatically delete the temporary directory:
Dir.mktmpdir("ronin-payloads-#{payload_name}-") do |dir|
@build_dir = dir
super
@build_dir = nil
endReactions are currently unavailable