Class: Rex::Proto::Mms::Model::Smtp

Inherits:
Object
  • Object
show all
Defined in:
lib/rex/proto/mms/model/smtp.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Rex::Proto::Mms::Model::Smtp

Initializes the SMTP object.

Parameters:

  • opts (Hash) (defaults to: {})

Options Hash (opts):

  • :address (String)
  • :port (Fixnum)
  • :username (String)
  • :password (String)
  • :helo_domain (String)
  • :login_type (Symbol)
  • :from (String)


50
51
52
53
54
55
56
57
58
# File 'lib/rex/proto/mms/model/smtp.rb', line 50

def initialize(opts={})
  self.address     = opts[:address]
  self.port        = opts[:port]        || 25
  self.username    = opts[:username]
  self.password    = opts[:password]
  self.helo_domain = opts[:helo_domain] || 'localhost'
  self.  = opts[:login_type]  || :login
  self.from        = opts[:from]        || ''
end

Instance Attribute Details

#addressString

Returns SMTP address.

Returns:

  • (String)

    SMTP address



11
12
13
# File 'lib/rex/proto/mms/model/smtp.rb', line 11

def address
  @address
end

#fromString

Returns Sender.

Returns:

  • (String)

    Sender



31
32
33
# File 'lib/rex/proto/mms/model/smtp.rb', line 31

def from
  @from
end

#helo_domainString

Returns The domain to use for the HELO SMTP message.

Returns:

  • (String)

    The domain to use for the HELO SMTP message



35
36
37
# File 'lib/rex/proto/mms/model/smtp.rb', line 35

def helo_domain
  @helo_domain
end

#login_typeSymbol

Returns SMTP login type (:login, :plain, and :cram_md5).

Returns:

  • (Symbol)

    SMTP login type (:login, :plain, and :cram_md5)



27
28
29
# File 'lib/rex/proto/mms/model/smtp.rb', line 27

def 
  @login_type
end

#passwordString

Returns SMTP password.

Returns:

  • (String)

    SMTP password



23
24
25
# File 'lib/rex/proto/mms/model/smtp.rb', line 23

def password
  @password
end

#portFixnum

Returns SMTP port.

Returns:

  • (Fixnum)

    SMTP port



15
16
17
# File 'lib/rex/proto/mms/model/smtp.rb', line 15

def port
  @port
end

#usernameString

Returns SMTP account/username.

Returns:

  • (String)

    SMTP account/username



19
20
21
# File 'lib/rex/proto/mms/model/smtp.rb', line 19

def username
  @username
end