From 6a0a410cad6ccfb44a31c085c4150a2cb5a45f76 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Mon, 22 Jun 2015 16:56:16 -0500 Subject: [PATCH] fix minor issue typing 'transport remove' meterpreter > transport remove [-] Error running command transport: NoMethodError undefined method `end_with?' for nil:NilClass --- lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb b/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb index 6fe12a4fb3..1ef513b186 100644 --- a/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb +++ b/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb @@ -739,7 +739,7 @@ class Console::CommandDispatcher::Core print_error("Failed to add transport, please check the parameters") end when 'remove' - if !opts[:transport].end_with?('_tcp') && opts[:uri].nil? + if opts[:transport] && !opts[:transport].end_with?('_tcp') && opts[:uri].nil? print_error("HTTP/S transport specified without session URI") return end