Hack Forums
[.NET] [TUT]How to make a fake keygen - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] [TUT]How to make a fake keygen (/showthread.php?tid=252343)

Pages: Pages 1 2


[TUT]How to make a fake keygen - DeltaNox - Jan 30, 2010

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



* - --([-S7N-])-- - Jan 30, 2010

This is much better than _void_'s fake keygen source.
Thanks for this! ^_^


* - Ex-Coder - Jan 30, 2010

Thanks for it mate !


* - DeltaNox - Jan 30, 2010

(Jan 30, 2010 04:39 AM)No0b Wrote:  This is much better than _void_'s fake keygen source.
Thanks for this! ^_^

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

No problem. :)


* - fleischi93 - Jan 30, 2010

Thanks dude that you answered my question!

That is EXACTLY what I'm looking for. Thousand thanks mate, would +rep but I can't :/


* - DeltaNox - Jan 30, 2010

(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


* - DeltaNox - Jan 31, 2010

Bump.. .


* - VerboddeN - Jan 31, 2010

nice TuT...

🙂


* - Russkiy the Fox - Feb 1, 2010

Mmmmm, i love arrays so much <3

Also, for all number keygen you can use rand for generating random numbers.


* - Cryptic - Mar 17, 2010

Very nice man, Using this a fair bit... thanks!


* - DeltaNox - Mar 18, 2010

(Mar 17, 2010 04:24 AM)Cryptic™ Wrote:  Very nice man, Using this a fair bit... thanks!
Np, glad you like it. 🤝


* - Rhizoid - Mar 18, 2010

very nice, you sir are the bomb :D


* - codepoet - Mar 18, 2010

thank you for this nice tut..


* - DeltaNox - Apr 15, 2010

(Mar 18, 2010 09:15 AM)☢iRetroGamer☢ Wrote:  very nice, you sir are the bomb :D
Thanks! 😁

(Mar 18, 2010 09:21 AM)crow407 Wrote:  thank you for this nice tut..
Np!


* - DeltaNox - May 3, 2010

Bump (Seen a lot of requests for keygen codes).