Open-AudIT
https://www.open-audit.org/phpBB3/

[feature] [solved] Amended audit_windows.vbs script
https://www.open-audit.org/phpBB3/viewtopic.php?f=20&t=5993
Page 1 of 2

Author:  jbs [ Thu Jan 17, 2013 4:41 am ]
Post subject:  [feature] [solved] Amended audit_windows.vbs script

The attached zip contains an amended audit_windows.vbs which will recover keys for later Adobe products where the key is stored in a local database rather than in the registry. To do this it uses sqlite3.exe which is part of the sqlite product which is in the public domain.
Some products seem to store the key both in the registry and the database so you may get some duplication of keys.
you will need to download sqlite3.exe via the link below.

http://www.sqlite.org/sqlite-shell-win3 ... 071502.zip


sqlite3.exe needs to be in the same folder as your audit script.

Attachments:
audit_windows.zip [49.6 KiB]
Downloaded 396 times

Author:  jbs [ Wed Jan 23, 2013 3:26 am ]
Post subject:  Re: Amended audit_windows.vbs script

change to remove script error when a product is in the database, with no associated license key, eg adobe pro 8

Attachments:
audit_windows.zip [49.29 KiB]
Downloaded 380 times

Author:  cburbs [ Sat Jan 26, 2013 9:45 am ]
Post subject:  Re: Amended audit_windows.vbs script

I may have to try this.

I recall with a very old version of open audit when you selected the software key say of adobe 8 it would actually show all the PCs that were using that serial #.

Is there a way to do that in this version?

Example:

In reports I have Software Keys. When I go to that page is shows me system count, key name, key text. When I selected Key name that would open up a new page showing all devices using that serial #.

Author:  Mark [ Sat Jan 26, 2013 1:37 pm ]
Post subject:  Re: Amended audit_windows.vbs script

It's not there but I'll create one (and I'll have to alter the existing Report, too).

Author:  Mark [ Sat Jan 26, 2013 3:40 pm ]
Post subject:  Re: Amended audit_windows.vbs script

Put the attached files in code_igniter/application/controllers/reports (overwrite the one already there).
Go into Admin -> Reports -> List Reports.
Delete the Software Keys report.
Go into Admin -> Report -> Activate Report.
Activate the Software Keys, Specific Key Name and Specific Key Text reports.
Go to a Group and run the Software Keys report.
You should be able to click either the name of the key of the key text and it should show the appropriate report.
I'll include these in the next release.

Attachments:
SpecificKeyText.xml [2.16 KiB]
Downloaded 523 times
SpecificKeyName.xml [2.16 KiB]
Downloaded 546 times
SoftwareKeys.xml [1.79 KiB]
Downloaded 493 times

Author:  jbs [ Tue Feb 05, 2013 4:01 am ]
Post subject:  Re: Amended audit_windows.vbs script

Any chance that this amended script could be included in the next beta

Author:  Mark [ Fri Feb 15, 2013 11:26 am ]
Post subject:  Re: Amended audit_windows.vbs script

audit_windows.vbs amended to look for Adbode keys if sqlite3.exe is in the same directory as the script.
Look for it in the next release.

Author:  jpa [ Fri Feb 15, 2013 3:28 pm ]
Post subject:  Re: Amended audit_windows.vbs script (fixed)

[quote="Mark"]if sqlite3.exe is in the same directory as the scriptThis reminds me: in the code that calls the sqlite exe there is provision for having the exe in a different directory but the variable (sScriptPath) is never given a value.

Author:  spichelman [ Fri Feb 22, 2013 4:25 am ]
Post subject:  Re: Amended audit_windows.vbs script (fixed)

Hi Jpa/Mark-

FYI:
We have a machine that hiccups when it checks for an old version of Adobe in the "audit_windows script"....

Here are the Uninstall Entries in Windows registry:
Adobe Acrobat 8 Standard - English, Franτais, Deutsch 8.3.1
Adobe Acrobat 8.3.1 - CPSID_83708
Adobe Acrobat 8.3.1 Standard 8.3.1

CD Keys
C:\xampp\OAv2\other\audit_windows.vbs(4609, 4) Microsoft VBScript runtime error: Subscript out of range: '[number: 0]'

Suspect it has to do with CD key(text?) info the registry - not sure yet - still researching.

Thx.

-SP

Author:  jpa [ Fri Feb 22, 2013 4:40 am ]
Post subject:  Re: Amended audit_windows.vbs script (fixed)

This error is from the Adobe sqlite database product key extraction routine. Some assumptions are made in extracting the reg info and no error checking is done so we get a crash.

I suspect to debug it would be easiest if we had an example of the Adobe license database causing the problem. This is private information so you'd need to decide if you wanted to send it to one of us to find the problem. Definately don't post it to the public forum. DB is here: c:\Program Files\Common Files\Adobe\Adobe PCD\cache\cache.db

Author:  spichelman [ Fri Feb 22, 2013 5:00 am ]
Post subject:  Re: Amended audit_windows.vbs script (fixed)

Hi Jpa-

Thank-you.
But, we did not want to put you thru having to add old Acrobat 8.3.1 info to the SQLite DB.
Plus - one one person is affected so far.

We just added an exception(on error resume next) to the code - we'll skip getting keys for the old version.
Will be upgrading these users soon to a newer version - only a handful left.

Unless you still want us to submit the cache DB for others to utilize?
Please let us know and where to upload.

Else, the audit completes now - changed audit_windows.vbs:

<snip>

'''''''''''''''''''''''''
' Adobe keys'
'''''''''''''''''''''''''
' this will extract all keys for Adobe licensed products from the sqlite database,
' which seems to be where the later versions store the keys
' Thanks to JBS in the Open-AudIT.org forums.
' viewtopic.php?f=20&t=5993

on error resume next
if objFSO.FileExists(sScriptPath & "sqlite3.Exe") then

<snip>

Appreciate the quick response!

-SP

Author:  jpa [ Fri Feb 22, 2013 5:09 am ]
Post subject:  Re: Amended audit_windows.vbs script (fixed)

You could PM me the DB if you weren't worried about me having the reg info. I would be interested in getting this fixed as we still have old Acrobat versions here. We still use OA v1 so I haven't noticed the problem.

Not sure if you already have but you might want an "On Error Resume 0" after the Adobe keys routine near line 4633. Otherwise you've disabled error messages for the rest of the script.

Author:  spichelman [ Fri Feb 22, 2013 5:18 am ]
Post subject:  Re: Amended audit_windows.vbs script (fixed)

Sure - will PM it to you.

Ah - not much of a VB programmer at all - I'll add "On Error Resume 0" at the line num specified - thx!

-SP

Author:  jpa [ Fri Feb 22, 2013 6:06 am ]
Post subject:  Re: Amended audit_windows.vbs script (fixed)

I think another simple fix would be to change line 4602 from [code]do[/code]to[code]do while not rexec.StdOut.AtEndofStream[/code] and change line 4627 from [code]loop do while not rexec.StdOut.AtEndofStream[/code] to [code]loop[/code]Basically the current code is dieing because the sqlite query is not returning any data but the do loop continues on to process the data anyway.

Author:  spichelman [ Fri Feb 22, 2013 6:17 am ]
Post subject:  Re: Amended audit_windows.vbs script (fixed)

Great - I think that last bit worked.
Couldn't get error on resume 0 to work - kept getting a compilation error for some reason?

Page 1 of 2 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/