From 449ca3c8264d05dc76149adf5b38895585239476 Mon Sep 17 00:00:00 2001 From: Matt Miller Date: Mon, 12 Mar 2007 00:35:02 +0000 Subject: [PATCH] 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 --- lib/msf/core/exploit/brute.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/msf/core/exploit/brute.rb b/lib/msf/core/exploit/brute.rb index 12e31a9fd5..dfe384e06a 100644 --- a/lib/msf/core/exploit/brute.rb +++ b/lib/msf/core/exploit/brute.rb @@ -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