【匿名通信】在Debian上安装运行tor和nyx并使用stem库

#1.安装运行tor
apt-get install tor 

#2.安装python
apt-get install python-pip

#3.更新全部pip库,写一个更新脚本
vim pipupgrade.py

import pip
from subprocess import call
 
for dist in pip.get_installed_distributions():
    call("pip install --upgrade " + dist.project_name, shell=True)
python pipupgrade.py

#4.安装 stem和pymysql
pip install stem pymysql

#5.在目录/etc/tor下添加多用户base配置文件torrc.1
#如果只有单用户这步可以不要
vim /etc/tor/torrc.1
SocksPort 9060
ControlPort 9061
DataDirectory /var/lib/tor1
CookieAuthentication 1
#6.安装nyx
apt-get update
apt-get upgrade

pip install nyx 

#7.运行nyx

nyx



#重启tor
kill pidoftor
/usr/bin/tor