Class: Rex::Proto::ACPP::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/rex/proto/acpp/client.rb

Instance Method Summary collapse

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')
   = Message.new
  .password = password
  .type = 20
  @sock.put(.to_s)
  # TODO: the checksum never validates here
  Message.decode(@sock.get_once(128), false)
end