Jul 16, 2010 07:26 AM
(This post was last modified: Jul 16, 2010 12:48 PM by RBH.)
First of all the credits for this idea go to orgy who maked this thread:
https://hackforums.net/showthread.php?tid=545488
I advice you to read that thread because that will explain this functions.
I made a 2 functions to do this.
The first one is MD5get:
That function is used by the program to get the md5 hash of the executable.
The 2th function is to check if the md5 hash is right, i did this in combination with a online hosted txt file.
THIS TOO FUNCTIONS ME BE USED IN COMBINATION OTHERS THEY WONT WORK.
You may mod this functions to you needings but you need to give credits ;)
i made this little program using the md5get function to find the md5 of a other file:
[IMG]http://i32.[censored].com/30ux193.png[/IMG]
virusscan
Spoiler (Click to View)
downloadlink (source included):
I made a example project too with md5check and md5get (my url is included for md5 hash checking):
https://hackforums.net/showthread.php?tid=545488
I advice you to read that thread because that will explain this functions.
I made a 2 functions to do this.
The first one is MD5get:
Code
Public Function Md5Get() As String
Dim MD5 As New System.Security.Cryptography.MD5CryptoServiceProvider
Dim Data() As Byte
Dim hash() As Byte
Dim strData As String = IO.File.ReadAllText(Application.ExecutablePath)
Data = System.Text.Encoding.UTF8.GetBytes(strData)
hash = MD5.ComputeHash(Data)
MD5 = Nothing
Dim strOutput As New System.Text.StringBuilder(hash.Length)
For i As Integer = 0 To hash.Length - 1
strOutput.Append(hash(i).ToString("X2"))
Next
Return strOutput.ToString().ToLower
End FunctionThe 2th function is to check if the md5 hash is right, i did this in combination with a online hosted txt file.
Code
Public Function Md5Check() As String
Dim md5 As String
Dim wc = New System.Net.WebClient
Try
md5 = wc.DownloadString("") ' < You Url here with the MD5 textfile: www.example.com/md5.txt
Catch ex As Exception
MsgBox("The txt file is not there or you have no internet access")
Application.Exit()
End Try
If md5 = Md5Get() Then
MsgBox("Valid")
Else
MsgBox("Edited")
End If
End FunctionTHIS TOO FUNCTIONS ME BE USED IN COMBINATION OTHERS THEY WONT WORK.
You may mod this functions to you needings but you need to give credits ;)
i made this little program using the md5get function to find the md5 of a other file:
[IMG]http://i32.[censored].com/30ux193.png[/IMG]
virusscan
Spoiler (Click to View)
downloadlink (source included):
Code
http://www.mediafire.com/?xgi86f4a81tm19cI made a example project too with md5check and md5get (my url is included for md5 hash checking):
Code
http://www.mediafire.com/?isar64k595gz9iw


