aboutsummaryrefslogtreecommitdiffstats
path: root/passcheck.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-10-29 16:02:58 +0100
committerMattias Andrée <maandree@operamail.com>2015-10-29 16:02:58 +0100
commite7f412d3bf2525f40c0823c5b93b7cca93e95bf5 (patch)
tree08f786f9a2ba86777422ee0f5636dcdba48bd50e /passcheck.py
parentinform that black is located in large-files if missing (diff)
downloadpasscheck-e7f412d3bf2525f40c0823c5b93b7cca93e95bf5.tar.gz
passcheck-e7f412d3bf2525f40c0823c5b93b7cca93e95bf5.tar.bz2
passcheck-e7f412d3bf2525f40c0823c5b93b7cca93e95bf5.tar.xz
add todo
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'passcheck.py')
-rwxr-xr-xpasscheck.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/passcheck.py b/passcheck.py
index e9e950f..7717eb0 100755
--- a/passcheck.py
+++ b/passcheck.py
@@ -114,6 +114,11 @@ def evaluate(data):
blacklist = None
try:
+ # TODO Converting into a set should be opt-in, and is an optimisation
+ # for servers that have the process running indefinitely can
+ # continuously feeds passphrases to it. On personal computers,
+ # it is better to do a binary search of the file without loading
+ # it completely.
with open('blacklist', 'rb') as file:
blacklist = set(file.read().decode('utf-8', 'replace').split('\n'))
except FileNotFoundError: