We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbe392a commit 8f65679Copy full SHA for 8f65679
modules/auxiliary/scanner/ssl/openssl_heartbleed.rb
@@ -225,9 +225,14 @@ def tls_imap
225
end
226
227
def tls_postgres
228
+ # postgresql TLS - works with all modern pgsql versions - 8.0 - 9.3
229
# http://www.postgresql.org/docs/9.3/static/protocol-message-formats.html
230
sock.get_once
- sock.put("\x00\x00\x00\x08\x04\xD2\x16\x2F")
231
+ # the postgres SSLRequest packet is a int32(8) followed by a int16(1234),
232
+ # int16(5679) in network format
233
+ psql_sslrequest = [8].pack('N')
234
+ psql_sslrequest << [1234, 5679].pack('n*')
235
+ sock.put(psql_sslrequest)
236
res = sock.get_once
237
unless res && res =~ /S/
238
return nil
0 commit comments