Send "?" command to the RouterOs throw SSH

Caugh

OK, I feel I must intervene here to clarify some things for anyone willing to help… I am the teacher who gave that assignment, and the task is basically to do a stand alone application (in whatever language) that does what this post describes, but with a custom structured format, rather than Sublime Text’s format.

The “?” help doesn’t have an API equivalent, so using the API is not an option… oh, if only it was…

It’s a little more difficult than I originally thought it would be, because as my student has discovered, “?” is not a command in the classic sense of the term, and all SSH libraries (that either of us knows) can’t really “handle it”… as in “let you read the output of a ? press”.

With regards to actually making it work… I’ve stumbled on the expect PHP extension, which I think may work, as long as you don’t fwrite() the carriage return. Though it works only on Linux (which is cringe worthy, and I really REALLY wanted for this to be cross platform, or at the very least, Windows only), due to the limited time left, I’m willing to allow even a Linux only variant.

But even if we pass the deadline… I’d personally be interested in any better solutions that anyone might offer. Ideally, one that is cross platform.