Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[TUT]How to make a fake keygen

I saw this question in another thread so I decided to make a tutorial for it. :)

(Jan 29, 2010 10:19 AM)fleischi93 Wrote:  No one knows how to generate random numbers with capital letters?

I don't want to use the "Case method" I want to generate random numbers with capital letters on every click.

Like

0DK4-5KSE4-KE32-KU6RZ

But NOT the case method. I'd love to know how to do that..

Don't know if this is the most efficient method but it does the trick.

You need: 1 button (btnGenerate)
and 1 textbox (txtSerial)
Doubleclick the button you just added and add the following code.

1. Empty textbox first when button is pressed:
Code
txtSerial.Text = ""

2. Declarations:
Code
Dim x As Integer = 0
Dim i As Integer = 0
        Dim y As Boolean = False
        Dim Chars As Char() = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".ToCharArray()
Dim rand As System.Random = New Random

Chars are the characters that will be generated, just add anything in there you want to appear into the fake serial.

3. Loop 1
Code
For x = 0 To 3
This will set the lenght of your serial which will be xxxx-xxxx-xxxx-xxxx, if you want it to be something else then simply change the 3 to 4 or wathever you want it to be for example if you put for x = 0 to 5 then you'll be getting a serial like xxxx-xxxx-xxxx-xxxx-xxxx-xxxx

4. -
Code
If y = True Then
                txtSerial.Text = txtSerial.Text & "-"
            End If
This will create the "-" except for the first loop.

5. Loop 2
Code
For i = 0 To 3
                Dim intRandom As Integer = rand.Next(Chars.Length)
                txtSerial.Text = txtSerial.Text & Chars(intRandom).ToString()
            Next
This generates the random symbols and puts them into the textbox, the "for i = 0 to 3" wil create the lenght of each part of the code.

Finally add these two lines:
Code
y = True
        Next

That's it. If you want to use seperate textboxes instead you can use this code:

Code
TextBox0.Text = ""
        TextBox1.Text = ""
        TextBox2.Text = ""
        TextBox3.Text = ""

        Dim Chars As Char() = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".ToCharArray()
        Dim rand As System.Random = New Random
        Dim i As Integer = 0

        For i = 0 To 3
            Dim text0 As Integer = rand.Next(Chars.Length)
            Dim text1 As Integer = rand.Next(Chars.Length)
            Dim text2 As Integer = rand.Next(Chars.Length)
            Dim text3 As Integer = rand.Next(Chars.Length)
            TextBox0.Text = TextBox0.Text & Chars(text0).ToString()
            TextBox1.Text = TextBox1.Text & Chars(text1).ToString()
            TextBox2.Text = TextBox2.Text & Chars(text2).ToString()
            TextBox3.Text = TextBox3.Text & Chars(text3).ToString()
        Next
[Image: moonlight_sanctuary.png]
This is much better than _void_'s fake keygen source.
Thanks for this! ^_^
Thanks for it mate !
(Jan 30, 2010 04:39 AM)--([-S7N-])-- Wrote:  This is much better than _void_'s fake keygen source.
Thanks for this! ^_^

(Jan 30, 2010 05:02 AM)Ex-Coder Wrote:  Thanks for it mate !

No problem. :)
[Image: moonlight_sanctuary.png]
Thanks dude that you answered my question!

That is EXACTLY what I'm looking for. Thousand thanks mate, would +rep but I can't :/
(Jan 30, 2010 06:57 AM)fleischi93 Wrote:  Thanks dude that you answered my question!

That is EXACTLY what I'm looking for. Thousand thanks mate, would +rep but I can't :/
No problem. Glad to have helped you. =D
[Image: moonlight_sanctuary.png]
Bump.. .
[Image: moonlight_sanctuary.png]
nice TuT...

🙂
Mmmmm, i love arrays so much <3

Also, for all number keygen you can use rand for generating random numbers.
Very nice man, Using this a fair bit... thanks!
(Mar 17, 2010 04:24 AM)Cryptic Wrote:  Very nice man, Using this a fair bit... thanks!
Np, glad you like it. 🤝
[Image: moonlight_sanctuary.png]
very nice, you sir are the bomb :D
thank you for this nice tut..
PHP & .NET Contributor.
(Mar 18, 2010 09:15 AM)Rhizoid Wrote:  very nice, you sir are the bomb :D
Thanks! 😁

(Mar 18, 2010 09:21 AM)codepoet Wrote:  thank you for this nice tut..
Np!
[Image: moonlight_sanctuary.png]
Bump (Seen a lot of requests for keygen codes).
[Image: moonlight_sanctuary.png]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by Th3 Jok3rApr 18, 2018 04:39 AM 18 657 Apr 18, 2018 04:39 AM
Last Post: Dalvik
[.NET] by PsychotiicAug 2, 2012 01:22 PM 22 869 Aug 2, 2012 01:22 PM
Last Post: ident
[C] by hfleetmemberJun 14, 2012 04:42 AM 9 214 Jun 14, 2012 04:42 AM
Last Post: vive facile