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

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

#interact(&block) ⇒ Object

Called when someone wants to interact with the LDAP client. It’s assumed that init_ui has been called prior.



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/rex/post/ldap/ui/console.rb', line 56

def interact(&block)
  # Run queued commands
  commands.delete_if do |ent|
    run_single(ent)
    true
  end

  # Run the interactive loop
  run do |line|
    # Run the command
    run_single(line)

    # If a block was supplied, call it, otherwise return false
    if block
      block.call
    else
      false
    end
  end
end