Moved classes into the Metasploit3 space

I'm just worried about all those naked classes just hanging around in
the top namespace. This shouldn't impact functionality at all.

While most modules don't define their own classes (this is usually the
job of Msf::Exploit and Rex), I can't think of a reason why you
shouldn't (well, aside from reusability). And yet, very rarely do
modules do it. It's not unknown, though -- the drda.rb capture module
defines a bunch of Constants, and the
post/windows/gather/credentials/bulletproof_ftp.rb module defines some
more interesting things.

So, this should be okay, as long as things are defined in the context of
the Metasploit module proper.
bug/bundler_fix
Tod Beardsley 2013-08-08 16:22:34 -05:00
parent 4e166f3da4
commit f4fc0ef3fb
1 changed files with 86 additions and 86 deletions

View File

@ -7,8 +7,11 @@
require 'msf/core'
#Helper Classes copy/paste from Rails4
class MessageVerifier
class Metasploit3 < Msf::Exploit::Remote
Rank = ExcellentRanking
#Helper Classes copy/paste from Rails4
class MessageVerifier
class InvalidSignature < StandardError; end
@ -28,9 +31,9 @@ class MessageVerifier
OpenSSL::HMAC.hexdigest(OpenSSL::Digest.const_get(@digest).new, @secret, data)
end
end
end
class MessageEncryptor
class MessageEncryptor
module NullSerializer #:nodoc:
@ -78,9 +81,9 @@ class MessageEncryptor
OpenSSL::Cipher::Cipher.new(@cipher)
end
end
end
class KeyGenerator
class KeyGenerator
def initialize(secret, options = {})
@secret = secret
@ -91,10 +94,7 @@ class KeyGenerator
OpenSSL::PKCS5.pbkdf2_hmac_sha1(@secret, salt, @iterations, key_size)
end
end
class Metasploit3 < Msf::Exploit::Remote
Rank = ExcellentRanking
end
include Msf::Exploit::CmdStagerTFTP
include Msf::Exploit::Remote::HttpClient