Advertisement
Guest User

Untitled

a guest
Jul 25th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.07 KB | None | 0 0
  1. Imports System.IO
  2. Imports System.Management
  3. Imports System.Net
  4. Public Class Form2
  5.     Dim HWID As String = ""
  6.     Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
  7.  
  8.     End Sub
  9.  
  10.     Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  11.         TextBox1.Text = "HWID: " & getHWID()
  12.  
  13.     End Sub
  14.  
  15.     Private Sub Button1_Click(sender As Object, e As EventArgs)
  16.  
  17.     End Sub
  18.     Private Function getHWID()
  19.         'not going to explain this, in short it grabs
  20.        'the HWID from the system you are on
  21.         Dim mc As New ManagementClass("win32_processor")
  22.         Dim moc As ManagementObjectCollection = mc.GetInstances()
  23.         For Each om As ManagementObject In moc
  24.             If HWID = "" Then
  25.                 HWID = om.properties("processorID").value.ToString()
  26.                 Exit For
  27.             End If
  28.         Next
  29.         Return HWID
  30.     End Function
  31.     Private Function checkLogin(ByVal sUser As String, ByVal sPass As String) As Boolean
  32.         Dim login As String()
  33.         Dim wr As HttpWebRequest = HttpWebRequest.Create("https://www.dropbox.com/preview/follo/HWID%2Ctxt.TXT")
  34.         Dim response As HttpWebResponse = wr.GetResponse()
  35.         Dim sr As StreamReader = New StreamReader(response.GetResponseStream())
  36.         While Not sr.EndOfStream
  37.             login = sr.ReadLine.Split("|")
  38.             If login(0) = HWID Then
  39.                 If sUser = login(1) Then
  40.                     If sPass = login(2) Then
  41.                         Return True
  42.                     End If
  43.                 End If
  44.                 End If
  45.         End While
  46.         Return False
  47.     End Function
  48.  
  49.     Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click
  50.         Select Case checkLogin(txtLogin.Text, txtPass.Text)
  51.             Case True
  52.                 MessageBox.Show("Login Successful")
  53.                 form1.Show()
  54.                 Me.Close()
  55.             Case False
  56.                 MessageBox.Show("Login Failed")
  57.         End Select
  58.     End Sub
  59.  
  60.  
  61. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement