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
I want to create a submode for the user to enter a sequence of strings. They are arbitrary strings and not predetermined keywords. The strings should be processed by a supplied function line by line. Can I do this with libcli ?
The text was updated successfully, but these errors were encountered:
Yes, we do this all the time. The 'command' argument of the callback shows what libcli has parsed based on what you've registered. If you have any libcli filters in place those are handled differently. You can use 'cli->filters' to see if there are any filters (if no filters then cli->filters is NULL). The argc/argv pair of arguments show what is left. Note that 'argv[argc]' will be NULL at the end of any user entered 'words'. The following code snippet (warning, typed w/o testing) should show all user entered data after libcli has process the command itself, and will include any filters.
int myArgc;
cli_print(cli, "Libcli processed command is -> %s", command);
for (myArgc=argc; argv[myArgc]; myArgc++)
{
cli_print(cli, "Argument %s is -> %d", myArgc, argv[myArgc]);
}
I want to create a submode for the user to enter a sequence of strings. They are arbitrary strings and not predetermined keywords. The strings should be processed by a supplied function line by line. Can I do this with libcli ?
The text was updated successfully, but these errors were encountered: