Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Fri Mar 29, 2024 12:09 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 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=0] File comment: 11/13/12 Updated Mac Audit Script
mac_audit.zip [25.68 KiB]
Downloaded 503 times


These are the xcode files for the OLD script.

[attachment=1] File comment: Objective C code
Mac audit OAv2 Xcode.zip [90.77 KiB]
Downloaded 471 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 468 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
Contributor

Joined: Wed Apr 07, 2010 8:04 am
Posts: 105
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"

_________________
Old OA Setup: 500 Windows 7 workstations & 200 Apple OSX with OA v1.5.2 on Windows Server 2003 and WAMP 2
New OA Setup: 100 Windows servers with OA 2.2 on Windows Server 2016 and WAMP 3


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

Joined: Wed Apr 07, 2010 8:04 am
Posts: 105
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"

_________________
Old OA Setup: 500 Windows 7 workstations & 200 Apple OSX with OA v1.5.2 on Windows Server 2003 and WAMP 2
New OA Setup: 100 Windows servers with OA 2.2 on Windows Server 2016 and WAMP 3


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  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC + 10 hours


Who is online

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