Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError in ssh.py #9

Open
samari-k opened this issue May 14, 2024 · 1 comment
Open

TypeError in ssh.py #9

samari-k opened this issue May 14, 2024 · 1 comment

Comments

@samari-k
Copy link

Using trevorspray with --ssh on python 3.12 raises the following error:

[ERRR] Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/trevorspray/cli.py", line 285, in main
    sprayer = TrevorSpray(options)
              ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/trevorspray/lib/trevor.py", line 58, in __init__
    proxy = ProxyThread(
            ^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/trevorspray/lib/proxy.py", line 66, in __init__
    self.proxy.start()
  File "/usr/lib/python3.12/site-packages/trevorproxy/lib/ssh.py", line 49, in start
    self.command = b" ".join(self.sh.cmd)
                   ^^^^^^^^^^^^^^^^^^^^^^
TypeError: sequence item 0: expected a bytes-like object, str found

Changing the lines 49 and 98 in lib/ssh.py fixed it for me. Here is the diff:

49c49
<             self.command = b" ".join(self.sh.cmd).decode()
---
>             self.command = " ".join(self.sh.cmd).encode()
98c98
<             log.debug(f'Waiting for {" ".join([x.decode() for x in self.sh.cmd])}')
---
>             log.debug(f'Waiting for {" ".join([x for x in self.sh.cmd])}')
@samari-k
Copy link
Author

This only seems to be an issue when installing via the BlackArch repository / pacman. No problem though when installing with pipx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant