Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions lib/msf/base/simple/auxiliary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ def self.job_run_proc(ctx, &block)
raise
end
rescue Msf::Auxiliary::Complete
mod.cleanup
return
rescue Msf::Auxiliary::Failed => e
mod.error = e
Expand All @@ -196,21 +195,18 @@ def self.job_run_proc(ctx, &block)
end
mod.fail_detail ||= e.to_s

mod.cleanup
return
rescue ::Timeout::Error => e
mod.error = e
mod.fail_reason = Msf::Module::Failure::TimeoutExpired
mod.fail_detail ||= e.to_s
mod.print_error("Auxiliary triggered a timeout exception")
mod.cleanup
return
rescue ::Interrupt => e
mod.error = e
mod.fail_reason = Msf::Module::Failure::UserInterrupt
mod.fail_detail ||= e.to_s
mod.print_error("Stopping running against current target...")
mod.cleanup
mod.print_status("Control-C again to force quit all targets.")
begin
Rex.sleep(0.5)
Expand All @@ -237,7 +233,6 @@ def self.job_run_proc(ctx, &block)
end

elog('Auxiliary failed', error: e)
mod.cleanup

end
return result
Expand Down
6 changes: 0 additions & 6 deletions lib/msf/base/simple/post.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,26 +112,21 @@ def self.job_run_proc(ctx)
mod.run
else
mod.print_error("Session not found")
mod.cleanup
return
end
rescue Msf::Post::Complete
mod.cleanup
return
rescue Msf::Post::Failed => e
mod.error = e
mod.print_error("Post aborted due to failure: #{e.message}")
mod.cleanup
return
rescue ::Timeout::Error => e
mod.error = e
mod.print_error("Post triggered a timeout exception")
mod.cleanup
return
rescue ::Interrupt => e
mod.error = e
mod.print_error("Post interrupted by the console user")
mod.cleanup
return
rescue ::Msf::OptionValidateError => e
mod.error = e
Expand All @@ -148,7 +143,6 @@ def self.job_run_proc(ctx)
end

elog('Post failed', error: e)
mod.cleanup

return
end
Expand Down
1 change: 0 additions & 1 deletion lib/msf/core/exploit_driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ def run
begin
job_run_proc(ctx)
rescue ::Interrupt
job_cleanup_proc(ctx)
raise $!
ensure
# For multi exploit targets.
Expand Down
Loading