class Rex::Proto::ACPP::Client

Public Class Methods

new(sock, opts = {}) click to toggle source
# File lib/rex/proto/acpp/client.rb, line 12
def initialize(sock, opts = {})
  @sock = sock
  @opts = opts
end

Public Instance Methods

authenticate(password = 'public') click to toggle source
# File lib/rex/proto/acpp/client.rb, line 17
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