|
|
@ -77,7 +77,6 @@ def parse_snippet(s: Tuple[str, str]) -> Sequence[Command]:
|
|
|
|
parts = line.split(maxsplit=4)
|
|
|
|
parts = line.split(maxsplit=4)
|
|
|
|
assert parts[3] == '-H', "Insecure sudo?"
|
|
|
|
assert parts[3] == '-H', "Insecure sudo?"
|
|
|
|
user = parts[2]
|
|
|
|
user = parts[2]
|
|
|
|
directory = f'~{user}' # This actually works with SSH. That is nice, since we don't need to know the target's /etc/passwd
|
|
|
|
|
|
|
|
cmd = parts[4]
|
|
|
|
cmd = parts[4]
|
|
|
|
elif line.startswith('sudo'):
|
|
|
|
elif line.startswith('sudo'):
|
|
|
|
parts = line.split(maxsplit=1)
|
|
|
|
parts = line.split(maxsplit=1)
|
|
|
|