Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
{TUT} Key Finder vb.2008
#1
i didnt saw a tutorial aout this so i thought lets make 1. this is a good tutorial for beginners. i'm sorry my englisch sucks because im dutch.

first of all open visual basics > new project > windows forms aplication

add the following from the toolbox :

1 button
1 textbox
1 label

laat het er ongeveer zo uitzien.

[Image: 339rbmb.png]

call button 1 Find Key

then double click button 1 and add this code.

Code:
textbox1.text = (GetProductKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\", "DigitalProductId"))

then add this code to label 1 this will show your product key.

Code:
Label1.Text = My.Computer.Info.OSFullName

then double click form1 and add the following code to form1.

Code:
Public Function GetProductKey(ByVal KeyPath As String, ByVal ValueName As String) As String
        Dim HexBuf As Object = My.Computer.Registry.GetValue(KeyPath, ValueName, 0)
        If HexBuf Is Nothing Then Return "N/A"
        Dim tmp As String = ""
        For l As Integer = LBound(HexBuf) To UBound(HexBuf)
            tmp = tmp & " " & Hex(HexBuf(l))
        Next
        Dim StartOffset As Integer = 52
        Dim EndOffset As Integer = 67
        Dim Digits(24) As String
        Digits(0) = "B" : Digits(1) = "C" : Digits(2) = "D" : Digits(3) = "F"
        Digits(4) = "G" : Digits(5) = "H" : Digits(6) = "J" : Digits(7) = "K"
        Digits(8) = "M" : Digits(9) = "P" : Digits(10) = "Q" : Digits(11) = "R"
        Digits(12) = "T" : Digits(13) = "V" : Digits(14) = "W" : Digits(15) = "X"
        Digits(16) = "Y" : Digits(17) = "2" : Digits(18) = "3" : Digits(19) = "4"
        Digits(20) = "6" : Digits(21) = "7" : Digits(22) = "8" : Digits(23) = "9"
        Dim dLen As Integer = 29
        Dim sLen As Integer = 15
        Dim HexDigitalPID(15) As String
        Dim Des(30) As String
        Dim tmp2 As String = ""
        For i = StartOffset To EndOffset
            HexDigitalPID(i - StartOffset) = HexBuf(i)
            tmp2 = tmp2 & " " & Hex(HexDigitalPID(i - StartOffset))
        Next
        Dim KEYSTRING As String = ""
        For i As Integer = dLen - 1 To 0 Step -1
            If ((i + 1) Mod 6) = 0 Then
                Des(i) = "-"
                KEYSTRING = KEYSTRING & "-"
            Else
                Dim HN As Integer = 0
                For N As Integer = (sLen - 1) To 0 Step -1
                    Dim Value As Integer = ((HN * 2 ^ 8) Or HexDigitalPID(N))
                    HexDigitalPID(N) = Value \ 24
                    HN = (Value Mod 24)
                Next
                Des(i) = Digits(HN)
                KEYSTRING = KEYSTRING & Digits(HN)
            End If
        Next
        Return StrReverse(KEYSTRING)
    End Function


de hele code zou er zo uit moeten zien.

Code:
Public Class Form1
    Public Function GetProductKey(ByVal KeyPath As String, ByVal ValueName As String) As String
        Dim HexBuf As Object = My.Computer.Registry.GetValue(KeyPath, ValueName, 0)
        If HexBuf Is Nothing Then Return "N/A"
        Dim tmp As String = ""
        For l As Integer = LBound(HexBuf) To UBound(HexBuf)
            tmp = tmp & " " & Hex(HexBuf(l))
        Next
        Dim StartOffset As Integer = 52
        Dim EndOffset As Integer = 67
        Dim Digits(24) As String
        Digits(0) = "B" : Digits(1) = "C" : Digits(2) = "D" : Digits(3) = "F"
        Digits(4) = "G" : Digits(5) = "H" : Digits(6) = "J" : Digits(7) = "K"
        Digits(8) = "M" : Digits(9) = "P" : Digits(10) = "Q" : Digits(11) = "R"
        Digits(12) = "T" : Digits(13) = "V" : Digits(14) = "W" : Digits(15) = "X"
        Digits(16) = "Y" : Digits(17) = "2" : Digits(18) = "3" : Digits(19) = "4"
        Digits(20) = "6" : Digits(21) = "7" : Digits(22) = "8" : Digits(23) = "9"
        Dim dLen As Integer = 29
        Dim sLen As Integer = 15
        Dim HexDigitalPID(15) As String
        Dim Des(30) As String
        Dim tmp2 As String = ""
        For i = StartOffset To EndOffset
            HexDigitalPID(i - StartOffset) = HexBuf(i)
            tmp2 = tmp2 & " " & Hex(HexDigitalPID(i - StartOffset))
        Next
        Dim KEYSTRING As String = ""
        For i As Integer = dLen - 1 To 0 Step -1
            If ((i + 1) Mod 6) = 0 Then
                Des(i) = "-"
                KEYSTRING = KEYSTRING & "-"
            Else
                Dim HN As Integer = 0
                For N As Integer = (sLen - 1) To 0 Step -1
                    Dim Value As Integer = ((HN * 2 ^ 8) Or HexDigitalPID(N))
                    HexDigitalPID(N) = Value \ 24
                    HN = (Value Mod 24)
                Next
                Des(i) = Digits(HN)
                KEYSTRING = KEYSTRING & Digits(HN)
            End If
        Next
        Return StrReverse(KEYSTRING)
    End Function

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        MsgBox(GetProductKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\", "DigitalProductId"))
    End Sub

    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
        Label1.Text = My.Computer.Info.OSFullName
    End Sub
End Class

all done now you build your own key finder.
[Image: icBx9Y.png]
Reply


Messages In This Thread
{TUT} Key Finder vb.2008 - by the_legend_nl - 11-01-2010, 08:04 AM
RE: {TUT} Key Finder vb.2008 - by Arеs - 11-01-2010, 08:25 AM
RE: {TUT} Key Finder vb.2008 - by the_legend_nl - 11-01-2010, 08:26 AM
RE: {TUT} Key Finder vb.2008 - by Marik™ - 11-04-2010, 05:57 AM
RE: {TUT} Key Finder vb.2008 - by the_legend_nl - 11-04-2010, 07:22 AM
RE: {TUT} Key Finder vb.2008 - by Marik™ - 11-04-2010, 11:26 AM
RE: {TUT} Key Finder vb.2008 - by the_legend_nl - 11-04-2010, 11:34 AM
RE: {TUT} Key Finder vb.2008 - by Marik™ - 11-04-2010, 11:53 AM
RE: {TUT} Key Finder vb.2008 - by the_legend_nl - 11-05-2010, 12:23 AM
RE: {TUT} Key Finder vb.2008 - by fas - 11-05-2010, 02:19 AM
RE: {TUT} Key Finder vb.2008 - by HeY? - 11-05-2010, 02:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Encrypt String using x509Certificate private Key wih RSA jeffstan 0 2,442 01-26-2014, 04:18 PM
Last Post: jeffstan
  VB 2008 - Useful Code Apache 36 16,223 11-25-2012, 10:37 PM
Last Post: ƃu∀ ıʞƃu∀
  [TUT] MD5 Encrypter & Finder [VB.NET] Fragma 12 7,918 11-25-2012, 10:36 PM
Last Post: ƃu∀ ıʞƃu∀
  [TUT] How to make a simple WebBrowser in VB 2010! [TUT] - [ Pictures] Statics 95 62,729 10-07-2012, 06:56 AM
Last Post: a99
  [TUT]Auto-Update System[TUT] HB Virus 3 2,450 01-07-2012, 02:21 PM
Last Post: Mastermrz

Forum Jump:


Users browsing this thread: 6 Guest(s)