-
Notifications
You must be signed in to change notification settings - Fork 257
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
ValueError when connecting via loopback #159
Comments
I have seen this before. |
Using the port 1337, you may receive something similar to |
Per the Python This should be relatively easy to fix. The flow info and scope ID aren't important in this context so I'm pretty sure we can safely ignore them. |
I did thought about fixing it 😁 , but I thought who is using |
Bug Description
This is normally only a testing problem, as practically, you aren't often connecting to localhost. That being said, when connecting to a bind shell on the local machine, pwncat is unable to use
localhost
. Getting the peer name from the socket apparently results in a different return value for the loopback device vice a normal IP address.You can use
127.0.0.1
, and it works just fine. This should be relatively easy to test/fix. I just need to figure out what exactly the expected return value is for a loopback device.pwncat version
Provide the output of
pwncat --version
or a commit hash if working froma development branch.
Target System (aka "victim")
My local machine, which is an Arch Linux host.
Steps to Reproduce
Steps to reproduce the behavior:
ncat -e /bin/bash -klnvp 4444
pwncat localhost 4444
Expected Behavior
A connection is established in the same way as using
127.0.0.1
in place oflocalhost
.The text was updated successfully, but these errors were encountered: