Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | NASL SSH doubt from a newbie |
|---|---|
| Date: | Thu, 24 Feb 2005 13:07:45 +0530 |
Hi ,
Sorry to bug you all 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
--
Sometimes i think. Somtimes i am.
-sandy
_______________________________________________
Nessus mailing list
Nessus@list.nessus.org
http://mail.nessus.org/mailman/listinfo/nessus
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | nessus-update-plugins and proxy, erik . windischman |
|---|---|
| Next by Date: | nessus-update-plugins, saverio . ferraro |
| Previous by Thread: | nessus-update-plugins and proxy, erik . windischman |
| Next by Thread: | list sessions error when using: nessus -qxp localhost 1241 bruggn #essurge2 > /tmp/plugins.sql, nj . bruggenkamp |
| Indexes: | [Date] [Thread] [Top] [All Lists] |