File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,14 @@ def get_stdin_wordlist(self):
16
16
17
17
def get_wordlist (self , wordlist_files = None ):
18
18
wordlist = []
19
+ wordlist_types = []
19
20
stdin_words = self .get_stdin_wordlist ()
21
+ print (stdin_words )
20
22
if stdin_words :
23
+ wordlist_types .append ('stdin' )
21
24
wordlist .extend (stdin_words )
22
25
combined = get_combined_word_lists (wordlist_files or DEFAULT_WORDLIST_FILE )
23
- wordlist .extend (combined ['words' ])
24
- return wordlist
26
+ if combined :
27
+ wordlist_types .append ('wordlists: {}' .format (', ' .join (combined ['file_paths' ])))
28
+ wordlist .extend (combined ['words' ])
29
+ return wordlist , wordlist_types
Original file line number Diff line number Diff line change @@ -20,7 +20,9 @@ def test_get_wordlist_from_stdin(self):
20
20
with patch ('sys.stdin' ) as mock_stdin :
21
21
mock_stdin .read = Mock (return_value = '\n ' .join (stdin_list ))
22
22
mock_stdin .isatty = Mock (return_value = False )
23
- self .assertEqual (self .wordlist .get_wordlist (), expected_wordlist )
23
+ wordlist , wordlist_types = self .wordlist .get_wordlist ()
24
+ self .assertEqual (wordlist , expected_wordlist )
24
25
25
26
def test_using_default_wordlist (self ):
26
- self .assertEqual (self .wordlist .get_wordlist (), self .default_wordlist )
27
+ wordlist , wordlist_types = self .wordlist .get_wordlist ()
28
+ self .assertEqual (wordlist , self .default_wordlist )
You can’t perform that action at this time.
0 commit comments