Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

MInecraft username checker - VB.NET Tutorial.

1;
Create a new windows form application in vb.net. This is a simple tutorial so it won't be too hard.

2;
Add these things to the form. Make sure you add everything & label as told.
x1 Textbox
x2 Buttons (Name one Check! & Load names)
x2 Labels (Checked: & Available:)
x2 Listboxes
x1 OpenFileDialog
x1 BackGround worker

3;
Put the things like this or however you want. Only the first four listed things are visually seen.
Place the textbox in the top left & the two buttons right next to it.
Place the two labels under & put two listboxes under accordingly. I will update with pictures at 50 posts.

4;
Double click the form. Add this.
Code
Dim file As String
    Dim currentWorkerName As String
    Dim currentWorkerNameA As Boolean

5;
Double click the first textbox & add this.
Code
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
        TextBox1.ForeColor = Color.Black
    End Sub

6;
Double click the first button & add this.
Code
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        If TextBox1.Text = "" Then
            MsgBox("Empty minecraft username!", MsgBoxStyle.Information, "@Available Notification")
            Return
        End If
        Dim wc As New Net.WebClient
        Dim res As String
        res = wc.DownloadString("https ://minecraft. net/haspaid.jsp?user=" + TextBox1.Text)
        ListBox1.Items.Add(TextBox1.Text)
        If res.Contains("false") Then
            TextBox1.ForeColor = Color.LightGreen
            ListBox2.Items.Add(TextBox1.Text)
        Else
            TextBox1.ForeColor = Color.Red
        End If
    End Sub

7;
Double click the second button & add this.
Code
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        ofd.Filter = "Text Files (*.txt)|*.txt"
        ofd.ShowDialog()
        If Not ofd.FileName = "" Then
            file = ofd.FileName
            bgWorker.RunWorkerAsync()
        End If
    End Sub

8;
Double click the background worker (under the form) and add this.
Code
Private Sub bgWorker_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles bgWorker.DoWork
        If System.IO.File.Exists(file) = False Then
            Return
        End If
        Dim objReader As New System.IO.StreamReader(file)
        Dim count As Integer = 0
        Do While objReader.Peek() <> -1
            count += 1
            currentWorkerName = objReader.ReadLine()
            Dim wc As New Net.WebClient
            Dim res As String
            res = wc.DownloadString("https ://minecraft. net/haspaid.jsp?user=" + currentWorkerName)
            If res.Contains("false") Then
                currentWorkerNameA = True
            Else
                currentWorkerNameA = False
            End If
            bgWorker.ReportProgress(count)
            System.Threading.Thread.Sleep(150)
        Loop
    End Sub

9;
add this to bgworker_progresschanged
Code
Private Sub bgWorker_ProgressChanged(sender As Object, e As System.ComponentModel.ProgressChangedEventArgs) Handles bgWorker.ProgressChanged
        ListBox1.Items.Add(currentWorkerName)
        If currentWorkerNameA Then
            ListBox2.Items.Add(currentWorkerName)
        End If
    End Sub

10;
Add this to the end.
Code
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub
End Class

-
OR, you could copy and paste this whole thing.
Code
Public Class Form1

    Dim file As String
    Dim currentWorkerName As String
    Dim currentWorkerNameA As Boolean

    Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
        TextBox1.ForeColor = Color.Black
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        If TextBox1.Text = "" Then
            MsgBox("Empty minecraft username!", MsgBoxStyle.Information, "@Available Notification")
            Return
        End If
        Dim wc As New Net.WebClient
        Dim res As String
        res = wc.DownloadString("https ://minecraft. net/haspaid.jsp?user=" + TextBox1.Text)
        ListBox1.Items.Add(TextBox1.Text)
        If res.Contains("false") Then
            TextBox1.ForeColor = Color.LightGreen
            ListBox2.Items.Add(TextBox1.Text)
        Else
            TextBox1.ForeColor = Color.Red
        End If
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        ofd.Filter = "Text Files (*.txt)|*.txt"
        ofd.ShowDialog()
        If Not ofd.FileName = "" Then
            file = ofd.FileName
            bgWorker.RunWorkerAsync()
        End If
    End Sub

    Private Sub bgWorker_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles bgWorker.DoWork
        If System.IO.File.Exists(file) = False Then
            Return
        End If
        Dim objReader As New System.IO.StreamReader(file)
        Dim count As Integer = 0
        Do While objReader.Peek() <> -1
            count += 1
            currentWorkerName = objReader.ReadLine()
            Dim wc As New Net.WebClient
            Dim res As String
            res = wc.DownloadString("https ://minecraft. net/haspaid.jsp?user=" + currentWorkerName)
            If res.Contains("false") Then
                currentWorkerNameA = True
            Else
                currentWorkerNameA = False
            End If
            bgWorker.ReportProgress(count)
            System.Threading.Thread.Sleep(150)
        Loop
    End Sub

    Private Sub bgWorker_ProgressChanged(sender As Object, e As System.ComponentModel.ProgressChangedEventArgs) Handles bgWorker.ProgressChanged
        ListBox1.Items.Add(currentWorkerName)
        If currentWorkerNameA Then
            ListBox2.Items.Add(currentWorkerName)
        End If
    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub
End Class
Hope this helped. Credits to that guy for the code.
(Oct 16, 2015 12:29 AM)01010 Wrote:  10;
Add this to the end.
Code
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub
End Class

Why?
Why add an empty function to the end of the code?
Lotta blood to let, peace to make, give a fuk about a check
(Oct 16, 2015 12:33 AM)BahNahNah Wrote:  Why?
Why add an empty function to the end of the code?

I don't know why I did that haha
I'm still a beginner at this so I don't know a lot about how to code.
(Oct 16, 2015 12:35 AM)01010 Wrote:  I don't know why I did that haha
I'm still a beginner at this so I don't know a lot about how to code.

You just regurgitated this thread https://hackforums.net/showthread.php?tid=5022866 and the only thing different is that you literally broke down the steps to copying and pasting with zero explanation (albeit very easy) as to what anything does...
I was trying to explain his thread a little better.
Nonetheless, I'll update mine with some explanation to what the code does.
(Oct 16, 2015 06:07 AM)oυтlaw Wrote:  You just regurgitated this thread https://hackforums.net/showthread.php?tid=5022866 and the only thing different is that you literally broke down the steps to copying and pasting with zero explanation (albeit very easy) as to what anything does...

He even posted in the thread what he was going to do.. Its not like he was trying to be sneaky.
[Image: ZspE9dA.gif]
I wouldn't recommend anyone to use this code. It is very unreliable.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by -Nerotic-Oct 20, 2020 11:36 AM 14 446 Oct 20, 2020 11:36 AM
Last Post: CodeAssassin
[Python] by -Nerotic-Jul 13, 2020 10:53 AM 3 283 Jul 13, 2020 10:53 AM
Last Post: SIM-3587630
[Python] by -Nerotic-Jul 11, 2020 04:08 PM 7 174 Jul 11, 2020 04:08 PM
Last Post: Pawnhub