skatamatic 371 Practically a Posting Shark

I was trying to convince my boss not to use a hard-coded license key in our data aquisition software. If you open our programs exe file in a hex editor (or even in notepad) and somewhat know what you are looking for, it is very easy to see our license key in plain text. This alone should convince him to stop making string consts to check against for the key validation.

But I wanted to do some playing around. I thought, hey if I can see the key in a hex editor, I should be able to change it there, right? Sure enough it works - except the two strings must be exactly the same size. I might be a bit over my head here, but does anyone know how I could change the size of this string?

There is a hex value exactly 2 bytes after the last character with a value of 14. The key itself is 20 characters long - and sure enough 0x14 = 20 in decimal (so i jumped to the conclusion that this location stores the length of the string). I tried changing this to a 01, then making the string before it an 'a' followed by nulls to fill the spaces that where there before (the old letters) and that didnt work - now the system seems to think the password is 'a' followed by a bunch of untypable nulls. I also tried deleting the old letters, but that makes the program crash (all the memory references are shifted and therefore are invalid)

Any insight on this not-so-serious dilemma? I'm not really a vb guy, my roots are in c++/c# but I don't think that makes a difference here.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.