diff --git a/bitwardenBackup.py b/bitwardenBackup.py index ec818aa..7126b54 100644 --- a/bitwardenBackup.py +++ b/bitwardenBackup.py @@ -13,12 +13,15 @@ from kmip.pie import client os_detected = platform.system() script_directory = os.path.dirname(os.path.realpath(__file__)) -secrets_ini_file = script_directory + "/secrets.ini" +secrets_ini_file = os.path.join(script_directory, "secrets.ini") +pykmip_client_config_file = os.path.join(script_directory, "conf", "client.conf") if os_detected == "Windows": - bitwarden_cli_executable = script_directory + "lib/bw.exe" + bitwarden_cli_executable = os.path.join(script_directory, "lib", "bw.exe") elif os_detected == "Linux": - bitwarden_cli_executable = script_directory + "lib/bw" + bitwarden_cli_executable = os.path.join(script_directory, "lib", "bw") +elif os_detected == "FreeBSD": + bitwarden_cli_executable = os.path.join(script_directory, "lib", "bw") else: print("Your OS is not supported. Only Windows and Linux are currently supported.\nDetected OS: {0}".format(os_detected)) sys.exit(1) @@ -256,8 +259,8 @@ if __name__ == "__main__": logger = utils.build_console_logger(logging.INFO) config = opts.config passphrase = opts.message - print(script_directory + "/conf/client.conf") - client = client.ProxyKmipClient(config=config, config_file=script_directory + "/conf/client.conf") + print(pykmip_client_config_file) + client = client.ProxyKmipClient(config=config, config_file=pykmip_client_config_file) client.open() print(encrypt(client, "test")) client.close()