Force option validation in exploit_simple for e & p

unstable
HD Moore 2012-03-12 22:57:23 -05:00
parent 1cf25e58d5
commit be6a64b3f7
1 changed files with 7 additions and 1 deletions

View File

@ -72,13 +72,16 @@ module Exploit
"You must specify a payload.", caller
end
# Verify the options
exploit.options.validate(exploit.datastore)
# Start it up
driver = ExploitDriver.new(exploit.framework)
# Initialize the driver instance
driver.exploit = exploit
driver.payload = exploit.framework.modules.create(opts['Payload'])
# Set the force wait for session flag if the caller requested force
# blocking. This is so that passive exploits can be blocked on from
# things like the cli.
@ -98,6 +101,9 @@ module Exploit
# Force the payload to share the exploit's datastore
driver.payload.share_datastore(driver.exploit.datastore)
# Verify the payload options
driver.payload.options.validate(driver.payload.datastore)
# If we still have no target index, try to use the datastore's index
target_idx = opts['Target'] || exploit.default_target