"Megger" is a brand name for an Insulation Resistance tester. It creates a voltage (usually 500V) and allows you to test for any Insulation breakdown.
I have a random lotto number generator I created a few years ago, written in Borland.
I'm a bit rusty on C++ at the moment but I can pull it out and get back to you if you wish.