This commit is contained in:
parent
de1a8bdd0d
commit
11f8169e2b
2
Makefile
2
Makefile
@ -16,7 +16,7 @@ check::
|
||||
|
||||
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/ \
|
||||
--upgrade .
|
||||
|
||||
|
11
README.md
11
README.md
@ -93,8 +93,15 @@ debugger is a crucial advantage.
|
||||
|
||||
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
|
||||
issue: https://github.com/TokTok/c-toxcore/issues/469 Do not use it for
|
||||
anonymous communication unless you have a TCP and UDP firewall in place.
|
||||
issue: https://github.com/TokTok/c-toxcore/issues/469 unless your Tox client
|
||||
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
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
name = "toxygen_wrapper"
|
||||
description = "A Python3 ctypes wrapping of c-toxcore into Python."
|
||||
authors = [{ name = "Ingvar", email = "Ingvar@gitgub.com" } ]
|
||||
requires-python = ">3.6"
|
||||
requires-python = ">3.7"
|
||||
keywords = ["tox", "python3", "ctypes"]
|
||||
classifiers = [
|
||||
"License :: OSI Approved",
|
||||
@ -34,7 +34,8 @@ file = "LICENSE.md"
|
||||
repository = "https://git.plastiras.org/emdee/toxygen_wrapper"
|
||||
|
||||
[build-system]
|
||||
requires = ["setuptools >= 61.0"]
|
||||
# >= 61.0
|
||||
requires = ["setuptools >= 0"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.setuptools]
|
||||
|
@ -10,6 +10,7 @@ import select
|
||||
import shutil
|
||||
import socket
|
||||
import sys
|
||||
import logging
|
||||
import time
|
||||
from typing import Union, Callable, Union
|
||||
import warnings
|
||||
@ -20,7 +21,6 @@ from stem.control import Controller
|
||||
from stem.util.tor_tools import is_valid_fingerprint
|
||||
|
||||
global LOG
|
||||
import logging
|
||||
from toxygen_wrapper.tests.support_http import bAreWeConnected
|
||||
|
||||
warnings.filterwarnings('ignore')
|
||||
@ -239,7 +239,7 @@ def oMakeController(sSock:str = '', port:int = 9051, password:[str,None] = None)
|
||||
p = password
|
||||
else:
|
||||
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)
|
||||
oSTEM_CONTROLER = controller
|
||||
return controller
|
||||
@ -275,7 +275,7 @@ def oGetStemController(log_level:int = 10, sock_or_pair:str = '/run/tor/control'
|
||||
p = password
|
||||
else:
|
||||
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)
|
||||
oSTEM_CONTROLER = 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
|
||||
|
||||
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)
|
||||
lIntroductionPoints(controller, [target], itimeout=120)
|
||||
for target in targets:
|
||||
print(target, lIntroductionPoints(controller, [target], itimeout=120))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user