diff --git a/build.sh b/build.sh index c795656..c41428f 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,9 @@ echo "Torghost installer v3.0" echo "Installing prerequisites " -sudo apt-get install tor python3-pip -y +sudo apt-get install tor python3-pip python3-dev -y echo "Installing dependencies " sudo pip3 install -r requirements.txt +PYVER=$(python3 --version | awk '{print$2}' | cut -f 1,2 -d .) mkdir build cd build cython3 ../torghost.py --embed -o torghost.c --verbose @@ -12,7 +13,7 @@ else echo [ERROR] Build failed. Unable to generate C code using cython3 exit 1 fi -gcc -Os -I /usr/include/python3.8 -o torghost torghost.c -lpython3.8 -lpthread -lm -lutil -ldl +gcc -Os -I /usr/include/python${PYVER} -o torghost torghost.c -lpython${PYVER} -lpthread -lm -lutil -ldl if [ $? -eq 0 ]; then echo [SUCCESS] Compiled to static binay else diff --git a/torghost.py b/torghost.py index a72420a..610fb8b 100755 --- a/torghost.py +++ b/torghost.py @@ -184,7 +184,7 @@ def stop_torghost(): os.system('sudo fuser -k 9051/tcp > /dev/null 2>&1') print(bcolors.GREEN + '[done]' + bcolors.ENDC) print(t() + ' Restarting Network manager'), - os.system('service network-manager restart') + os.system('systemctl restart NetworkManager.service') print(bcolors.GREEN + '[done]' + bcolors.ENDC) print(t() + ' Fetching current IP...') time.sleep(3)