From dc739475d8f9c522b3ac96e2a366f69514151cf5 Mon Sep 17 00:00:00 2001 From: Ali Ghahremani Date: Mon, 7 Feb 2022 23:18:22 +0330 Subject: [PATCH] bug fix: MacOS problem --- install.sh | 2 +- shecan.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 5e6150f..fa7debb 100755 --- a/install.sh +++ b/install.sh @@ -12,7 +12,7 @@ fi # download echo "downloading..." -wget -q -O - https://github.com/ali77gh/shecan-cli/releases/download/1.2.0/shecan.py > temp.py +wget -q -O - https://github.com/ali77gh/shecan-cli/releases/download/1.2.1/shecan.py > temp.py echo "done" # copy diff --git a/shecan.py b/shecan.py index 55bf883..eae5286 100755 --- a/shecan.py +++ b/shecan.py @@ -99,7 +99,7 @@ def local_status() -> bool: def enable(): # backup result = os.popen(f"networksetup -getdnsservers {interface}").read() - f = open(dns_file_bak,"w") + f = open(dns_file_bak_mac,"w") f.write(result) # enable @@ -108,7 +108,7 @@ def enable(): @staticmethod def disable(): - f = open(dns_file_bak,"r") + f = open(dns_file_bak_mac,"r") old_dns = f.read() os.system(f"networksetup -setdnsservers {interface} {old_dns}") pass