Skip to content

Commit

Permalink
Notify user on failed Postgres connection
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanusz-r7 committed Jan 18, 2024
1 parent 97f28f2 commit 5b92079
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/msf/core/exploit/remote/postgres.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ def postgres_login(opts={})
vprint_error "#{ip}:#{port} Postgres - Error: #{e.inspect}"
return :error
end
rescue ::Rex::ConnectionRefused => e
print_error "#{ip}:#{port} Postgres - Connection Refused: #{e}"
return :connection_refused
end
if self.postgres_conn
vprint_good "#{ip}:#{port} Postgres - Logged in to '#{db}' with '#{username}':'#{password}'"
Expand Down

0 comments on commit 5b92079

Please sign in to comment.