Skip to content
This repository was archived by the owner on Mar 12, 2021. It is now read-only.
Open

Fixes #120

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion torghost.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down