Change method names to lowercase

bug/bundler_fix
Ramon de C Valle 2015-06-20 18:23:34 -07:00
parent a48d79a2e7
commit dabc7abae5
1 changed files with 4 additions and 4 deletions

View File

@ -61,7 +61,7 @@ class Metasploit3 < Msf::Auxiliary
], self.class) ], self.class)
end end
def PRF(secret, label, seed) def prf(secret, label, seed)
if secret.empty? if secret.empty?
s1 = s2 = '' s1 = s2 = ''
else else
@ -81,7 +81,7 @@ class Metasploit3 < Msf::Auxiliary
result result
end end
def PRF_SHA256(secret, label, seed) def prf_sha256(secret, label, seed)
hmac_hash = OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha256'), secret, label + seed) hmac_hash = OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha256'), secret, label + seed)
OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha256'), secret, hmac_hash + label + seed) OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha256'), secret, hmac_hash + label + seed)
end end
@ -153,10 +153,10 @@ class Metasploit3 < Msf::Auxiliary
# message in plaintext. # message in plaintext.
if fragment =~ /^\x0e\x00\x00\x00/ if fragment =~ /^\x0e\x00\x00\x00/
if header[2, 1] == "\x03" if header[2, 1] == "\x03"
verify_data = PRF_SHA256('', 'server finished', OpenSSL::Digest::SHA256.digest(handshake_messages)) verify_data = prf_sha256('', 'server finished', OpenSSL::Digest::SHA256.digest(handshake_messages))
verify_data = verify_data[0, 12] verify_data = verify_data[0, 12]
else else
verify_data = PRF('', 'server finished', OpenSSL::Digest::MD5.digest(handshake_messages) + OpenSSL::Digest::SHA1.digest(handshake_messages)) verify_data = prf('', 'server finished', OpenSSL::Digest::MD5.digest(handshake_messages) + OpenSSL::Digest::SHA1.digest(handshake_messages))
verify_data = verify_data[0, 12] verify_data = verify_data[0, 12]
end end