You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our app is basically doing this. It is assigned as the user shell so it is invoked on login. Additionally we’re explicitly forking so the ‘parent’ thread intercepts single characters from the user and funnels them to the ‘child’ process. The child uses the input socket from the parent as ‘sockfd’ when calling cli_loop(). Our parent process additionally can handle some more involved user interactions coming backup from the child (enhanced login prompts, ‘pagination’ features, and so on) in addition to dealing with ctrl-c (SIG_INT) as both a ‘cancel the current prompt’ and ‘cancle any running command called from a libcli callback.
Speaking of pagination I have a long term goal of baking pagination directly into libcli (responding both to telnet control chars and sigwinch for dynamic changes and also direct user overrides). Our app does pagination right now, but we handle it internally before calling cli_print() to display it.
Also working on options and argument processing for commands that supports tab completions and help messages. If our internal devs like what I’ve done that work will be pushed back to David for possible inclusion. I’ve tried to keep him in the loop so he knows what I’m doing.
--
ROBERT SANDERS
Sr. Secure Systems Engineer
FORCEPOINT
T +1.703.896.4762
F +1.703.318.5041
www.forcepoint.com
FORWARD WITHOUT FEAR
From: brjoha <notifications@github.com>
Reply-To: dparrish/libcli <reply@reply.github.com>
Date: Monday, July 8, 2019 at 6:32 PM
To: dparrish/libcli <libcli@noreply.github.com>
Cc: Rob Sanders <rsanders@forcepoint.com>, Comment <comment@noreply.github.com>
Subject: EXTERNAL: Re: [dparrish/libcli] ssh support (#42)
I have a use case where the CLI needs to be embedded in an application and accessed via a secured path like SSH. I'm thinking to standup a socketpair between the secured endpoint and the CLI endpoint to accomplish this.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#42?email_source=notifications&email_token=AHHFTFZKMAYVYAUK6JOVPE3P6O565A5CNFSM4HGZGGI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZORFGI#issuecomment-509416089>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AHHFTF3BP6LJSKAB74GGOW3P6O565ANCNFSM4HGZGGIQ>.
Hi @RobSanders!
What about your long term goals of making pagination directly into libcli and supports tab completions for options and arguments of commands?
Hi @illukin ,
Pagination support is still a long way off, but tab completors for options and arguments are already in place. Look at the clitest.c code for some example. There are some quirks, but we've been using them in our main product for almost 4 years.
Yes. Been making some improvements on our side for processing sigints as well as sniffing the responses to our commands before doing cli_prints() back to the users. For example, if the CLI side callback issues a command that generates prompts, we currently need to intercept those and 'redisplay' them slightly different back to the user.
Activity
RobSanders commentedon Apr 22, 2019
Our libcli based application (running on Linux) is set as the 'shell' of our users, so it starts running as they log in, whether from Console or ssh.
RobSanders commentedon Jul 8, 2019
illukin commentedon Jul 24, 2023
Hi @RobSanders!
What about your long term goals of making pagination directly into libcli and supports tab completions for options and arguments of commands?
RobSanders commentedon Jul 24, 2023
Hi @illukin ,
Pagination support is still a long way off, but tab completors for options and arguments are already in place. Look at the clitest.c code for some example. There are some quirks, but we've been using them in our main product for almost 4 years.
illukin commentedon Jul 24, 2023
Ok. Are you still using the approach that you explained above to connect via ssh, but not telnet?
RobSanders commentedon Jul 24, 2023
Yes. Been making some improvements on our side for processing sigints as well as sniffing the responses to our commands before doing cli_prints() back to the users. For example, if the CLI side callback issues a command that generates prompts, we currently need to intercept those and 'redisplay' them slightly different back to the user.
RobSanders commentedon Jul 24, 2023
Those changes are outside of libcli code.