parent
a2213a3c1c
commit
9b466d93bf
|
@ -88,6 +88,7 @@ module CommandDispatcher
|
|||
return if ele.count('-') > 1
|
||||
return if ele.first == '-' || ele[-1] == '-'
|
||||
return if ele.first == '.' || ele[-1] == '.'
|
||||
return unless ele =~ (/^(\d)+$/) # Not a number
|
||||
|
||||
if ele.include? '-'
|
||||
temp_array = (ele.split("-").inject { |s, e| s.to_i..e.to_i }).to_a
|
||||
|
|
|
@ -209,10 +209,13 @@ module Msf
|
|||
persist_list = []
|
||||
end
|
||||
|
||||
# Remove persistence by job id.
|
||||
job_list.map(&:to_s).each do |job|
|
||||
next unless framework.jobs[job.to_s].ctx[1] # next if no payload context in the job
|
||||
payload_option = framework.jobs[job.to_s].ctx[1].datastore
|
||||
persist_list.delete_if{|pjob|pjob['mod_options']['Options'] == payload_option}
|
||||
if framework.jobs.key?(job)
|
||||
next unless framework.jobs[job.to_s].ctx[1] # next if no payload context in the job
|
||||
payload_option = framework.jobs[job.to_s].ctx[1].datastore
|
||||
persist_list.delete_if{|pjob|pjob['mod_options']['Options'] == payload_option}
|
||||
end
|
||||
end
|
||||
# Write persist job back to config file.
|
||||
File.open(Msf::Config.persist_file,"w") do |file|
|
||||
|
|
Loading…
Reference in New Issue