Automated Program Serial Numbers
-
I'm developing a pkg in Visual C++ that will need to have a unique serial number for each copy of the software sent out. The program needs to be aware of its serial number, and it needs to be stored in a place somewhat inaccessible to hinder tampering. The "brute force" method would be to manually change a #define in the code and recompile before each delivery of each copy of the software. Totally unworkable. Does anyone know of a way to do this? I thought of somehow automatically editing the .rc file, but that gets folded in at compile time, so that won't work, either. I need a clever idea.... Thanks!
-
I'm developing a pkg in Visual C++ that will need to have a unique serial number for each copy of the software sent out. The program needs to be aware of its serial number, and it needs to be stored in a place somewhat inaccessible to hinder tampering. The "brute force" method would be to manually change a #define in the code and recompile before each delivery of each copy of the software. Totally unworkable. Does anyone know of a way to do this? I thought of somehow automatically editing the .rc file, but that gets folded in at compile time, so that won't work, either. I need a clever idea.... Thanks!
In the dim and distant past when I was creating Novell Netware NLMs I did something like,
struct SerialNumber
{
char sentinel [ 33 ] ;
char serialno [ 33 ] ;
} ;SerialNumber TheSerialNumber = { "That'll be the day, when you mak",
"00000000000000000000000000000000" } ;Put that somewhere in static space, then write a separate application that searches the exe for the sentinel string (ensure there's only one instance if you're paranoid....) and sets the serial no to whatever is desired. I'd suggest encoding the serial on the way in and way out, this can be something fairly trivial, and perhaps using a likely looking error message as the 'sentinel'. Paul
-
In the dim and distant past when I was creating Novell Netware NLMs I did something like,
struct SerialNumber
{
char sentinel [ 33 ] ;
char serialno [ 33 ] ;
} ;SerialNumber TheSerialNumber = { "That'll be the day, when you mak",
"00000000000000000000000000000000" } ;Put that somewhere in static space, then write a separate application that searches the exe for the sentinel string (ensure there's only one instance if you're paranoid....) and sets the serial no to whatever is desired. I'd suggest encoding the serial on the way in and way out, this can be something fairly trivial, and perhaps using a likely looking error message as the 'sentinel'. Paul