Indeed. I registered just to post this comment. This activator works perfectly. Best designed of the bunch. Thank you so much! Cheers.
I think this way might be better Code: Private Sub Form1_closing(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing If busy = 1 Then e.Cancel = True End If End Sub this will stop the form from closing when busy is set to 1 at the top of the code Code: dim busy then set busy = 1 at the top Sub Button1_Click busy = 0 at the bottom of Sub Button1_Click and do the same for Sub Button2_Click
Im also using nononsense's as my base it works on all machines here, but im new to vb so i would pm nononsense he is very helpful, im sure he will know the problem.. Alfa
His examples are really good to learn how to migrate from scripts, even if he does hate me j/k Like detecting the key. Just one thing though, why are you adding the extra space at the end and the microsoft in front of the reg detection for the key? Just remove the from the string search and the edition value.
or you could do it like this Code: private busy as boolean Code: Private Sub Form1_closing(ByVal sender As System.Object, ByVal e As e.Cancel = busy End Sub then set busy = true at the top Sub Button1_Click busy = false at the bottom of Sub Button1_Click and do the same for Sub Button2_Click lol just to get rid of the if then statements
oops like this Code: Private busy As Boolean Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing If busy = False Then Unmount() CleanUp() Else e.Cancel = busy Exit Sub End If End Sub
thats perfect! it seemed off when I wrote it. because this app has executables as resources, it is vulnerable to a resource exploit, if you plan on publicly posting your completed work, please consider doing a check on booinst.exe an bootsect.exe before the app launches it. take a peek at the System.Security.Cryptography namespace
what brain suck did was a tweak to your original program i can or you can add md5 or sha1 hashing to check bootinst.exe and or bootsect.exe if you want lol Code: Namespace SHA1MD5 'This code comes from codeproject.com 'It was originally written in C# but has been converted to vb.net Public NotInheritable Class DTHasher Private Sub New() End Sub Private Shared Function ConvertStringToByteArray(ByVal data As String) As Byte() Return (New System.Text.UnicodeEncoding()).GetBytes(data) End Function Private Shared Function GetFileStream(ByVal pathName As String) As System.IO.FileStream Return (New System.IO.FileStream(pathName, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.ReadWrite)) End Function Public Shared Function GetSHA1Hash(ByVal pathName As String) As String Dim strResult As String = "" Dim strHashData As String = "" Dim arrbytHashValue As Byte() Dim oFileStream As System.IO.FileStream = Nothing Dim oSHA1Hasher As New System.Security.Cryptography.SHA1CryptoServiceProvider() Try oFileStream = GetFileStream(pathName) arrbytHashValue = oSHA1Hasher.ComputeHash(oFileStream) oFileStream.Close() strHashData = System.BitConverter.ToString(arrbytHashValue) strHashData = strHashData.Replace("-", "") strResult = strHashData Catch ex As System.Exception System.Windows.Forms.MessageBox.Show(ex.Message, "Error!", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.[Error], System.Windows.Forms.MessageBoxDefaultButton.Button1) End Try Return (strResult) End Function Public Shared Function GetMD5Hash(ByVal pathName As String) As String Dim strResult As String = "" Dim strHashData As String = "" Dim arrbytHashValue As Byte() Dim oFileStream As System.IO.FileStream = Nothing Dim oMD5Hasher As New System.Security.Cryptography.MD5CryptoServiceProvider() Try oFileStream = GetFileStream(pathName) arrbytHashValue = oMD5Hasher.ComputeHash(oFileStream) oFileStream.Close() strHashData = System.BitConverter.ToString(arrbytHashValue) strHashData = strHashData.Replace("-", "") strResult = strHashData Catch ex As System.Exception System.Windows.Forms.MessageBox.Show(ex.Message, "Error!", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.[Error], System.Windows.Forms.MessageBoxDefaultButton.Button1) End Try Return (strResult) End Function End Class End Namespace
only the first line: , is the difference between working and --------? thx, will try that EDIT: does not work:
Im not really that concerned about it, this app isnt challanging anyone to use an attack like that. and even the weakest AV will catch the normal way apps get repacked with malware. If someone wanted to goto war with the malware guys the resource exploit would be the next probable attack, they should be aware of it. but if you want to post code for other people to use feel free. .
you told brainsuck to look af system.security.cryptography namespace and i was only giving code i had to make it easier for anyone that wanted to look at or even use that namespace
added the Samsung keys added some simple attempts at resource obfuscation, checking. added can't close app when busy