I have some remediation scripts that are run when a device is out of compliance (i.e. missing a section of config)
We use a lot of MikroTik routers, And a lot of these rely on pasting in blocks of code at a time by opening and then closing a section in curly braces, rather than line by line (which won't work, the whole block needs to be executed as a single statement)
I think the problem is because NCM is waiting for a character to signal "Ok you're allowed to type now" and that character is usually a > symbol with a space
i.e.
would be the prompt after logging in, or after executing any command
But when using a curly braces the prompt is different, if I type { then I get this after every command until closed with a }
as a prompt. And I think NCM is waiting for a > before typing anything else
Small scripts of only a few lines do work albeit very slowly. When trying to run scripts of only a dozen or so lines it takes forever or just times out entirely
How do I get around this? Or modify what NCM see's as a valid prompt is to continue pasting commands