From 018c6c51713973c9dac7fe16015bc34c2678afd5 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 18 Aug 2010 16:01:00 +0000 Subject: [PATCH] Remove the brute.emptypass script argument. We already include the empty password in our password list. If you want to turn it off, it would be better to provide an interface that allows an iterator to throw out certain passwords. --- nselib/brute.lua | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/nselib/brute.lua b/nselib/brute.lua index 03fdd8e32..3ee0da963 100644 --- a/nselib/brute.lua +++ b/nselib/brute.lua @@ -101,7 +101,6 @@ -- @author "Patrik Karlsson " -- -- --- @args brute.emptypass guess an empty password for each user (default: true) -- @args brute.useraspass guess the username as password for each user -- (default: true) -- @args brute.unique make sure that each password is only guessed once @@ -143,7 +142,6 @@ Options = { local o = {} setmetatable(o, self) self.__index = self - o.empty_password = self.checkBoolArg("brute.emptypass", true) o.user_as_password = self.checkBoolArg("brute.useraspass", true) o.check_unique = self.checkBoolArg("brute.unique", true) o.firstonly = self.checkBoolArg("brute.firstonly", false) @@ -612,20 +610,6 @@ Engine = local function next_password_username () local tested_creds = {} - -- should we check for empty passwords? - if ( self.options.empty_password ) then - for username in usernames do - if ( not(tested_creds[username]) ) then - tested_creds[username] = {} - end - tested_creds[username][""] = true - if ( not(self.found_accounts) or not(self.found_accounts[username]) ) then - coroutine.yield(username, "") - end - end - end - usernames("reset") - -- should we check for same password as username if ( self.options.user_as_password ) then for username in usernames do @@ -674,14 +658,6 @@ Engine = -- set's up a table to track tested credentials tested_creds[username] = {} - -- should we check for empty passwords? - if ( self.options.empty_password ) then - tested_creds[username][""] = true - if ( not(self.found_accounts) or not(self.found_accounts[username]) ) then - coroutine.yield(username, "") - end - end - -- should we check for same password as username if ( self.options.user_as_password and not(self.options.passonly) ) then tested_creds[username][username:lower()] = true