diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 5fde6ab..76eb921 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,7 +4,7 @@
-
+
@@ -219,7 +219,15 @@
1724495688099
-
+
+
+ 1724576599289
+
+
+
+ 1724576599289
+
+
@@ -262,6 +270,7 @@
-
+
+
\ No newline at end of file
diff --git a/main.py b/main.py
index a2302f5..35cd409 100755
--- a/main.py
+++ b/main.py
@@ -85,12 +85,12 @@ class FrameWidgets(ttk.Frame):
self.peer.config(font=("Ubuntu", 9))
self.peer.grid(column=0, row=7, sticky="we", padx=130)
# Listbox with Scrollbar
- self.scrollbar = tk.Scrollbar(self)
+ self.scrollbar = ttk.Scrollbar(self)
self.l_box = tk.Listbox(self, fg='#606060', selectmode='single')
self.l_box.config(highlightthickness=0, relief='flat')
self.scrollbar.config(command=self.l_box.yview)
self.l_box.config(font=("Ubuntu", 12, "bold"))
- self.l_box.grid(column=1, rowspan=3, row=1, )
+ self.l_box.grid(column=1, rowspan=3, row=1)
# Tunnel List
self.tl = ListTunnels.tl_list()
for tunnels in self.tl:
diff --git a/wg_func.py b/wg_func.py
index 5c10490..8762e91 100755
--- a/wg_func.py
+++ b/wg_func.py
@@ -1,6 +1,6 @@
# Wireguard functions for Wire-Py
import os
-import subprocess
+import shutil
from tkinter import filedialog
import tkinter as tk
@@ -182,14 +182,15 @@ class ImportTunnel:
pathsplit1 = pathsplit[-1]
if "PrivateKey = " in read and "PublicKey = " in read:
if len(pathsplit1) > 17:
+ p1 = shutil.copy(filepath, os.environ['HOME'] + '/tester/')
pathsplit = pathsplit1[len(pathsplit1) - 17:]
- os.rename(filepath, os.environ['HOME'] + '/tester/' + str(pathsplit))
+ os.rename(p1, os.environ['HOME'] + '/tester/' + str(pathsplit))
if self.a != '':
os.system('nmcli connection down ' + str(TunnelActiv.active()))
os.system('nmcli connection import type wireguard file ' + os.environ['HOME'] + '/tester/' +
str(pathsplit))
else:
- subprocess.call('cp ' + str(filepath) + ' ' + os.environ['HOME'] + '/tester/', shell=True)
+ shutil.copy(filepath, os.environ['HOME'] + '/tester/')
if self.a != '':
os.system('nmcli connection down ' + str(TunnelActiv.active()))
os.system('nmcli connection import type wireguard file ' + str(filepath))