check to ensure that the step is valid as it will be normalized

git-svn-id: file:///home/svn/framework3/trunk@4525 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Matt Miller 2007-03-12 00:35:02 +00:00
parent b51b213536
commit 449ca3c826
1 changed files with 4 additions and 5 deletions

View File

@ -23,9 +23,8 @@ module Exploit::Brute
#
register_advanced_options(
[
OptInt.new('BruteWait', [ false, "Delay between brute force attempts" ])
# This is still broken :(
# OptInt.new('BruteStep', [ false, "Step size between brute force attempts" ])
OptInt.new('BruteWait', [ false, "Delay between brute force attempts" ]),
OptInt.new('BruteStep', [ false, "Step size between brute force attempts" ])
], Msf::Exploit::Brute)
end
@ -71,12 +70,12 @@ module Exploit::Brute
import_from_datastore(stop, 'Stop')
# User-defined brute wait?
if (self.datastore['BruteWait'])
if self.datastore['BruteWait'] and self.datastore['BruteWait'] > 0
delay = self.datastore['BruteWait'].to_i
end
# User-defined brute step?
if (self.datastore['BruteStep'])
if self.datastore['BruteStep'] and self.datastore['BruteStep'] > 0
step = self.datastore['BruteStep'].to_i
end