Compare commits

..

No commits in common. "c6427722de1e13fa8e23a12bba05ba55c985ea1b" and "12902df9248eacfef64fba0e243b0125b00f84ee" have entirely different histories.

3 changed files with 3 additions and 13 deletions

View File

@ -16,7 +16,6 @@ TODO
* Write manpages
* Add `install` and `uninstall` makefile targets
* `sshwot-scan-known-hosts`
* Investigate why it says sshwot-file is required in `sshwot-filter`
License
-------

View File

@ -101,7 +101,7 @@ def main():
# Use the default files if no input files were specified
if len(args.infiles) == 0:
infiles = default_files.open_all()
infiles = open_default_files.open_all()
else:
infiles = args.infiles

View File

@ -74,9 +74,6 @@ def main():
else:
infiles = args.infiles
# Only do colour if we are outputting to a tty
colour = os.isatty(sys.stdout.fileno())
# Check
any_verified = False
for path in infiles:
@ -97,17 +94,11 @@ def main():
# Use for display the same normalzed format as internally
# We do .decode() here, as it produces bytes
host_display = entry.normalize_host(match_host, match_port).decode()
if colour:
print('[\x1b[32mok\x1b[0m] %s: %s: %s' % (name, host_display, match_comment))
else:
print('[ok] %s: %s: %s' % (name, host_display, match_comment))
print('[\x1b[32mok\x1b[0m] %s: %s: %s' % (name, host_display, match_comment))
for fail_host, fail_port, fail_comment in fail:
host_display = entry.normalize_host(fail_host, fail_port).decode()
if colour:
print('[\x1b[31mfail\x1b[0m] %s: %s: %s' % (name, host_display, fail_comment))
else:
print('[fail] %s: %s: %s' % (name, host_display, fail_comment))
print('[\x1b[31mfail\x1b[0m] %s: %s: %s' % (name, host_display, fail_comment))
# Only display this if we didn't get a match in this file
# The value in the [same fingerprint] message is finding a host