New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`block in tab_complete_stub': undefined method `downcase' for ["irb", "pry", "edit", "reload_lib", "log"]:Array (NoMethodError) #11045

Closed
bcoles opened this Issue Nov 30, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@bcoles
Contributor

bcoles commented Nov 30, 2018

msfconsole crashes when using tab autocomplete for alias.

Likely related to #10654

Steps to reproduce

msf5> load alias
msf5> alias <hit tab>

Output

# ./msfconsole 
[-] ***Rting the Metasploit Framework console...\
[-] * WARNING: No database support: No database YAML file
[-] ***
                                                  

  PPPPP   IIIIIII   N    N
  P   PP     I      NN   N   IDENTIFICATION
  P   PP     I      N N  N
  PPPPP      I      N  N N      PROGRAM
  P          I      N   NN
  P       IIIIIII   N    N

  Strike a key when ready ...



       =[ metasploit v5.0.0-dev-a635e36                   ]
+ -- --=[ 1851 exploits - 1045 auxiliary - 320 post       ]
+ -- --=[ 541 payloads - 44 encoders - 10 nops            ]
+ -- --=[ 2 evasion                                       ]
+ -- --=[ ** This is Metasploit 5 development branch **   ]

msf5 > load alias
[*] Successfully loaded plugin: alias
msf5 > alias /pentest/exploit/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:405:in `block in tab_complete_stub': undefined method `downcase' for ["irb", "pry", "edit", "reload_lib", "log"]:Array (NoMethodError)
	from /pentest/exploit/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:404:in `each'
	from /pentest/exploit/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:404:in `find_all'
	from /pentest/exploit/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:404:in `tab_complete_stub'
	from /pentest/exploit/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:355:in `tab_complete'
	from /pentest/exploit/metasploit-framework/lib/rex/ui/text/shell.rb:62:in `block in init_tab_complete'
	from /usr/local/rvm/gems/ruby-2.3.0/gems/rb-readline-0.5.5/lib/readline.rb:136:in `readline_attempted_completion_function'
	from /usr/local/rvm/gems/ruby-2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:6329:in `gen_completion_matches'
	from /usr/local/rvm/gems/ruby-2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:6813:in `rl_complete_internal'
	from /usr/local/rvm/gems/ruby-2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:6903:in `rl_complete'
	from /usr/local/rvm/gems/ruby-2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:4374:in `_rl_dispatch_subseq'
	from /usr/local/rvm/gems/ruby-2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:4363:in `_rl_dispatch'
	from /usr/local/rvm/gems/ruby-2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:4779:in `readline_internal_charloop'
	from /usr/local/rvm/gems/ruby-2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:4853:in `readline_internal'
	from /usr/local/rvm/gems/ruby-2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:4875:in `readline'
	from /pentest/exploit/metasploit-framework/lib/rex/ui/text/input/readline.rb:162:in `readline_with_output'
	from /pentest/exploit/metasploit-framework/lib/rex/ui/text/input/readline.rb:100:in `pgets'
	from /pentest/exploit/metasploit-framework/lib/rex/ui/text/shell.rb:309:in `get_input_line'
	from /pentest/exploit/metasploit-framework/lib/rex/ui/text/shell.rb:134:in `run'
	from /pentest/exploit/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'
	from /pentest/exploit/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
	from ./msfconsole:49:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment