passbe/beef-migration-test-2 — Issue #14: <console> unknown command options are throwing exception
Author: passbe
Created: 2011-12-08 09:25:37+00:00
State: open

If we issue for example:
connect help
and the help option is not implemented for the command connect, there is an exception.

Handle this error gracefully.

BeEF > connect help
[-] Error while running command connect: undefined method `+' for nil:NilClass

Call stack:
C:/Ruby192/lib/ruby/1.9.1/net/http.rb:1274:in `addr_port'
C:/Ruby192/lib/ruby/1.9.1/net/http.rb:1209:in `begin_transport'
C:/Ruby192/lib/ruby/1.9.1/net/http.rb:1188:in `transport_request'
C:/Ruby192/lib/ruby/1.9.1/net/http.rb:1177:in `request'
C:/Ruby192/lib/ruby/1.9.1/net/http.rb:419:in `block in post_form'
C:/Ruby192/lib/ruby/1.9.1/net/http.rb:627:in `start'
C:/Ruby192/lib/ruby/1.9.1/net/http.rb:418:in `post_form'
C:/BeEF-things/BeEF_console/console/lib/beef/remote/session.rb:20:in `authenticate'
C:/BeEF-things/BeEF_console/console/lib/beef/ui/console/command_dispatcher/remote.rb:53:in `cmd_conn
ect'
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'
beefconsole.rb:65:in `<main>'
Google Code Issue: http://code.google.com/p/beef/issues/detail?id=409