Class: Rex::Proto::ACPP::Client
- Inherits:
-
Object
- Object
- Rex::Proto::ACPP::Client
- Defined in:
- lib/rex/proto/acpp/client.rb
Instance Method Summary collapse
- #authenticate(password = 'public') ⇒ Object
-
#initialize(sock, opts = {}) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(sock, opts = {}) ⇒ Client
Returns a new instance of Client.
13 14 15 16 |
# File 'lib/rex/proto/acpp/client.rb', line 13 def initialize(sock, opts = {}) @sock = sock @opts = opts end |
Instance Method Details
#authenticate(password = 'public') ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/rex/proto/acpp/client.rb', line 18 def authenticate(password = 'public') login = Message.new login.password = password login.type = 20 @sock.put(login.to_s) # TODO: the checksum never validates here Message.decode(@sock.get_once(128), false) end |