Open-AudIT

What's on your network?
It is currently Wed Jan 24, 2018 6:01 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
PostPosted: Sat Feb 16, 2008 1:54 am 
Offline
Newbie

Joined: Thu Aug 24, 2006 4:28 am
Posts: 16
I've seen a lot of posts recently with requests for this and some posts by developers that they have done some preliminary work on it.

I wanted to repost the old work I did on this in hopes of speeding up the process.

Here was my old post:

Quote:
I hacked together an audit script using admin_pc_add_2.php from Open-AudIT and a Mac agent for OCS Inventory which can be found at http://codejanitor.com/wp/2006/02/16/oc ... 0-released

Before you run it, search the file for "CHANGEME" and replace all occurances with the suitable info for you.

I tried to put in comments where it seems necessary. But here's a warning that I'm not a PHP coder and I'm sure there's better ways to do it.

Mac Audit 0.0001: http://k-thx.com/~scott/mac_audit.zip

This zip contains the main audit.php script, the 2 scripts I used to make it, and the expect script (read below about it).

Code:
Usage:

php audit.php

or

php audit.php xmlprofile.spx


For the first option you run it on the remote machine you want to audit. The second option can be run from any machine.

This script will get all the info from System Profiler and populate the Open-Audit database.

Currently, lots of hardware is left out. I have no need for all of it so it isn't included right now. Feel free to modify it and add in whatever you want. It isn't very hard once you understand how it works; it's just tedious.


A few things to mention:

1. This work was based on whatever version of OA was out last summer so it may be different now.
2. The code I used was based on a PHP script built for another inventory app.

The author of that script has since updated it: http://codejanitor.com/wp/2007/12/20/oc ... -released/

My point of this post is just sharing this work so no one ends up doing a lot of unnecessary duplicate coding.

To recap:

OS X has a System Profiler which can output all its information in XML format. A PHP script has already been made to read and parse all this information. In order for it to work in OA, the data has to be parsed into the format OA needs and inserted into the db which is what my script already did.

Hopefully this helps the developers :). I also think it would be good to have this thread be the consolidated OS X audit thread so there isn't information all over the place. Maybe even sticky it?


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 14, 2008 3:34 am 
Offline
Newbie

Joined: Fri Mar 14, 2008 3:27 am
Posts: 5
Hi Scott,

I downloaded your script and code janitor's latest release. However I am not sure which entries to change in the "ocs_mac_agent.php" file.

Here is my current info to my open audit server: "http://192.168.1.10/openaudit/index.php"

how/where can I update that info to audit apple macs?

Sorry i'm not proficient with macs.

thanks


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 20, 2008 11:58 pm 
Offline
Newbie

Joined: Thu Aug 24, 2006 4:28 am
Posts: 16
You don't need to download anything from code janitor unless you actually want to re-code your own audit script.

All you need to do is download the mac_audit.zip, search the file for "CHANGEME" and replace it with the appropriate values. Then run audit.php on a Mac computer.

My audit.php script was based on an older version of Open-AudIT so I can't guarantee that it still works. The reason I made this thread was to help people who wanted to make their Mac audit script.


Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 08, 2008 10:37 pm 
Offline
Newbie

Joined: Fri Mar 14, 2008 3:27 am
Posts: 5
Thanks, I will give this a try today. Hope it works.


here's what i did so far.

edited the "changeme" sections of the audit.php file.

i ran the php audit.php command in terminal. The errors i received are "parse error lines 25" and line 194.

I'm assuming it's probably one of the changeme variables.



thanks


Last edited by chargr on Wed Apr 09, 2008 12:43 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 09, 2008 12:28 am 
Offline
Newbie

Joined: Thu Aug 24, 2006 4:28 am
Posts: 16
Desktop is fine. Run the script by typing in the following in terminal with an admin account:

php audit.php

Just to warn you again: I have no idea if it will still work. I would be surprise if nothing is broken.


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 09, 2008 12:51 am 
Offline
Newbie

Joined: Fri Mar 14, 2008 3:27 am
Posts: 5
oopps i edit the post above..

i got parse error with line 25 and line 194...

so far my mac is still chugging along, everything seems to be working


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 13, 2010 3:16 am 
Offline
Newbie

Joined: Tue Dec 22, 2009 7:02 pm
Posts: 1
Hi,
I'm looking for the file:

Mac Audit 0.0001: http://k-thx.com/~scott/mac_audit.zip

Somebody knows it's possible to obtain it in another place?, or can you send-it to me?.
Thanks a lot.
Pep Sansó


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 05, 2010 4:29 pm 
Offline
Newbie

Joined: Fri Jun 04, 2010 3:33 pm
Posts: 3
In the absence of being able to find scott's script anywhere I've started my own:
viewtopic.php?f=5&t=3678

Would love some help to finish off the missing hardware and networking items...


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.  [ 8 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:  
Powered by phpBB® Forum Software © phpBB Group