vb.net - Process waiting for input, Get all standard output? - Visual Basic -


i have process ssh's unix server. trying standard output of process if given incorrect credentials. in case, program waits user input correct password (indicating 1 given argument invalid). expected result of following string:

using keyboard-interactive authentication. password:

i know expected because have piped standard output file, ran program in command line. however, running problem whatever reason, standard output give me first line, , hang. prints out using keyboard-interactive authentication not password:

here code:

dim stdoutput = new stringbuilder()  public sub startprocess(processname string, id string, unixserver string, pw string)       dim process process = new process()     process.startinfo.filename = processname     process.startinfo.arguments = "-ssh " & id & "@" & unixserver & " -pw " & pw     process.startinfo.useshellexecute = false     process.startinfo.createnowindow = true     process.startinfo.redirectstandardoutput = true       addhandler process.outputdatarecieved, addressof outputhandler     process.start()     process.beginoutputreadline()     'wait 3 seconds give process chance standard output     process.waitforexit(3000)     console.writeline(stdoutput.tostring())  end sub  public sub outputhandler(process object, outline datareceivedeventargs)     stdoutput.append(outline.data) end sub 

this print out using keyboard-interactive authentication. not password: appreciated.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -