Execute(Command, Prompt) Failures? - WeOnlyDo Discussion board

Execute(Command, Prompt) Failures? (wodSSH / wodSSH.NET)

by Mike Callaghan, Wednesday, August 03, 2011, 05:52 (4862 days ago)

I ran into a situation today where a command that used to work suddenly stopped, simply because I changed the expected prompt from a non-regex to a regex.

Before:
ssh.Execute( some command , prompt> ); // This works and outputs the results of some command.

After:
ssh.Execute( some command , regex:prompt>|other: ); // This works but displays garbage, specifically 6973657453686f770a

It seems to be correctly discovering the prompt, but my command output has been replaced by something else entirely. I'm at a loss.

Thanks,
Mike

Re: Execute(Command, Prompt) Failures?

by wodDamir, Wednesday, August 03, 2011, 12:51 (4862 days ago) @ Mike Callaghan

Hi Mike,

I just tried this out, however wasn't able to reproduce it. Can you try placing a (backslash) character in front of > ?

Also, perhaps this is some leftover from previous Execute call? Can you try setting DataReady property to 0 before calling Execute?

Regards,
Damba

Re: Execute(Command, Prompt) Failures?

by Mike Callaghan, Wednesday, August 03, 2011, 14:21 (4861 days ago) @ wodDamir

I'll try our your suggestion, but I'm not sure that's it. After posting the question last night, I modified my code to use Send/MultiWaitFor instead of Execute. The String[] I passed to MultiWaitFor didn't contain any regexes. I got the same exact behavior.

Any ideas? Thanks!

Mike

Re: Execute(Command, Prompt) Failures?

by wodDamir, Wednesday, August 03, 2011, 14:38 (4861 days ago) @ Mike Callaghan

Mike,

I honestly can't tell. I would need to connect to the host in question and reproduce this behavior in order to provide more info.

Would this be possible?

If yes, you can send any private info to techsupport@weonlydo.com

Regards,
Damba