How to Make a Keygen in Visual C++

This tutorial is not meant to promote illegal stuff or whatever. BTW I made this tutorial because I could not find a tutorial for a random key chooser for c++, they were all visual basic. anyways, here it is, and tell me what you think.

http://www.youtube.com/watch?v=vy80WKtxMyw
closed account (zb0S216C)
Does this tutorial generate keys for a specific program?

Wazzak
no
closed account (zb0S216C)
Just viewed your video, and it's pretty good. I like how it's written using the Windows API. Nice work. Although it does appear to have received negative replies.

Wazzak
thanks!
actually this is just showing how to use gui in visual C++, its not really a keygen but its a tool to share the keys that you have :)/
You know what, F*** YouTube. You taught them how to make a key generator. It may not be the most efficent because it won't instanly give you a free activation code for some video game on the first shot. But if their so damn smart let THEM plug in the algorythem and put THEIR ass on the line just to show some faceless cheap skate how to pirate games.

Welcome to the site, you obviously have your head on right and know how to cover your ass.

Two Requests though:

1.) Can we get a pastebin or equivalent of the code? The resolution isn't the best in that video.

2.) Please tell me what is it with "hackers" and techno music?
closed account (3hM2Nwbp)
1) Can't help you there.

2a) "Hackers""Crackers" (no joke)
2b) Simple music (like techno) is easy to hard-code into the actual executable itself so there are no external files or resources. The serialized tracker music is pretty much just a byte array. At least that's how it works in the Delphi language ;P
Last edited on
if you really want to make a keygen, you need to know assembly...
I suggest learn assembly first and you gota use your brain to figure out their generation method..best way is to use ollydbg
You only need to know assembly if you first have to revearse engineer the the game. If the Key is based on an algo, which AFAIK most of them are, then you can probably find that online. I haven't even used stuff like that in years though so I could be wrong.
closed account (zb0S216C)
I like the way Microsoft generate their keys. In a nut shell, they gather your hardware's UUIDs, and calculate the product key. It's an intelligent way, actually, that could be used in software.

Wazzak
Building on what Framework says; this doubles it's usefulness because, at least in XP they aren't as strict in Vista or 7, if the hash that it generates on activation doesn't match what is recorded when the system boots you know that either there was a major hardware swap in which case the license technically doesn't apply anymore. Or the image was copied to a different computer, in which case the license they bought never applied. So this is brilliant not only because it solves the "random" problem, but it doubles as a piracy check.
i'll add in the code i used to the description
closed account (3hM2Nwbp)
From experience - the only secure way to license a product is by way of a remote licensing server. A reverse engineer can simply rip a section of the disassembled instructions that contain the algorithm, tweak it a bit (edit the inputs), and inline that assembly portion into their key generator. In fact, there's a specific tool that has a plug-in just for this purpose. Sometimes they don't even need to understand the algorithm to pluck it out and transplant it. Keeping the algorithm on the server-side eliminates this, but also loses the ability to a) Be used on an offline station and b) Be able to generate a unique key for each install. Knowing exactly who's using which license also helps to quickly discover piracy and in many cases automatically locks down the keys if detected.

It's sad to see happen so often, but there's really not much stopping this kind of piracy other than the prerequisite of knowing assembly language.
Of course, you could always steal activation keys of a game or something without needing assembly or any other machine language.
Topic archived. No new replies allowed.