Mailing List Archive

Write Nessus Plugins with NASL
> Afternoon,
>
> I tried the command 'info_send_cmd(cmd: "cmd /C ver")' in the script.
> However I got the following error message all the time.
> Is anybody able to explain me where I'm wrong, please?
>
> Much appreciated!
>
>
> [852]() NASL> [08590ac8] <- "cmd /C ver"
> [852](windows_check.nasl) NASL> Call info_send_cmd(cmd: "cmd /C ver")
> NASL:0129> local_var ...
> NASL:0154> if (info_t == INFO_LOCAL) { ... }
> [852](windows_check.nasl) NASL> [08590208] -> 0
> [852](windows_check.nasl) NASL> [085902c8] -> 1
> NASL:0159> if (info_t == INFO_SSH) { ... }
> [852](windows_check.nasl) NASL> [08590208] -> 0
> [852](windows_check.nasl) NASL> [08590320] -> 2
> NASL:0163> if (info_t == INFO_RSH) { ... }
> [852](windows_check.nasl) NASL> [08590208] -> 0
> [852](windows_check.nasl) NASL> [08590350] -> 3
> NASL:0168> if (info_t == INFO_REXEC) { ... }
> [852](windows_check.nasl) NASL> [08590208] -> 0
> [852](windows_check.nasl) NASL> [08590380] -> 4
> NASL:0190> if (info_t == INFO_TELNET) { ... }
> [852](windows_check.nasl) NASL> [08590208] -> 0
> [852](windows_check.nasl) NASL> [085903e8] -> 6
> NASL:0190> return NULL;
> [852](windows_check.nasl) NASL> Return info_send_cmd: FAKE
> [852]() NASL> [08590790] <- undef
> NASL:0079> exit(...)
>
>
> Thomas Nguyen Van (CEH) | OneIT Technical Security Consultant | OneIT
> Operations | BT |
> E: thomas.nguyenvan@bt.com |Mobile: +353 86 1720 692 | Fax: +353 1 432
> 5899| www.btireland.com <www.btireland.com>
>
>
>
>
>
BT Communications Ireland Limited
is a wholly owned subsidiary of BT Group plc
Registered in Ireland, Registration No. 141524
Grand Canal Plaza, Upper Grand Canal Street, Dublin, Ireland

This electronic message contains information (and may contain files) from BT
Communications Ireland Limited which may be privileged or confidential. The
information is intended to be for the sole use of the individual(s) or
entity named above. If you are not the intended recipient be aware that any
disclosure, copying, distribution or use of the contents of this information
and or files is prohibited. If you have received this electronic message in
error, please notify us by telephone or email (to the numbers or address
above) immediately. http://www.btireland.ie
Re: Write Nessus Plugins with NASL [ In reply to ]
On Feb 1, 2007, at 3:42 PM, Thomas Nguyen Van wrote:

>
>
>
> Afternoon,
>
> I tried the command 'info_send_cmd(cmd: "cmd /C ver")' in the
> script. However I got the following error message all the time.
Are you trying to execute arbitrary commands on the remote windows
host via SMB or are you sure you want to do this via SSH ?

The function you're using (info_send_cmd()) is a bit specific to
ssh_get_info.nasl and depends on how the plugins are configured when
run from within nessusd, so I'd not necessarily advise to use it.

What are you trying to achieve exactly ?



-- Renaud

_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers