update
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
emdee@spm.plastiras.org 2024-02-17 20:33:51 +00:00
parent de1a8bdd0d
commit 11f8169e2b
4 changed files with 28 additions and 10 deletions

View File

@ -16,7 +16,7 @@ check::
install:: install::
${PIP_EXE_MSYS} --python ${PYTHON_EXE_MSYS} install \ ${PIP_EXE_MSYS} --python ${PYTHON_EXE_MSYS} install \
--no-deps \ --no-deps --no-index --find-links=. \
--target ${PREFIX}/lib/python${PYTHON_MINOR}/site-packages/ \ --target ${PREFIX}/lib/python${PYTHON_MINOR}/site-packages/ \
--upgrade . --upgrade .

View File

@ -93,8 +93,15 @@ debugger is a crucial advantage.
Although Tox works over Tor, we do not recommend its usage for Although Tox works over Tor, we do not recommend its usage for
anonymity as it leaks DNS requests due to a 6-year old known security anonymity as it leaks DNS requests due to a 6-year old known security
issue: https://github.com/TokTok/c-toxcore/issues/469 Do not use it for issue: https://github.com/TokTok/c-toxcore/issues/469 unless your Tox client
anonymous communication unless you have a TCP and UDP firewall in place. does hostname lookups before calling Tox (like toxygen does). Otherwise, do not
use it for anonymous communication unless you have a TCP and UDP firewall in place.
The Tox project does not follow semantic versioning so the project may break the
underlying ctypes wrapper at any time; it's not possible to use Tox version numbers
to tell what the API will be. In which case you'll have to go into the tox.py file in
https://git.plastiras.org/emdee/toxygen_wrapper to fix it yourself.
The last tested git commit is 5dd9ee3f65423a4095cacb8396a5d406a27610c7 2024-02-10
Up-to-date code is on https://git.plastiras.org/emdee/toxygen_wrapper Up-to-date code is on https://git.plastiras.org/emdee/toxygen_wrapper

View File

@ -2,7 +2,7 @@
name = "toxygen_wrapper" name = "toxygen_wrapper"
description = "A Python3 ctypes wrapping of c-toxcore into Python." description = "A Python3 ctypes wrapping of c-toxcore into Python."
authors = [{ name = "Ingvar", email = "Ingvar@gitgub.com" } ] authors = [{ name = "Ingvar", email = "Ingvar@gitgub.com" } ]
requires-python = ">3.6" requires-python = ">3.7"
keywords = ["tox", "python3", "ctypes"] keywords = ["tox", "python3", "ctypes"]
classifiers = [ classifiers = [
"License :: OSI Approved", "License :: OSI Approved",
@ -34,7 +34,8 @@ file = "LICENSE.md"
repository = "https://git.plastiras.org/emdee/toxygen_wrapper" repository = "https://git.plastiras.org/emdee/toxygen_wrapper"
[build-system] [build-system]
requires = ["setuptools >= 61.0"] # >= 61.0
requires = ["setuptools >= 0"]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
[tool.setuptools] [tool.setuptools]

View File

@ -10,6 +10,7 @@ import select
import shutil import shutil
import socket import socket
import sys import sys
import logging
import time import time
from typing import Union, Callable, Union from typing import Union, Callable, Union
import warnings import warnings
@ -20,7 +21,6 @@ from stem.control import Controller
from stem.util.tor_tools import is_valid_fingerprint from stem.util.tor_tools import is_valid_fingerprint
global LOG global LOG
import logging
from toxygen_wrapper.tests.support_http import bAreWeConnected from toxygen_wrapper.tests.support_http import bAreWeConnected
warnings.filterwarnings('ignore') warnings.filterwarnings('ignore')
@ -239,7 +239,7 @@ def oMakeController(sSock:str = '', port:int = 9051, password:[str,None] = None)
p = password p = password
else: else:
sys.stdout.flush() sys.stdout.flush()
p = unix_getpass(prompt='Controller Password: ', stream=sys.stderr) p = unix_getpass(prompt='TOR_CONTROLLER_PASSWORD: ', stream=sys.stderr)
controller.authenticate(p) controller.authenticate(p)
oSTEM_CONTROLER = controller oSTEM_CONTROLER = controller
return controller return controller
@ -275,7 +275,7 @@ def oGetStemController(log_level:int = 10, sock_or_pair:str = '/run/tor/control'
p = password p = password
else: else:
sys.stdout.flush() sys.stdout.flush()
p = getpass.unix_getpass(prompt='Controller Password: ', stream=sys.stderr) p = getpass.unix_getpass(prompt='TOR_CONTROLLER_PASSWORD: ', stream=sys.stderr)
controller.authenticate(p) controller.authenticate(p)
oSTEM_CONTROLER = controller oSTEM_CONTROLER = controller
LOG.debug(f"{controller}") LOG.debug(f"{controller}")
@ -569,6 +569,16 @@ def lExitExcluder(oArgs, iPort:int = 9051, log_level:int = 10, password:[str,Non
return exit_excludelist return exit_excludelist
if __name__ == '__main__': if __name__ == '__main__':
target = 'zkaan2xfbuxia2wpf7ofnkbz6r5zdbbvxbunvp5g2iebopbfc4iqmbad' if len(sys.argv) <= 1:
targets = ['zkaan2xfbuxia2wpf7ofnkbz6r5zdbbvxbunvp5g2iebopbfc4iqmbad', # keys.openpgp.org
'facebookwkhpilnemxj7asaniu7vnjjbiltxjqhye3mhbshg7kx5tfyd', # facebook
'libera75jm6of4wxpxt4aynol3xjmbtxgfyjpu34ss4d7r7q2v5zrpyd', # libera
]
else:
targets = sys.argv[1:]
controller = oGetStemController(log_level=10) controller = oGetStemController(log_level=10)
lIntroductionPoints(controller, [target], itimeout=120) for target in targets:
print(target, lIntroductionPoints(controller, [target], itimeout=120))