Open-AudIT

What's on your network?
It is currently Sun Apr 22, 2018 1:03 am

All times are UTC + 10 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Fri Mar 23, 2012 1:03 am 
Offline
Newbie

Joined: Thu Mar 22, 2012 4:34 am
Posts: 5
I have tried all of the auditing_windows.vbs scripts in the thread and I have yet to get the system to show up on the server. I upgraded my beta4 install to the svn version and tried the script in there, turning debug to 2 I ran it from the command prompt with cscript audit_windows.vbs. Here are the last few lines as well as the error that kicks up. This same script runs fine on a Windows 7 32 bit machine as well as a Windows XP machine.

Outlook Express info
Software info
Software for 64bit
Hotfix info
Services info
CD Keys
C:\temp\audit_windows.vbs(5162, 4) Microsoft VBScript runtime error: Subscript o
ut of range: '[number: 822]'

I have tried it from command prompts run normal as well as run as administrator.

Here is the configuration section of the the audit_windows.vbs file.

' below are the default settings

' default to localhost
strComputer = "."

' submit the audit to the OAv2 server
submit_online = "y"

' create an XML text file of the result in the current directory
create_file = "n"

' the address of the OAv2 server
url = "http://cacti/open-audit/index.php/system"

' submit via a proxy
use_proxy = "n"

' the username (if not using the user running the script)
strUser = ""

' the password (if not using the user running the script)
strPass = ""

' optional - assign any PCs audited to this Org - take the OrgId from OAv2 interface
org_id = ""

' do not attempt to query mount points
skip_mount_point = "n"

' do not enumerate printers
skip_printer = "y"

' if set then delete the audit script upon completion
' useful when starting the script on a retmoe machine and leaving no trace
self_delete = "n"

debugging = "2"
' 0 = no debug
' 1 = basic debug
' 2 = verbose debug

It looks like to me one of the CD keys is returning a value not in the script, it has been almost 10 years since I debugged anything like this so I'm just hazarding a guess.


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 23, 2012 3:23 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1254
It would probably be better to have some error checking in the key decoding portion of the code but we'd still need to figure out which key is causing the problem. So I've added a few debugging lines to the audit script so we can see where your audit is having problems.

Run the attached script with debugging=2 and post the output like you did previously.


Attachments:
audit_windows.vbs.txt [243.63 KiB]
Downloaded 115 times
Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 23, 2012 3:42 am 
Offline
Newbie

Joined: Thu Mar 22, 2012 4:34 am
Posts: 5
Looks to be one of the office 2007 codes.

CD Keys - Windows 64bit
CD Keys - Office XP
CD Keys - Office XP 64bit
CD Keys - Office 2003
CD Keys - Office 2003 64bit
CD Keys - Office 2007
CD Keys - Office 2007 64bit
C:\temp\open-audit\audit_windows.vbs(5178, 4) Microsoft VBScript runtime error:
Subscript out of range: '[number: 822]'


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 23, 2012 6:10 am 
Offline
Newbie

Joined: Thu Mar 22, 2012 4:34 am
Posts: 5
I was looking through the section that pulls the key and noticed line 3226 of the modified one as:

key_text = getkey(key, 2)

Looking at the getkey procedure I surmised that the 2 would change the offset it was using for the key. I changed it to match what was under the regular section for the non 64bit version of Office 2007.

key_text = getkey(key, 1)

My gut told me that even though they key offset would be different for 2010, it isn't different for 2007, I ran the script and it appears to have worked. I am going to make the same modification to the original script as a sanity check.


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 23, 2012 2:20 pm 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1254
You're correct that getkey should only use 2 for the second parameter for Office 2010. It's sort of pathetic that I didn't see that. Hopefully Mark will include the change in future versions.


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 23, 2012 10:26 pm 
Offline
Newbie

Joined: Thu Mar 22, 2012 4:34 am
Posts: 5
I really like the software and am excited that we got it working. Thank you for the quick response and the modified script to step through it to find the problem area.

John


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 26, 2012 10:02 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1944
Location: Brisbane, Australia
Have pushed the changes into Bazaar / Launchpad.

_________________
Support and Development hours available from Opmantek.
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group