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

avoid plain-text proxy password - read from terminal / input #361

Conversation

ayelet-ack
Copy link

Following up on this issue: #340
Added a way to avoid plain text proxy passwords: you can run chisel client with --proxy user:@<proxy_ip>, and you will be prompt for a password.
alternatively, you can pass the password to chisel this way using pipe.

@ayelet-ack
Copy link
Author

@jpillora could you merge this please? thanks!

pass, _ := u.User.Password()
if pass == "" {
fmt.Print("*** Enter proxy password: ")
if term.IsTerminal(syscall.Stdin) {
Copy link
Owner

@jpillora jpillora Aug 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does terminal case differ from the read line case?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I'm not sure what the difference is (not a GO programmer...).
But when I tried this with just terminal (i.e. just the "if" part w/o else), and I tried to pass the proxy password using pipe:
echo some_password | chisel client ....
I got this error:
client: Connection error: inappropriate ioctl for device
When I googled the issue I found this thread, and the suggested solution worked: golang/go#19909 (comment)
See also here:
golang/go#19909 (comment)

@jpillora
Copy link
Owner

Thanks but i've decided to close this as this feature has the potential to conflict with the stdio remote. I'd consider loading client password from an env var or from a file. Comment here with your idea before you implement it though 👍

@jpillora jpillora closed this Oct 31, 2022
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

Successfully merging this pull request may close these issues.

3 participants