mirror of
https://github.com/calebstewart/pwncat.git
synced 2024-11-27 19:04:15 +01:00
fix: Fixes issue #245, incorrect 'shlex.join' usage
The issue was being caused by the `args` list containing non-str type objects (e.g. RemotePath(...))
This commit is contained in:
parent
49b23fd8bc
commit
9d1aff43fc
@ -1111,7 +1111,7 @@ class Linux(Platform):
|
||||
)
|
||||
|
||||
if isinstance(args, list):
|
||||
command = shlex.join(args)
|
||||
command = shlex.join(str(arg) for arg in args)
|
||||
elif isinstance(args, str):
|
||||
command = args
|
||||
else:
|
||||
|
@ -146,7 +146,7 @@ def human_readable_delta(seconds):
|
||||
|
||||
|
||||
def join(argv: List[str]):
|
||||
"""Join the string much line shlex.join, except assume that each token
|
||||
"""Join the string much like shlex.join, except assume that each token
|
||||
is expecting double quotes. This allows variable references within the
|
||||
tokens."""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user