> Hi, > > I've not actually done SSH with NASL yet. Probably > best asking on > plugins-writes@private > > Take it easy, > > Paul > > > > Sandeep Garg wrote: > > >Hi , > >Sorry to bug you but I'm new to NASL and my first > attempt to write a > >useful NASL script failed :( > > > >I've a problem regarding executing SSH commands in > NASl. > >I want to read a file on a remote machine using SSH > from my nasl program. > >Here is what i wrote: > >########################################################## > > ssh_login > (socket:soc,login:"nsroot",password:"nsroot",pub:NULL,priv:NULL,passphrase:NULL); > > > >cmd1=ssh_cmd(socket:soc, cmd:"shell", timeout:5); > >display('\ncmd1:',cmd1); > > > >buf = ssh_cmd(socket:soc, cmd:"cat myfile", > timeout:5); > >display('\nbuf:',buf); > >############################################################ > > > >i got the following output : > >cmd1: > >buf: Done > >ERROR: No such command > >------------------------------------------------------------------------------------- > >i know the second command(cat myfile ) is not > reaching the new shell > >which is forked, > >but i've tried a lot ,i still cudn't find out how > to execute commands > >on that newly forked shell. > >Someone please help me. I know its a silly doubt. > >If it cannot be done plz help me on how to read > files from a remote > >machine using SSH in a nasl program. > >Thanks > > > > > > ===== ------------------------------------------- "I'm gonna live forever, or die trying." *(`'·.¸(`'·.¸*!!~Sandy~!!*¸.·'´)¸.·'´)* __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo _______________________________________________ Plugins-writers mailing list Plugins-writers@private http://mail.nessus.org/mailman/listinfo/plugins-writers
This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 05:03:25 PST