From 96c453607febc849a1da3dd9ce3ab573d52cb7ed Mon Sep 17 00:00:00 2001 From: "emdee@spm.plastiras.org" Date: Tue, 16 Jan 2024 14:54:24 +0000 Subject: [PATCH] improvements --- .gitignore | 1 + Makefile | 3 +++ exclude_badExits.txt | 21 ++++++++++++++++++++- pyproject.toml | 6 ++++-- setup.py => setup.py.dst | 0 5 files changed, 28 insertions(+), 3 deletions(-) rename setup.py => setup.py.dst (100%) diff --git a/.gitignore b/.gitignore index 67cb84b..abf54f1 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ __pycache__/ *~ *.junk +*.bak *.dst # C extensions diff --git a/Makefile b/Makefile index 2680d38..043d546 100644 --- a/Makefile +++ b/Makefile @@ -21,5 +21,8 @@ doctest:: export PYTHONPATH=${PWD}/src/${MOD} ${DOCTEST} ${MOD}.txt +veryclean:: clean + rm -rf build dist + clean:: find * -name \*~ -delete diff --git a/exclude_badExits.txt b/exclude_badExits.txt index 3e82530..7a41210 100644 --- a/exclude_badExits.txt +++ b/exclude_badExits.txt @@ -16,7 +16,26 @@ The basic idea is to exclude Exit nodes that do not have ContactInfo: That can be extended to relays that do not have an email in the contact, or to relays that do not have ContactInfo that is verified to include them. -Pass the controller password if needed as an environment variable: +You can see the status of tor relays at https://torstatus.rueckgr.at/ +The code for that site is at https://github.com/paulchen/torstatus +You can get a list of exit relays that are marked bad with: +wget --post-data='SR=FBadExit&SO=Asc&FBadExit=1' 'https://torstatus.rueckgr.at/' + +It is assumed that you are running a tor that has its torrc configured with: + +ControlPort 127.0.0.1:9051 + +and/or + +ControlSocket /run/tor/control +ControlSocketsGroupWritable 1 + +and + +HashedControlPassword 16:B4155E403F37446360B30D0481C3BB03C083F0E3BB689883A3838E4692 + +so that you have some security on the Control connection. +Pass the controller password to these scripts as an environment variable: >>> import os >>> assert os.environ['TOR_CONTROLLER_PASSWORD'] diff --git a/pyproject.toml b/pyproject.toml index 1004d82..cc95c4d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,13 +18,15 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", ] dynamic = ["version", "readme", ] # cannot be dynamic ['license'] -scripts = { exclude_badExits = "exclude_badExits.exclude_badExits:iMain" } dependencies = [ - 'qasync >= 0.27.1', +# 'qasync >= 0.27.1', 'cryptography >= 41.0.7', 'rsa >= 4.9', 'stem >= 1.8.2'] +[project.scripts +exclude_badExits = "exclude_badExits.exclude_badExits:iMain" + [tool.setuptools.dynamic] version = {attr = "exclude_badExits.__version__"} readme = {file = ["README.md"]} diff --git a/setup.py b/setup.py.dst similarity index 100% rename from setup.py rename to setup.py.dst