Mailing List Archive

Reporting File Versions
All,

I am a novice as they come with writing NASLs, though I know programming in
general. I'm attempting to write a NASL script that would retrieve a file
version and return that version for reporting (i.e. security_note). Could
someone point me in the right direction?
To be more precise, I'm trying to do something like this.

local_var file, version, path;
file = "ping.exe";
path = "\system32";
version = call_some_function (file:file, path:path);
security_note(data: string ("The file (",file,") has a version of ",
version));

Thanks for your help!

_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: Reporting File Versions [ In reply to ]
On Fri, 3 Feb 2006, Paul Bellefeuille wrote:

> All,
>
> I am a novice as they come with writing NASLs, though I know programming in
> general. I'm attempting to write a NASL script that would retrieve a file
> version and return that version for reporting (i.e. security_note). Could
> someone point me in the right direction?
> To be more precise, I'm trying to do something like this.
>
> local_var file, version, path;
> file = "ping.exe";
> path = "\system32";
> version = call_some_function (file:file, path:path);
> security_note(data: string ("The file (",file,") has a version of ",
> version));

There is a Tenable licensed function (i.e. not in the GPL feed) called
GetFileVersion that is in smb_func.inc that might help you. Take a look at
realplayer_detect.nasl for example on usage.

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