Deduplicate wordlist for added security
authorScott Tankard <redacted>
Tue, 29 Mar 2016 05:16:25 +0000 (22:16 -0700)
committerScott Tankard <redacted>
Tue, 29 Mar 2016 05:16:25 +0000 (22:16 -0700)
Particular benefit when working with 3rd party/untrusted/downloaded
wordlists.

xkcdpass/xkcd_password.py

index 13a911587065457bff61527ca45f336ee8cd70f5..8342b699f9049df5bae2544111f9d38709f89400 100755 (executable)
@@ -115,7 +115,7 @@ def generate_wordlist(wordfile=None,
 
     wlf.close()
 
-    return words
+    return list(set(words)) # deduplicate, just in case
 
 
 def wordlist_to_worddict(wordlist):
git clone https://git.99rst.org/PROJECT