Tuesday, September 28, 2010

Alpha 5 released

Fixed a few bugs.
Export a Group definition to XML and import.
SQL Database enumeration.

Monday, September 27, 2010

Update

No coding done over the weekend - we have visitors staying with us.
I should be able to get a release up pretty soon though.
I've had some feedback (from alpha 4) and have also managed to get SQL Server DBs enumerating / storing / reporting.

Thursday, September 23, 2010

CodeIgniter Sessions + IE sucks

Man - what a pain in the ass.

Apparently the in built CodeIgniter session class and IE7/8/9 don't like each other.
On top of that, if you're using an internal computer name to access the site, well, that's not a valid W3C URL standard. You have to have at least two "." 's in the URL. So, trying to access the site via http://mycomputer is not strictly valid and IE will reject the cookie. Sigh.

So, I found the "session hybrid" class for CodeIgniter. Combining this with accessing the site via http://www.mypcname.com seems to work in IE. You also have to put the www.mypcname.com in your /etc/hosts file to make it work (otherwise it obviously will not resolve through normal DNS).

So, the long and the short is - I have sessions in OAv2 with IE7/8/9 working, but it requires a change to your /etc/hosts file (or your internal DNS). Or you could use the full domain name / path to your machine. In my case, that's rather long...

This does not affect submitting audit results, as that page does not use cookies.

If anyone has a better option - please advise.

BTW - IE6 & Firefox(3.6.9) work fine. Not sure about Chrome, Opera, et al... Strictly speaking Firefox should break just like IE if it followed standards. Maybe the Mozilla Devs are slack, maybe they thought they would deliberately _not_ meet the standard to make it easier for "internal to company" type sites - who knows ?

As per http://curl.haxx.se/rfc/cookie_spec.html,

Only hosts within the specified domain can set a cookie for a domain and domains must have at least two (2) or three (3) periods in them to prevent domains of the form: ".com", ".edu", and "va.us". Any domain that fails within one of the seven special top level domains listed below only require two periods. Any other domain requires at least three. The seven special top level domains are: "COM", "EDU", "NET", "ORG", "GOV", "MIL", and "INT".

Tuesday, September 21, 2010

Alpha 4 released

I've created a release, even though the (internal OAv2) Change stuff isn't finished.
Grab it here -
http://launchpad.net/oav2/trunk/alpha4/+download/OAv2_alpha_4.zip

Enumerating SQL Server DBs

Does anyone have a VBScript (that can be run from the command line) that can enumerate the databases (and their attributes) on a SQL Server - NOT using SQLDMO ?
IE - not like the one below

strDBServerName = "."

Set objSQLServer = CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure = True
objSQLServer.Connect strDBServerName

Set colDatabases = objSQLServer.Databases

For Each objDatabase In colDatabases
WScript.Echo objDatabase.Name
Next Set colDatabases =NOTHING
Set objSQLServer =NOTHING


My problem is that a standard (non SQL installed) machine doesn't have SQLDMO installed as far as I can tell - please correct me if I am mistaken. Basically I want to use the normal audit_windows.vbs script to enumerate all databases on a server and their size (and anything else that you might find interesting). Can anyone help ?

UPDATE - I found an example script, incorporated it into the audit script and it's all good. I created a basic "Show Databases" report and it works.

Posting each week

OK, so I've now set a reminder in my calendar for every Monday to post something here...
Maybe I need a PA ?!?!?!

Too Long

Wow - it's been waaaaay too long between posts.
Here's what's been happening.
I spoke at SAGE-AU in Hobart. It went down OK.
I've been away a couple of times with a work course (3 days at a time).
We're in the middle of ripping out our kitchen. Nearly there with the new one.
The kids have been to 1001 birthday parties lately.
Real life is just too busy !!!

OK, having mounted my defense of excuses, where is the next release of OAv2 at ? I'm glad you asked.

I think all that's left to do for another release is to post the Change form to the DB. Really. That's it. I'll do my best to knock it off tonight - but the kitchen benchtops and plumbing are going in this afternoon - sigh...

I've completed migrating the "reports" into the DB. You can now define a report and it's display columns. You can export it as XML (and import it back) as well. Essentially, someone can come up with a nice report, export the XML and post it to the forums for others to use.

There has been much refactoring and code cleanup, too. Oh, and partition use graphs are in, too (along with trend lines). And exporting to CSV and XML works (along with Excel). If you want, you can always grab the code from Launchpad using Bazaar.