1
0
Fork 0

Sudo should not change directory

master
LEdoian 5 years ago
parent 461dd8c157
commit 724f69c288

@ -77,7 +77,6 @@ def parse_snippet(s: Tuple[str, str]) -> Sequence[Command]:
parts = line.split(maxsplit=4)
assert parts[3] == '-H', "Insecure sudo?"
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]
elif line.startswith('sudo'):
parts = line.split(maxsplit=1)

Loading…
Cancel
Save