Mailing List Archive

GetFileVersionEx & child structures
Hi All,

After a long while I started playing again with the new
GetFileversionEx() function (thanks N.) to grab the child structure info.
Until now no luck with this.

By adding this code after reading the file it only gives me output to
"ret". "children" stays empty all the time

ret = GetFileVersionEx(handle:fopen);
debug_print("ret: ", ret, "\n");

if (!isnull(ret)) children = ret['StringFileInfo'];
if (isnull(children)) {
debug_print("Too bad... children is empty\n");
exit(0);
}
else debug_print("children: ", children, "\n");
CloseFile(handle:fopen);

But viewing the same file with "smbshell.nbin" gives me this:
The structure has children and my interest is at least the
"ProductVersion" because
dwFileVersionMS and dwFileVersionLS are zero.

wLength: 896
wValueLength: 52
wType: 0
Value:
dwSignature: 0xFEEF04BD
dwStrucVersion: 0x00010000
dwFileVersionMS: 0x00000000
dwFileVersionLS: 0x00000000
dwProductVersionMS: 0x00000000
dwProductVersionLS: 0x00000000
dwFileFlagMask: 0x00000000
dwFileFlags: 0x00000000
dwFileOS: 0x00000004
dwFileType: 0x00000001
dwFileSubtype: 0x00000000
dwFileDateMS: 0x00000000
dwFileDateLS: 0x00000000
Children:
VarFileInfo:
Translation: 0x040904E4
StringFileInfo:
040904E4:
LegalTrademark: All Rights Reserved.
ProductVersion: 4.8.01.0300

Does anyone can show me the right way, and tell what I possible do wrong?

--Ferdy--

_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: GetFileVersionEx & child structures [ In reply to ]
Ferdy Riphagen wrote:

Sorry typo in mail....
>
> if (!isnull(ret)) children = ret['StringFileInfo'];

had to be if (!isnull(ret)) children = ret['Children'];
inf = children['StringFileInfo'];

But this changes nothing to the result.

--Ferdy--
_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: GetFileVersionEx & child structures [ In reply to ]
On Feb 9, 2007, at 10:48 PM, Ferdy Riphagen wrote:

> Ferdy Riphagen wrote:
>
> Sorry typo in mail....
>>
>> if (!isnull(ret)) children = ret['StringFileInfo'];
>
> had to be if (!isnull(ret)) children = ret['Children'];
> inf = children['StringFileInfo'];
>
> But this changes nothing to the result.

Hey Ferdy,

Which version of Nessus are you using ?
_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Re: GetFileVersionEx & child structures [ In reply to ]
Renaud Deraison wrote:
>
> Hey Ferdy,
>
> Which version of Nessus are you using ?
>
Renaud, I use nessus 3.0.5, but thanks this was indeed the problem.
my system was still using an an old nasl version:

#nasl -v
nasl 2.2.6

#/opt/nessus/bin/nasl -v
nasl 3.0.5

did a little cleanup and now it's working:
children: ['StringFileInfo': (unknown)]['VarFileInfo': (unknown)]






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