Skip to content

Commit 6a0a410

Browse files
author
Brent Cook
committed
fix minor issue typing 'transport remove'
meterpreter > transport remove [-] Error running command transport: NoMethodError undefined method `end_with?' for nil:NilClass
1 parent 8656add commit 6a0a410

File tree

1 file changed

+1
-1
lines changed
  • lib/rex/post/meterpreter/ui/console/command_dispatcher

1 file changed

+1
-1
lines changed

lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ def cmd_transport(*args)
739739
print_error("Failed to add transport, please check the parameters")
740740
end
741741
when 'remove'
742-
if !opts[:transport].end_with?('_tcp') && opts[:uri].nil?
742+
if opts[:transport] && !opts[:transport].end_with?('_tcp') && opts[:uri].nil?
743743
print_error("HTTP/S transport specified without session URI")
744744
return
745745
end

0 commit comments

Comments
 (0)