Support Forums

Full Version: [TUT] MD5 Encrypter & Finder [VB.NET]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
In this tutorial I will guide you through making your own MD5 Encrypter & Finder.

MD5 Encrypter will Encrypt plain text into MD5 Hash.

MD5 Finder will search through 3 online databases for the desired hash and show the results in plain text.

Screenshots of what your program might look like:
[Image: md52.jpg]
[Image: md5.jpg]

Ok we will start with the MD5 Encrypter.

First off add the function:
Function MD5Hash(ByVal strToHash As String) As String
        Dim md5Obj As New Security.Cryptography.MD5CryptoServiceProvider
        Dim bytes() As Byte = System.Text.Encoding.ASCII.GetBytes(strToHash)
        bytes = md5Obj.ComputeHash(bytes)
        Dim strResult As String = ""
        For Each b As Byte In bytes
            strResult += b.ToString("x2")
        Return strResult
    End Function

Now for Button1_click (Encrypt button) You need to add this code:
TextBox1.Text = MD5Hash(TextBox1.Text)

In the example above i have added a Copy text button. Here is the code for that if you wish to add it:

For button3_click add:

Ok now for the MD5 Finder..

First off i will list the names for each object otherwise you might get confused...

Timer1 = md5c
Timer2 = checkHost
Timer3 = gdata
Timer4 = passcrack
Textbox = txtHash
listView = listView

You need the following Imports:
Imports System
Imports System.Web

Declare the following web browsers:
Dim webbrowser As New WebBrowser
Dim gdatabrow As New WebBrowser
Dim passcracking As New WebBrowser

In Form2_load add this code:

        button1.Text = "Wait.."
        button1.Enabled = False

Ok now the following bits of code act like a bot on each site.
Private Sub md5crack()
webbrowser.Document.GetElementById("term").SetAttribute("value", Trim(txtHash.Text))
End Sub

Private Sub gdataonline()
        gdatabrow.Document.GetElementById("hash").SetAttribute("value", Trim(txtHash.Text))
    End Sub

Private Sub pcracking()
        passcracking.Document.GetElementById("datafromuser").SetAttribute("value", Trim(txtHash.Text))
    End Sub

Ok now the rest is what gets all the information & puts it in the Listview

For md5c_tick:

If webbrowser.Document.Body.InnerText.Contains("Your Results") Then

            Dim t2find As New System.Text.RegularExpressions.Regex("\("".*""\)")
            Dim storage As String = Me.webbrowser.Document.Body.InnerText
            Dim result As String = t2find.Match(storage).Value
            Dim reslen As Integer = result.Length

            If String.IsNullOrEmpty(result) Then

                ListView.Items(0).SubItems.Add("Not Found")
                Dim pText As String = result.Substring(2, reslen - 4)
            End If

        End If

For button1_click:



For checkHost_tick:
If webbrowser.ReadyState = WebBrowserReadyState.Complete AndAlso gdatabrow.ReadyState = WebBrowserReadyState.Complete AndAlso passcracking.ReadyState = WebBrowserReadyState.Complete Then
            'If passcracking.ReadyState = WebBrowserReadyState.Complete Then
            txtHash.Text = ""
            txtHash.ReadOnly = False
            look.Text = "Crack"

            look.Enabled = True
        End If

For gdata_tick:
If gdatabrow.Document.Body.InnerText.Contains("RESULTS:") Then

            Dim t2find As New System.Text.RegularExpressions.Regex(txtHash.Text & ".*\s")
            Dim storage As String = Me.gdatabrow.Document.Body.InnerText
            Dim result As String = t2find.Match(storage).Value
            Dim reslen As Integer = result.Length

            Dim pText As String = result.Substring(32, reslen - 32)
            If pText.Contains("?????") Then
                ListView.Items(1).SubItems.Add("Not Found")
            End If


        End If

For passcrack_tick:
If passcracking.Document.Body.InnerText.Contains(txtHash.Text) Then

            Dim t2find As New System.Text.RegularExpressions.Regex("<TD\sbgColor=#ff0000>.*<\/TD>")
            Dim storage As String = passcracking.Document.Body.InnerHtml
            Dim result As String = t2find.Match(storage).Value
            Dim reslen As Integer = result.Length

            If String.IsNullOrEmpty(result) Then
                ListView.Items(2).SubItems.Add("Not Found")
                Dim pText As String = result.Substring(20, reslen - 25)
            End If

        End If

Now all there is to do is the coding for loadlist which is:
Private Sub loadList()
        ListView.Columns.Add("Website").Width = 100
        ListView.Columns.Add("Result").Width = 156

end sub

And finally to dispose of the webbrowsers once the form closes:
Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
end sub

And thats everything! If I've made any mistakes please let me know.

Credits for the Finder go to whoever released it on Leetcoders.

Useful code, thanks for this dude !
Glad someone liked it. Smile
You have many skills. Smile
Thanks for this DubStep Tongue , useful. And good job
I tested and it works, thanks again :p
Glad you guys like it. If you need any help with anything just ask.
Thank's for this share..i will try to make this in future!
This isn't teaching! It's copy and pasting!
Maybe your should go into a little further details explaining what certain functions and codes actually do, instead of saying "Now for Button1_click (Encrypt button) You need to add this code:"
This is cool one, thanks friend.
Pages: 1 2