Use yardoc for new methods
Also substitute '&&' for 'and', and fix some whitespacebug/bundler_fix
parent
3b5eb42b55
commit
a75d47aad9
|
@ -445,10 +445,10 @@ module Exploit::Remote::HttpClient
|
|||
# destination host and port. This method falls back to using the old
|
||||
# service.info field to represent the HTTP Server header.
|
||||
#
|
||||
# Options:
|
||||
# @option opts [String] :uri An HTTP URI to request in order to generate a fingerprint
|
||||
# @option opts [String] :method An HTTP method to use in the fingerprint request
|
||||
#
|
||||
# @option opts [String] :uri ('/') An HTTP URI to request in order to generate
|
||||
# a fingerprint
|
||||
# @option opts [String] :method ('GET') An HTTP method to use in the fingerprint
|
||||
# request
|
||||
def lookup_http_fingerprints(opts={})
|
||||
uri = opts[:uri] || '/'
|
||||
method = opts[:method] || 'GET'
|
||||
|
@ -465,8 +465,8 @@ module Exploit::Remote::HttpClient
|
|||
|
||||
# Order by note_id descending so the first value is the most recent
|
||||
service.notes.where(:ntype => 'http.fingerprint').order("notes.id DESC").each do |n|
|
||||
next unless n.data and n.data.kind_of?(::Hash)
|
||||
next unless n.data[:uri] == uri and n.data[:method] == method
|
||||
next unless n.data && n.data.kind_of?(::Hash)
|
||||
next unless n.data[:uri] == uri && n.data[:method] == method
|
||||
# Append additional fingerprints to the results as found
|
||||
fprints.unshift n.data.dup
|
||||
end
|
||||
|
@ -481,14 +481,18 @@ module Exploit::Remote::HttpClient
|
|||
# will use it directly, otherwise it will check the database for a previous
|
||||
# fingerprint. Failing that, it will make a request for /.
|
||||
#
|
||||
# Options:
|
||||
# :response an Http::Packet as returned from any of the send_* methods
|
||||
# :uri an HTTP URI to request in order to generate a fingerprint
|
||||
# :method an HTTP method to use in the fingerprint request
|
||||
# :full request the full HTTP fingerprint, not just the signature
|
||||
# Other options are passed directly to {#connect} if :response is not given
|
||||
#
|
||||
# Other options are passed directly to +connect+ if :response is not given
|
||||
# @option opts [Rex::Proto::Http::Packet] :response The return value from any
|
||||
# of the send_* methods
|
||||
# @option opts [String] :uri ('/') An HTTP URI to request in order to generate
|
||||
# a fingerprint
|
||||
# @option opts [String] :method ('GET') An HTTP method to use in the fingerprint
|
||||
# request
|
||||
# @option opts [Boolean] :full (false) Request the full HTTP fingerprint, not
|
||||
# just the signature
|
||||
#
|
||||
# @return [String]
|
||||
def http_fingerprint(opts={})
|
||||
res = nil
|
||||
uri = opts[:uri] || '/'
|
||||
|
|
Loading…
Reference in New Issue