Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/remmina-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatryk Nowak <pnowak43@proton.me>2023-12-07 23:15:43 +0300
committerPatryk Nowak <pnowak43@proton.me>2023-12-07 23:15:43 +0300
commitd50a30c8403bbfa31d6f650c167ddb5b5d1bddc5 (patch)
treec18e57782e5b76ac1073ecb2da1cfb49e6c273a5
parent2514ef155a52985fbbc5cbd95ff1ce95d4867686 (diff)
Add a plugin to print out saved passwords to make migrating to new systems easier
-rw-r--r--plugins/password_export/password_export.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/plugins/password_export/password_export.py b/plugins/password_export/password_export.py
new file mode 100644
index 0000000..1b1d83d
--- /dev/null
+++ b/plugins/password_export/password_export.py
@@ -0,0 +1,36 @@
+import gi
+import remmina
+import time
+import os
+gi.require_version('Secret', '1')
+from gi.repository import Secret
+
+#Schema in which passwords are stored
+SCHEMA = Secret.Schema.new("org.remmina.Password",
+ Secret.SchemaFlags.NONE,
+ {
+ "filename": Secret.SchemaAttributeType.STRING,
+ "key": Secret.SchemaAttributeType.STRING,
+ }
+)
+
+class PluginTool:
+ def __init__(self):
+ self.button = None
+ self.name = "Password Export Tool"
+ self.type = "tool"
+ self.description = "Export all passwords"
+ self.version = "1.0"
+
+ def exec_func(self):
+ data_dir = remmina.get_datadir()
+ for file in os.listdir(data_dir):
+ if file.endswith(".remmina"):
+ full_path = data_dir + "/" + file
+ password = Secret.password_lookup_sync(SCHEMA, { "filename": full_path, "key": "password" },
+ None)
+ if (password):
+ print(file + ":\t\t" + password)
+
+passwordExportPlugin = PluginTool()
+remmina.register_plugin(passwordExportPlugin)