2019-08-18 06:34:03 +02:00
|
|
|
#!/usr/bin/env python3
|
2020-10-11 20:03:02 +02:00
|
|
|
"""src/ssh_audit/ssh_audit.py wrapper for backwards compatibility"""
|
2020-06-09 23:54:07 +02:00
|
|
|
|
2024-04-18 19:58:13 +02:00
|
|
|
import multiprocessing
|
2020-06-09 23:54:07 +02:00
|
|
|
import sys
|
2020-10-11 20:41:58 +02:00
|
|
|
import traceback
|
2020-10-11 20:03:02 +02:00
|
|
|
from pathlib import Path
|
2020-06-09 23:54:07 +02:00
|
|
|
|
2020-10-11 20:03:02 +02:00
|
|
|
sys.path.insert(0, str(Path(__file__).resolve().parent / "src"))
|
2020-07-07 22:31:44 +02:00
|
|
|
|
2020-10-11 20:03:02 +02:00
|
|
|
from ssh_audit.ssh_audit import main # noqa: E402
|
2020-10-11 20:41:58 +02:00
|
|
|
from ssh_audit import exitcodes # noqa: E402
|
2020-07-07 22:31:44 +02:00
|
|
|
|
2024-04-18 19:58:13 +02:00
|
|
|
if __name__ == "__main__":
|
|
|
|
multiprocessing.freeze_support() # Needed for PyInstaller (Windows) builds.
|
2020-10-11 20:41:58 +02:00
|
|
|
|
2024-04-18 19:58:13 +02:00
|
|
|
exit_code = exitcodes.GOOD
|
|
|
|
try:
|
|
|
|
exit_code = main()
|
|
|
|
except Exception:
|
|
|
|
exit_code = exitcodes.UNKNOWN_ERROR
|
|
|
|
print(traceback.format_exc())
|
2020-10-11 20:41:58 +02:00
|
|
|
|
2024-04-18 19:58:13 +02:00
|
|
|
sys.exit(exit_code)
|