Class: Gophish::Smtp
- Inherits:
-
Base
- Object
- Base
- Gophish::Smtp
show all
- Defined in:
- lib/gophish/smtp.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
all, configuration, delete, #destroy, find, get, #initialize, #new_record?, #persisted?, post, put, resource_name, #save, #update_attributes
Constructor Details
This class inherits a constructor from Gophish::Base
Class Method Details
.resource_path ⇒ Object
6
7
8
|
# File 'lib/gophish/smtp.rb', line 6
def self.resource_path
'/smtp'
end
|
Instance Method Details
39
40
41
42
|
# File 'lib/gophish/smtp.rb', line 39
def (key, value)
<< { key:, value: }
end
|
#body_for_create ⇒ Object
29
30
31
32
33
34
35
36
37
|
# File 'lib/gophish/smtp.rb', line 29
def body_for_create
{
name:, username:, password:, host:,
interface_type:,
from_address:,
ignore_cert_errors:,
headers:
}
end
|
#has_authentication? ⇒ Boolean
58
59
60
|
# File 'lib/gophish/smtp.rb', line 58
def has_authentication?
!username.blank? && !password.blank?
end
|
50
51
52
|
# File 'lib/gophish/smtp.rb', line 50
def
!.empty?
end
|
54
55
56
|
# File 'lib/gophish/smtp.rb', line 54
def
.length
end
|
#ignores_cert_errors? ⇒ Boolean
62
63
64
|
# File 'lib/gophish/smtp.rb', line 62
def ignores_cert_errors?
ignore_cert_errors == true
end
|
44
45
46
47
48
|
# File 'lib/gophish/smtp.rb', line 44
def (key)
original_size = .size
.reject! { || [:key] == key || ['key'] == key }
if .size != original_size
end
|