Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.IO
- Imports System.Management
- Imports System.Net
- Public Class Form2
- Dim HWID As String = ""
- Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
- End Sub
- Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- TextBox1.Text = "HWID: " & getHWID()
- End Sub
- Private Sub Button1_Click(sender As Object, e As EventArgs)
- End Sub
- Private Function getHWID()
- 'not going to explain this, in short it grabs
- 'the HWID from the system you are on
- Dim mc As New ManagementClass("win32_processor")
- Dim moc As ManagementObjectCollection = mc.GetInstances()
- For Each om As ManagementObject In moc
- If HWID = "" Then
- HWID = om.properties("processorID").value.ToString()
- Exit For
- End If
- Next
- Return HWID
- End Function
- Private Function checkLogin(ByVal sUser As String, ByVal sPass As String) As Boolean
- Dim login As String()
- Dim wr As HttpWebRequest = HttpWebRequest.Create("https://www.dropbox.com/preview/follo/HWID%2Ctxt.TXT")
- Dim response As HttpWebResponse = wr.GetResponse()
- Dim sr As StreamReader = New StreamReader(response.GetResponseStream())
- While Not sr.EndOfStream
- login = sr.ReadLine.Split("|")
- If login(0) = HWID Then
- If sUser = login(1) Then
- If sPass = login(2) Then
- Return True
- End If
- End If
- End If
- End While
- Return False
- End Function
- Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click
- Select Case checkLogin(txtLogin.Text, txtPass.Text)
- Case True
- MessageBox.Show("Login Successful")
- form1.Show()
- Me.Close()
- Case False
- MessageBox.Show("Login Failed")
- End Select
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement