tox_wrapper
This commit is contained in:
parent
510e790155
commit
8bf481e6fc
11 changed files with 1501 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,7 +7,6 @@ libs/
|
||||||
*.egg-info
|
*.egg-info
|
||||||
*.log
|
*.log
|
||||||
*.out
|
*.out
|
||||||
*.bak
|
|
||||||
|
|
||||||
.idea
|
.idea
|
||||||
*~
|
*~
|
||||||
|
|
0
__init__.py
Normal file
0
__init__.py
Normal file
|
@ -26,7 +26,6 @@ classifiers = [
|
||||||
"Programming Language :: Python :: 3.11",
|
"Programming Language :: Python :: 3.11",
|
||||||
"Programming Language :: Python :: Implementation :: CPython",
|
"Programming Language :: Python :: Implementation :: CPython",
|
||||||
]
|
]
|
||||||
|
|
||||||
dynamic = ["version", "readme", "dependencies"] # cannot be dynamic ['license']
|
dynamic = ["version", "readme", "dependencies"] # cannot be dynamic ['license']
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
|
@ -44,3 +43,6 @@ build-backend = "setuptools.build_meta"
|
||||||
version = {attr = "tox_profile.__version__"}
|
version = {attr = "tox_profile.__version__"}
|
||||||
readme = {file = ["README.md"]}
|
readme = {file = ["README.md"]}
|
||||||
dependencies = {file = ["requirements.txt"]}
|
dependencies = {file = ["requirements.txt"]}
|
||||||
|
|
||||||
|
#[tool.setuptools.packages.find]
|
||||||
|
#where = "src"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# the versions are the current ones tested - may work with earlier versions
|
# the versions are the current ones tested - may work with earlier versions
|
||||||
ruamel.yaml >= 0.18.5
|
ruamel.yaml >= 0.18.5
|
||||||
msgpack >= 1.0.7
|
xmsgpack >= 1.0.7
|
||||||
coloredlogs >= 15.0.1
|
coloredlogs >= 15.0.1
|
||||||
# optional
|
# optional
|
||||||
# nmap
|
# nmap
|
||||||
|
|
|
@ -19,6 +19,12 @@ keywords='ctypes Tox'
|
||||||
[options]
|
[options]
|
||||||
zip_safe = false
|
zip_safe = false
|
||||||
python_requires = >=3.7
|
python_requires = >=3.7
|
||||||
|
include_package_data =
|
||||||
|
"*" = ["*.txt", "*.bash"]
|
||||||
|
|
||||||
|
[options.entry_points]
|
||||||
|
console_scripts =
|
||||||
|
tox_profile = tox_profile.tox_profile:iMain
|
||||||
|
|
||||||
[easy_install]
|
[easy_install]
|
||||||
zip_ok = false
|
zip_ok = false
|
||||||
|
|
0
src/__init__.py
Normal file
0
src/__init__.py
Normal file
2
src/tox_profile/__init__.py
Normal file
2
src/tox_profile/__init__.py
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
__version__ = "1.0.0"
|
5
src/tox_profile/__main__.py
Normal file
5
src/tox_profile/__main__.py
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
import sys
|
||||||
|
from tox_profile.tox_profile import iMain
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.exit(iMain(sys.argv[1:]))
|
1477
src/tox_profile/tox_profile.py
Normal file
1477
src/tox_profile/tox_profile.py
Normal file
File diff suppressed because it is too large
Load diff
|
@ -939,16 +939,19 @@ def lNodesCheckNodes(json_nodes, oArgs, bClean=False):
|
||||||
|
|
||||||
# fixme look for /etc/tor/torrc but it may not be readable
|
# fixme look for /etc/tor/torrc but it may not be readable
|
||||||
if bHAVE_TOR and os.path.exists('/etc/tor/torrc'):
|
if bHAVE_TOR and os.path.exists('/etc/tor/torrc'):
|
||||||
|
# get from torrc
|
||||||
|
address_range = '172.16.1' # 127.192.0
|
||||||
# print(sBLURB)
|
# print(sBLURB)
|
||||||
LOG.info("Add this section to your /etc/tor/torrc")
|
LOG.info("Add this section to your /etc/tor/torrc")
|
||||||
for line in lONION_CONFIG['vadr']:
|
for line in lONION_CONFIG['vadr']:
|
||||||
print(line)
|
print(line)
|
||||||
if lOnions:
|
if lOnions:
|
||||||
LOG.info("Add this section to your /etc/tor/torrc")
|
LOG.info("Add this section to your /etc/tor/torrc")
|
||||||
|
print('VirtualAddrNetwork {address_range}.0/10')
|
||||||
i = 1
|
i = 1
|
||||||
for line in lOnions:
|
for line in lOnions:
|
||||||
hosts = line.split(':')
|
hosts = line.split(':')
|
||||||
print(f"MapAddress {hosts[0]} 172.16.1.{i}")
|
print(f"MapAddress {hosts[0]} {address_range}.{i}")
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
if bClean:
|
if bClean:
|
||||||
|
|
|
@ -216,6 +216,7 @@ for the_json in $json ; do
|
||||||
done
|
done
|
||||||
|
|
||||||
i=4
|
i=4
|
||||||
|
##
|
||||||
[ $# -ne 0 -a "$1" -ne $i ] || \
|
[ $# -ne 0 -a "$1" -ne $i ] || \
|
||||||
[ "$HAVE_TOR" = 0 ] || \
|
[ "$HAVE_TOR" = 0 ] || \
|
||||||
[ ! -f /etc/tor/torrc ] || \
|
[ ! -f /etc/tor/torrc ] || \
|
||||||
|
@ -250,6 +251,7 @@ for the_tox in /etc/tor/torrc ; do
|
||||||
ip route | grep ^def || exit 0
|
ip route | grep ^def || exit 0
|
||||||
|
|
||||||
i=5
|
i=5
|
||||||
|
##
|
||||||
the_tox=$tox
|
the_tox=$tox
|
||||||
[ $# -ne 0 -a "$1" != "$i" ] || \
|
[ $# -ne 0 -a "$1" != "$i" ] || \
|
||||||
[ "$HAVE_JQ" = 0 ] || \
|
[ "$HAVE_JQ" = 0 ] || \
|
||||||
|
@ -283,6 +285,7 @@ for the_tox in $tox $OUT.save ; do
|
||||||
done
|
done
|
||||||
|
|
||||||
i=6
|
i=6
|
||||||
|
##
|
||||||
[ $# -ne 0 -a "$1" != "$i" ] || \
|
[ $# -ne 0 -a "$1" != "$i" ] || \
|
||||||
[ "$HAVE_JQ" = 0 ] || \
|
[ "$HAVE_JQ" = 0 ] || \
|
||||||
! INFO $i Eating dogfood || \
|
! INFO $i Eating dogfood || \
|
||||||
|
|
Loading…
Reference in a new issue