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

pwncat fails if which is not available #193

Closed
fdellwing opened this issue Sep 17, 2021 · 0 comments · Fixed by #198
Closed

pwncat fails if which is not available #193

fdellwing opened this issue Sep 17, 2021 · 0 comments · Fixed by #198
Labels
bug Something isn't working

Comments

@fdellwing
Copy link

Bug Description

If a target has no which command (even though it is a shell built-in), pwncat fails with connection failed: no avialable pty methods

❯ python3 -m pwncat -lp 3306
[08:57:02] Welcome to pwncat 🐈!                                                                                                                                                                                              __main__.py:143
[08:57:13] received connection from 192.168.106.105:48596                                                                                                                                                                          bind.py:57
[08:57:14] 0.0.0.0:3306: normalizing shell path                                                                                                                                                                                manager.py:504
[08:57:16] 192.168.106.105:48596: registered new host w/ db                                                                                                                                                                    manager.py:504
[08:57:18] connection failed: no avialable pty methods                                                                                                                                                                         manager.py:504
(local) pwncat$

pwncat version

❯ python3 -m pwncat --version
0.4.3

Target System (aka "victim")

Arch 1.4
Box is : PG Nukem

Steps to Reproduce

  1. Try to catch a reverse shell

Expected Behavior

pwncat works

I would suggest a fallback to whereis to locate a pty.

which python
/bin/bash: line 5: which: command not found
whereis python
python: /usr/bin/python3.8 /usr/bin/python /usr/bin/python3.8-config /usr/lib/python3.8 /usr/lib/python2.7 /usr/include/python3.8 /usr/share/man/man1/python.1.gz

Screenshots

@fdellwing fdellwing added the bug Something isn't working label Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant