mirror of
https://github.com/clearml/dropbear
synced 2025-06-26 18:17:32 +00:00
sync github July 2024
This commit is contained in:
@@ -9,9 +9,12 @@ def test_reexec(request, dropbear):
|
||||
This indicates that re-exec makes ASLR work
|
||||
"""
|
||||
map_script = (Path(request.node.fspath).parent / "parent_dropbear_map.py").resolve()
|
||||
# run within the same venv, for python deps
|
||||
activate = own_venv_command()
|
||||
cmd = f"{activate}; {map_script}"
|
||||
if activate == "":
|
||||
cmd = map_script
|
||||
else:
|
||||
# run within the same venv, for python deps
|
||||
cmd = f"{activate}; {map_script}"
|
||||
print(cmd)
|
||||
r = dbclient(request, cmd, capture_output=True, text=True)
|
||||
map1 = r.stdout.rstrip()
|
||||
|
||||
@@ -21,11 +21,12 @@ def dropbear(request):
|
||||
|
||||
# split so that "dropbearmulti dropbear" works
|
||||
args = opt.dropbear.split() + [
|
||||
"-p", LOCALADDR, # bind locally only
|
||||
"-p", LOCALADDR + ":" + opt.port, # bind locally only
|
||||
"-r", opt.hostkey,
|
||||
"-p", opt.port,
|
||||
"-F", "-E",
|
||||
]
|
||||
print("subprocess args: ", args)
|
||||
|
||||
p = subprocess.Popen(args, stderr=subprocess.PIPE, text=True)
|
||||
# Wait until it has started listening
|
||||
for l in p.stderr:
|
||||
@@ -49,6 +50,7 @@ def dbclient(request, *args, **kwargs):
|
||||
if opt.user:
|
||||
base_args.extend(['-l', opt.user])
|
||||
full_args = base_args + list(args)
|
||||
print("subprocess args: ", full_args)
|
||||
bg = kwargs.get("background")
|
||||
if "background" in kwargs:
|
||||
del kwargs["background"]
|
||||
|
||||
@@ -7,7 +7,6 @@ keytypes = [
|
||||
"rsa", "rsa-4096",
|
||||
"ed25519",
|
||||
"ecdsa", "ecdsa-256", "ecdsa-384", "ecdsa-521",
|
||||
"dss",
|
||||
]
|
||||
|
||||
def parse_keytype(kt):
|
||||
|
||||
Reference in New Issue
Block a user