Updated account status text in brute force password discovery scripts in an effort to make the reporting more consistent across all scripts. This will have an impact on any code that parses these values.

In the case of a few of these scripts the only thing that was updated was the example text as the scripts relied on the creds library which handles the strings internally.
This commit is contained in:
tomsellers 2011-09-11 12:13:13 +00:00
parent 1c92c03401
commit 035ae9e9b1
19 changed files with 77 additions and 68 deletions

View file

@ -9,8 +9,8 @@ Performs password guessing against PostgreSQL.
-- @output
-- 5432/tcp open pgsql
-- | pgsql-brute:
-- | root:<empty> => Login Correct
-- |_ test:test => Login Correct
-- | root:<empty> => Valid credentials
-- |_ test:test => Valid credentials
--
-- @args pgsql.nossl If set to <code>1</code> or <code>true</code>, disables SSL.
-- @args pgsql.version Force protocol version 2 or 3.
@ -31,11 +31,12 @@ require 'stdnse'
require 'unpwdb'
stdnse.silent_require 'openssl'
-- Version 0.3
-- Version 0.4
-- Created 01/15/2010 - v0.1 - created by Patrik Karlsson <patrik@cqure.net>
-- Revised 02/20/2010 - v0.2 - moved version detection to pgsql library
-- Revised 03/04/2010 - v0.3 - added code from ssh-hostkey.nse to check for SSL support
-- - added support for trusted authentication method
-- Revised 09/10/2011 - v0.4 - changed account status text to be more consistent with other *-brute scripts
portrule = shortport.port_or_service(5432, "postgresql")
@ -139,7 +140,7 @@ action = function( host, port )
end
nmap.registry.pgsqlusers[username]=password
if ( response.authtype ~= pgsql.AuthenticationType.Success ) then
table.insert( valid_accounts, string.format("%s:%s => Login Correct", username, password:len()>0 and password or "<empty>" ) )
table.insert( valid_accounts, string.format("%s:%s => Valid credentials", username, password:len()>0 and password or "<empty>" ) )
else
table.insert( valid_accounts, string.format("%s => Trusted authentication", username ) )
end