Hi.
Can anyone tell me why the following code breaks on *broken_buf* below?
Note that the script is currently unsigned, though the Nessus server is
configured to ignore sigs at the moment.
Cheers.
James.
---
function do_cmd(sock, cmd, timeout) {
buf = "";
if ( islocalhost() ) {
argv = split(cmd, sep:' ');
===> broken_buf = pread(cmd:argv[0], argv:argv);
buf = pread(cmd:"uname", argv:argv);
} else
buf = ssh_cmd(socket:sock, cmd:cmd,
timeout:timeout);
security_note(data:buf);
} # end do_cmd()
sock = ssh_login_or_reuse_connection();
do_cmd(sock:sock, cmd:"uname -o", timeout:60);
ssh_close_connection();
--
James A Webb Bus. +27 (12) 4600880
Mob. +27 (82) 6808202
SensePost Information Security Developer Fax. +27 (12) 4600885
http://www.sensepost.com/pgp/james.txt PO Box 176, Groenkloof 0027
Can anyone tell me why the following code breaks on *broken_buf* below?
Note that the script is currently unsigned, though the Nessus server is
configured to ignore sigs at the moment.
Cheers.
James.
---
function do_cmd(sock, cmd, timeout) {
buf = "";
if ( islocalhost() ) {
argv = split(cmd, sep:' ');
===> broken_buf = pread(cmd:argv[0], argv:argv);
buf = pread(cmd:"uname", argv:argv);
} else
buf = ssh_cmd(socket:sock, cmd:cmd,
timeout:timeout);
security_note(data:buf);
} # end do_cmd()
sock = ssh_login_or_reuse_connection();
do_cmd(sock:sock, cmd:"uname -o", timeout:60);
ssh_close_connection();
--
James A Webb Bus. +27 (12) 4600880
Mob. +27 (82) 6808202
SensePost Information Security Developer Fax. +27 (12) 4600885
http://www.sensepost.com/pgp/james.txt PO Box 176, Groenkloof 0027