CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/proto/mms/model/smtp.rb
Views: 11766
1
# -*- coding: binary -*-
2
3
module Rex
4
module Proto
5
module Mms
6
module Model
7
class Smtp
8
9
# @!attribute address
10
# @return [String] SMTP address
11
attr_accessor :address
12
13
# @!attribute port
14
# @return [Fixnum] SMTP port
15
attr_accessor :port
16
17
# @!attribute username
18
# @return [String] SMTP account/username
19
attr_accessor :username
20
21
# @!attribute password
22
# @return [String] SMTP password
23
attr_accessor :password
24
25
# @!attribute login_type
26
# @return [Symbol] SMTP login type (:login, :plain, and :cram_md5)
27
attr_accessor :login_type
28
29
# @!attribute from
30
# @return [String] Sender
31
attr_accessor :from
32
33
# @!attribute helo_domain
34
# @return [String] The domain to use for the HELO SMTP message
35
attr_accessor :helo_domain
36
37
38
# Initializes the SMTP object.
39
#
40
# @param [Hash] opts
41
# @option opts [String] :address
42
# @option opts [Fixnum] :port
43
# @option opts [String] :username
44
# @option opts [String] :password
45
# @option opts [String] :helo_domain
46
# @option opts [Symbol] :login_type
47
# @option opts [String] :from
48
#
49
# @return [Rex::Proto::Mms::Model::Smtp]
50
def initialize(opts={})
51
self.address = opts[:address]
52
self.port = opts[:port] || 25
53
self.username = opts[:username]
54
self.password = opts[:password]
55
self.helo_domain = opts[:helo_domain] || 'localhost'
56
self.login_type = opts[:login_type] || :login
57
self.from = opts[:from] || ''
58
end
59
60
end
61
end
62
end
63
end
64
end
65
66