parent
25fbe1c7d0
commit
32f2d6754c
|
@ -52,6 +52,11 @@ module Exploit::Remote::Postgres
|
|||
ip = args[:server] || datastore['RHOST']
|
||||
port = args[:port] || datastore['RPORT']
|
||||
uri = "tcp://#{ip}:#{port}"
|
||||
|
||||
if Rex::Socket.is_ipv6?(ip)
|
||||
uri = "tcp://[#{ip}]:#{port}"
|
||||
end
|
||||
|
||||
verbose = args[:verbose] || datastore['VERBOSE']
|
||||
begin
|
||||
self.postgres_conn = Connection.new(db,username,password,uri)
|
||||
|
@ -234,7 +239,7 @@ module Exploit::Remote::Postgres
|
|||
if datastore['PASSWORD'].to_s.size > 0
|
||||
datastore['PASSWORD'].to_s
|
||||
else
|
||||
Rex::Text.rand_text_english(rand(6)+2)
|
||||
'INVALID_' + Rex::Text.rand_text_alpha(rand(6))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue