sshwot/src/export_known_hosts.py

20 lines
355 B
Python

import sys
import process_known_hosts
import write_file
def main():
entries = []
# TODO: Don't hardcode
# TODO: Handle errors
with open(sys.argv[1], 'r') as f:
for line in f:
entries.extend(process_known_hosts.process_line(line))
with open('known_hosts.sshwot', 'wb') as f:
write_file.write(f, entries)
if __name__ == '__main__':
main()