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

libcli with nc #39

Open
mouneshb opened this issue Nov 20, 2018 · 3 comments
Open

libcli with nc #39

mouneshb opened this issue Nov 20, 2018 · 3 comments

Comments

@mouneshb
Copy link

Can we make libcli to work with 'nc - netcat ' ? I tried connecting with nc, it connects but output is not displayed.

@RobSanders
Copy link
Collaborator

It can, mostly, but you need to ensure you are using CRLF as the terminators and disable line buffering. From linux this works to talk to the clitest program.

stty_orig=ssty -g ; stty -echo -icanon ; nc localhost 8000; stty $stty_orig

Not sure of the windows equivalent.

@RobSanders
Copy link
Collaborator

The above keeps a copy of the existing terminal characteristics, disables local echo and special character processing (and ensures chars are sent one at a time instead of line at a time), then invokes netcat with telnet prompts and CRLF line terminators, and finally restores the terminal settings when done.

@pengtianabc
Copy link

use socat:
socat -,rawer TCP:127.0.0.1:8000

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

3 participants