passbe/beef-migration-test-2 — Issue #134: Change Authentication to handle more than one session
Author: passbe
Created: 2011-12-08 09:57:28+00:00
State: open

If we are connected to BeEF through the admin web UI, and in the meantime through the console, we get an error listing the HBs. At the moment concurrent authenticated sessions to the admin UI are not supported.

Gracefully handle this error.

BeEF > show zombies
[-] Error while running command online: 706: unexpected token at '<HTML><A HREF="/ui/authentication"
>/ui/authentication</A>.</HTML>
'

Call stack:
C:/Ruby192/lib/ruby/1.9.1/json/common.rb:146:in `parse'
C:/Ruby192/lib/ruby/1.9.1/json/common.rb:146:in `parse'
C:/BeEF-things/BeEF_console/console/lib/beef/remote/session.rb:50:in `getjson'
C:/BeEF-things/BeEF_console/console/lib/beef/remote/zombie-poll.rb:19:in `hooked'
C:/BeEF-things/BeEF_console/console/lib/beef/ui/console/command_dispatcher/remote.rb:101:in `cmd_onl
ine'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/librex-0.0.44/lib/rex/ui/text/dispatcher_shell.rb:376:in `run_co
mmand'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/librex-0.0.44/lib/rex/ui/text/dispatcher_shell.rb:338:in `block
in run_single'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/librex-0.0.44/lib/rex/ui/text/dispatcher_shell.rb:332:in `each'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/librex-0.0.44/lib/rex/ui/text/dispatcher_shell.rb:332:in `run_si
ngle'
C:/BeEF-things/BeEF_console/console/lib/beef/ui/console/command_dispatcher/core.rb:120:in `block in
cmd_show'
C:/BeEF-things/BeEF_console/console/lib/beef/ui/console/command_dispatcher/core.rb:115:in `each'
C:/BeEF-things/BeEF_console/console/lib/beef/ui/console/command_dispatcher/core.rb:115:in `cmd_show'

C:/Ruby192/lib/ruby/gems/1.9.1/gems/librex-0.0.44/lib/rex/ui/text/dispatcher_shell.rb:376:in `run_co
mmand'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/librex-0.0.44/lib/rex/ui/text/dispatcher_shell.rb:338:in `block
in run_single'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/librex-0.0.44/lib/rex/ui/text/dispatcher_shell.rb:332:in `each'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/librex-0.0.44/lib/rex/ui/text/dispatcher_shell.rb:332:in `run_si
ngle'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/librex-0.0.44/lib/rex/ui/text/shell.rb:199:in `run'
Google Code Issue: http://code.google.com/p/beef/issues/detail?id=408