Re: Login, su to root, execute command - WeOnlyDo Discussion board

Re: Login, su to root, execute command (General questions)

by kaliorin, Friday, August 19, 2005, 16:06 (6826 days ago) @ kaliorin

hi i solve regex problem... but... i have another trouble

the code below works perfectly in step-by-step debug mode (the goal is to change a password)
but this don't work if y run it without a breakpoint in my code.(and the textbox acting like a log don't display all the text)
is there a problem with the Received() event ?


ssh1.Login= Login ;
ssh1.Password = Password ;
ssh1.Protocol = WeOnlyDo.Client.SSH.SupportedProtocols.SSH2;


this.ssh1.Connect( HostName ,22);
this.textBox1.Text += ssh1.WaitFor( $ );
this.textBox1.Text += this.ssh1.Execute( su -
, regex:[A-z]*[.,!?:...]* );
this.textBox1.Text += ssh1.Receive();


this.textBox1.Text += this.ssh1.Execute( rootpass
, regex:[A-z]*[.,!?:...]* );
this.textBox1.Text += ssh1.Receive();


this.textBox1.Text += this.ssh1.Execute( passwd guyname
, regex:[A-z]*[.,!?:...]* );
this.textBox1.Text += ssh1.Receive();

this.textBox1.Text += ssh1.Execute( Test2360
, regex:[A-z]*[.,!?:...]* );
this.textBox1.Text += ssh1.Receive();


this.textBox1.Text += ssh1.Execute( Test2360
, regex:[A-z]*[.,!?:...]* );
this.textBox1.Text += ssh1.Receive();

ssh1.Disconnect();


Complete thread: