Module: Ronin::Network::Mixins::POP3
Overview
Adds POP3 convenience methods and connection parameters to a class.
Defines the following parameters:
host
(String
) - POP3 host.port
(Integer
) - POP3 port.pop3_user
(String
) - POP3 user to login as.pop3_password
(String
) - POP3 password to login with.
Constant Summary
Constants included from POP3
Instance Method Summary collapse
-
#pop3_connect(options = {}) {|session| ... } ⇒ Net::POP3
protected
Creates a connection to the POP3 server.
-
#pop3_session(options = {}) {|session| ... } ⇒ Object
protected
Starts a session with the POP3 server.
Methods included from Mixin
Methods included from POP3
Instance Method Details
#pop3_connect(options = {}) {|session| ... } ⇒ Net::POP3 (protected)
Creates a connection to the POP3 server. The host},
port,
pop3_userand
pop3_password` parameters will also be used
to connect to the server.
90 91 92 93 94 |
# File 'lib/ronin/network/mixins/pop3.rb', line 90 def pop3_connect(={},&block) print_info "Connecting to #{host_port} ..." return super(self.host,(),&block) end |
#pop3_session(options = {}) {|session| ... } ⇒ Object (protected)
Starts a session with the POP3 server. The host
, port
,
pop3_user
and pop3_password
parameters will also be used
to connect to the server.
113 114 115 116 117 118 119 120 121 |
# File 'lib/ronin/network/mixins/pop3.rb', line 113 def pop3_session(={}) super() do |sess| yield sess if block_given? print_info "Logging out ..." end print_info "Disconnected to #{host_port}" end |