views:

814

answers:

3

How can I program a Serial Number Generator that generates serial numbers for some existing software?

A: 

You don't state any specific requirements but you can use a GUID.

Guid mySerialNumber = Guid.NewGuid();
Jay Riggs
I mean that if i have a software that need serial to be unlocked ,so i want to know how to program a progran that generate serials for that software.not any specific software,just for know and challanging not anything ilegal:)
nir
Well from your obscurity about the "software," I'd have to say that you're venturing into something borderline illegal. If indeed you're looking for educational information... people usually build key generators by disassembling an application to reverse engineer the process for validating or generating serials. Sometimes you even have to look at the machine code or assembly to figure out how it's done.
Cory Larson
how i can reach the assembly code?its suppose to be in the software file no?and does its hard to learn read assembly?:)
nir
Sorry nir, I won't give you a concrete answer for that. But I can point you at somewhere to start... http://www.informit.com/articles/article.aspx?p=353553
Cory Larson
+2  A: 

I have used this CodeProject Article before when I've needed to do the same thing for projects I have worked on recently. I found it very detailed and while I didn't use everything in the sample I did get a lot out of it. (I have no affiliation with CodeProject or the author)

Additionally there is a library which gives you all this functionality complete with license file replacement and heaps of other features, but its not free, and unfortunately I couldn't remember the link. I'm sure a bit of Googgling and you'll find it.

Ash
+1  A: 

Try a number you can test using Luhn's algorithm. That way, you can make it long an inscrutable, yet still easily confirmed. The article contains a link to a C# implementation.

Traveling Tech Guy