Open-AudIT

What's on your network?
It is currently Sat Apr 21, 2018 4:28 am

All times are UTC + 10 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Current OSX audit script
PostPosted: Wed Oct 10, 2012 2:18 am 
Offline
Newbie

Joined: Thu Sep 27, 2012 10:19 am
Posts: 4
I put this up as a reply under another post, but I thought it should have its own post where the title is more concise.

The mac script for transforming Mac system information to XML that is supported by OAV2 is attached to this post.

This is still a work in progress and there are still some variables that we're having trouble matching from the Mac system to the Windows tags in the XML. If you have any questions, comments or concerns, please post them. Any help and feedback would be much appreciated.

This is the script. All you have to do is decompress and click on the file. The xml file should be generated in the same folder as the script. It's called mac.xml in case you're wondering.

**Update: This script below is an updated version that allows you to automatically add the xml file to your OAV2 setup. Basically, in Terminal all you have to do is type:
Path to the audit script & Website address of where you would add a system to your inventory. It should look something like:
.../mac_audit http://.../oav2/index.php/system/add_system

Attachment:
File comment: 11/13/12 Updated Mac Audit Script
mac_audit.zip [25.68 KiB]
Downloaded 250 times


These are the xcode files for the OLD script.

Attachment:
File comment: Objective C code
Mac audit OAv2 Xcode.zip [90.77 KiB]
Downloaded 202 times


I commented out the software section of the code. If you want a list of the software, just remove the comment characters and you'll get information about all the software on your computer in the same format as the xml generated by the windows script.


Attachments:
File comment: Mac Audit Executable. Just run and .xml file should be generated in the same folder as the script.
mac_audit.zip [29.25 KiB]
Downloaded 219 times


Last edited by auditor on Wed Nov 14, 2012 1:29 am, edited 1 time in total.
Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 17, 2012 12:53 am 
Offline
Helper

Joined: Wed Apr 07, 2010 8:04 am
Posts: 99
Location: Boston, MA
a little bash script can upload the content of the XML to the server, this works for 10.6+

curl --data-urlencode add@mac.xml "http://server/oav2/index.php/system"

_________________
OA v1.5.2 on Windows Server 2003 and WAMP 2.0 (Apache 2.2.22, PHP 5.4.3, MySQL 5.1.36).
OA v1.5.3 on Linux
Auditing 500 Windows 7 computers via GPO, 200 Apple OSX 10.8/10.9/10.10


Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 20, 2012 12:05 am 
Offline
Helper

Joined: Wed Apr 07, 2010 8:04 am
Posts: 99
Location: Boston, MA
Sorry, that command was for OAv1. Here's the actual one for OAv2:

curl --data-urlencode form_systemXML@path_to_mac.xml "http://server/oav2/index.php/system/add_system"

_________________
OA v1.5.2 on Windows Server 2003 and WAMP 2.0 (Apache 2.2.22, PHP 5.4.3, MySQL 5.1.36).
OA v1.5.3 on Linux
Auditing 500 Windows 7 computers via GPO, 200 Apple OSX 10.8/10.9/10.10


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 25, 2012 12:33 am 
Offline
Newbie

Joined: Thu Sep 27, 2012 10:19 am
Posts: 4
The script, at this time, seems to only work for Lion and Mountain Lion. I'll try and do my best to get it working on earlier versions.


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 17, 2012 12:39 am 
Offline
Newbie

Joined: Thu Sep 27, 2012 10:19 am
Posts: 4
The audit script has been updated to allow for easy uploading directly to OAV2. See first post.


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

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 5 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