From bae4d7de3b31789042f4c99d1fffd513f2fb0070 Mon Sep 17 00:00:00 2001 From: JGill Date: Tue, 21 Aug 2018 13:38:14 +0930 Subject: [PATCH 1/6] Updated DNS IPs --- openpyn/scripts/manual-dns-patch.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpyn/scripts/manual-dns-patch.sh b/openpyn/scripts/manual-dns-patch.sh index e4062ba..a668eec 100755 --- a/openpyn/scripts/manual-dns-patch.sh +++ b/openpyn/scripts/manual-dns-patch.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh -nordDNS1="162.242.211.137" -nordDNS2="78.46.223.24" +nordDNS1="103.86.99.100" +nordDNS2="103.86.96.100" openDNS3="208.67.222.220" echo "Changing DNS servers to NordVPN's DNS Servers" From a49f33c65e44ba34131d87420a893ded4034b6c2 Mon Sep 17 00:00:00 2001 From: JGill Date: Fri, 31 Aug 2018 14:13:31 +0930 Subject: [PATCH 2/6] Except when OS doesn't find systemctl #168 --- openpyn/openpyn.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/openpyn/openpyn.py b/openpyn/openpyn.py index a117dae..ee265c4 100755 --- a/openpyn/openpyn.py +++ b/openpyn/openpyn.py @@ -788,11 +788,14 @@ def get_vpn_server_ip(server: str, port: str) -> str: def uses_systemd_resolved() -> bool: # see https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html - systemd_resolved_running = subprocess.call( - ["systemctl", "is-active", "systemd-resolved"], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, - ) == 0 + try: + systemd_resolved_running = subprocess.call( + ["systemctl", "is-active", "systemd-resolved"], + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, + ) == 0 + except FileNotFoundError: # When OS doesn't find systemctl + return False if not systemd_resolved_running: return False From 80bedf6961ed9eac8494bfd20b0a42c713d030ad Mon Sep 17 00:00:00 2001 From: JGill Date: Fri, 31 Aug 2018 14:30:45 +0930 Subject: [PATCH 3/6] 2.7.5.dev1 --- openpyn/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpyn/__init__.py b/openpyn/__init__.py index ce552d5..c5b5326 100644 --- a/openpyn/__init__.py +++ b/openpyn/__init__.py @@ -3,7 +3,7 @@ import subprocess -__version__ = "2.7.4" +__version__ = "2.7.5.dev1" __license__ = "GNU General Public License v3 or later (GPLv3+)" __data_files__ = [] __basefilepath__ = os.path.dirname(os.path.abspath(__file__)) + "/" From 9f9183efcc9eaed7520c1261ec0304f287e0278f Mon Sep 17 00:00:00 2001 From: JGill Date: Tue, 11 Sep 2018 11:07:38 +0930 Subject: [PATCH 4/6] Added tests_require --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index f97d725..746cedb 100755 --- a/setup.py +++ b/setup.py @@ -25,6 +25,7 @@ 'openvpn wrapper', 'nordvpn', 'nordvpn client', 'secure vpn', 'vpn wrapper', 'private vpn', 'privacy'], install_requires=['requests', 'colorama', 'coloredlogs', 'verboselogs'], + tests_require=['pytest', 'mock'], platforms=['GNU/Linux', 'Ubuntu', 'Debian', 'Kali', 'CentOS', 'Arch', 'Fedora'], packages=setuptools.find_packages(), entry_points={ From 9abaaae3a1b3a3f5d1ac2d19889a2141da410bbd Mon Sep 17 00:00:00 2001 From: JGill Date: Tue, 11 Sep 2018 14:00:13 +0930 Subject: [PATCH 5/6] If "openvpn" is only in root's PATH, don't error out #187 --- openpyn/openpyn.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/openpyn/openpyn.py b/openpyn/openpyn.py index ee265c4..44e537e 100755 --- a/openpyn/openpyn.py +++ b/openpyn/openpyn.py @@ -240,8 +240,18 @@ def run(init: bool, server: str, country_code: str, country: str, area: str, tcp # check if dependencies are installed if shutil.which("openvpn") is None or shutil.which("wget") is None or shutil.which("unzip") is None: - logger.error("Please Install 'openvpn' 'wget' 'unzip' first") - return 1 + # In case of Debian Sid where "openvpn" is only in root's PATH, don't error out + try: + root_access = root.verify_root_access( + "Sudo credentials required to check if 'openvpn' is available in root's PATH") + if root_access is False: + root.obtain_root_access() + subprocess.check_output(["sudo", "which", "wget"]) + subprocess.check_output(["sudo", "which", "unzip"]) + # subprocess.check_output(["sudo", "which", "openvpn"]) + except subprocess.CalledProcessError: + logger.error("Please Install 'openvpn' 'wget' 'unzip' first") + return 1 elif daemon: if detected_os != "linux": From 35232823151c96985c2bd3742362df10f7557088 Mon Sep 17 00:00:00 2001 From: JGill Date: Tue, 11 Sep 2018 14:07:08 +0930 Subject: [PATCH 6/6] Verion 2.7.5 --- openpyn/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpyn/__init__.py b/openpyn/__init__.py index c5b5326..e5d466b 100644 --- a/openpyn/__init__.py +++ b/openpyn/__init__.py @@ -3,7 +3,7 @@ import subprocess -__version__ = "2.7.5.dev1" +__version__ = "2.7.5" __license__ = "GNU General Public License v3 or later (GPLv3+)" __data_files__ = [] __basefilepath__ = os.path.dirname(os.path.abspath(__file__)) + "/"