Anyway to filter output as stdout or stderr?

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
Memnarch
Posts: 5
Joined: Tue 04 Oct 2011 08:12

Anyway to filter output as stdout or stderr?

Post by Memnarch » Tue 04 Oct 2011 08:23

Hello,
Iam new to SecureBridge and tried the trial.
So far i havent found a way to see if an output message is from stdout or stderr.

Currently looking for SHH components in Delphi and Securebridge is one of the components iam testing for an upcoming project. Other components feature an extra stream for stdout and stderr. Its important for me to know if a message is from stderr.

I could pipe the stderr to a file and read that, but thats a not so nice workaround.

Server is Using OpenSSH(Debian)


Greetings
Memnarch

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 05 Oct 2011 10:21

At the moment SecureBridge does not support output message is from stdout or stderr. The TScSSHClient and TScSSHChannel components proccess all necessary inforamtion and raise error in appropriate situations. Please describe in more details what infomation you can process using these streams.

Memnarch
Posts: 5
Joined: Tue 04 Oct 2011 08:12

Post by Memnarch » Fri 07 Oct 2011 11:34

Please describe in more details what infomation you can process using these streams.
Hope i understood the question^^"

For example IPWorks' component has a stream for STDerr and STDout.
After executing a command, i can read those streams seperated.
The stderr only contains all error messages from the SSH-Shell
The stdout only contains non stderr messages from the SSH-Shell

Quite usefull when i need to know if an error ocured to give feedback, since exitcode only contains the code from the command.
Or for logging.

Dont know how they did it(maybe they pipe it to a temporary file, too?)

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 11 Oct 2011 09:23

To get data from the stdout stream you can use the TScSSHShell.ReadString or TScSSHShell.ReadBuffer methods.

At the moment SecureBridge does not support output message from stderr. We will investigate the possibility of adding this functionality in the future.

Post Reply