Method: Rex::Post::LDAP::Ui::Console#initialize

Defined in:
lib/rex/post/ldap/ui/console.rb

#initialize(session) ⇒ Console

Initialize the LDAP console.

Parameters:



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/rex/post/ldap/ui/console.rb', line 29

def initialize(session)
  super('%undLDAP%clr', '>', Msf::Config.ldap_session_history, nil, :ldap)

  # The ldap client context
  self.session = session
  self.client = session.client

  # Queued commands array
  self.commands = []

  # Point the input/output handles elsewhere
  reset_ui

  enstack_dispatcher(Rex::Post::LDAP::Ui::Console::CommandDispatcher::Client)
  enstack_dispatcher(Rex::Post::LDAP::Ui::Console::CommandDispatcher::Core)
  enstack_dispatcher(Msf::Ui::Console::CommandDispatcher::LocalFileSystem)

  # Set up logging to whatever logsink 'core' is using
  if !$dispatcher['ldap']
    $dispatcher['ldap'] = $dispatcher['core']
  end
end