@@ -491,11 +491,11 @@ def terminal_main_display(self, tokens, extra_commands=None, save_history=True):
491491 print (self .do_exploit_targets .__doc__ )
492492 except  TypeError :
493493 pass 
494-  if  len (choice_data_list ) <  4 :
494+  if  choice_data_list   is   None   or   len (choice_data_list ) <  4 :
495495 lib .output .error (
496496 "must provide at least LHOST, LPORT, workspace name with `{}` keyword " 
497497 "(IE {} 127.0.0.1 9076 default [whitelist-path] [honeycheck])" .format (
498-  choice , choice 
498+  choice . strip () , choice . strip () 
499499 )
500500 )
501501 else :
@@ -547,11 +547,11 @@ def terminal_main_display(self, tokens, extra_commands=None, save_history=True):
547547 print (self .do_load_custom_hosts .__doc__ )
548548 except  TypeError :
549549 pass 
550-  if  len (choice_data_list ) <  3 :
550+  if  choice_data_list   is   None   or   len (choice_data_list ) <  3 :
551551 lib .output .error (
552552 "must provide a list of API names after `{}` keyword and query " 
553553 "(IE {} shodan,censys apache2)" .format (
554-  choice , choice 
554+  choice . strip () , choice . strip () 
555555 )
556556 )
557557 else :
@@ -578,11 +578,11 @@ def terminal_main_display(self, tokens, extra_commands=None, save_history=True):
578578 except  TypeError :
579579 pass 
580580
581-  if  len (choice_data_list ) <  3 :
581+  if  choice_data_list   is   None   or   len (choice_data_list ) <  3 :
582582 lib .output .error (
583583 "must supply API name with `{}` keyword along with " 
584584 "new token (IE {} shodan mytoken123 [userID (censys)])" .format (
585-  choice , choice 
585+  choice . strip () , choice . strip () 
586586 )
587587 )
588588 else :
0 commit comments