[TUT] Make a CBL Status Detector

Posts 1–15 of 31 · Page 1 of 3
[TUT] Make a CBL Status Detector


I am very disappointed how afew people believe I leeched a program that says I made (CBL Status Detector), this is exactly the reason I put my copyright on programs.

Ok so in this tutorial Ill show you how to detect if someone is clean or dirty. Full Source below.

[Just to let you know, I took some of these pictures when I was going to make a Clan Detector, but I decided to just show you the Clean/Dirty one]


Step 1
Open Visual Basic 2008, make a new project, make it look like this or something like this


Step 2
Once that is done, click the form itself and put
Code:
Label2.Visible = False
Inside the sub


Now go to your button, double click it and put this inside the sub
Code:
Button1.Enabled = False


Now Double click the textbox and put the code below in it
Code:
Button1.Enabled = True
So it should all look like this


Step 3
Basic coding done, lets get to the good stuff.

Add the following code in button1 click.
Code:
        Dim url As String
        url = "http://thecaconline.net/cbl/cbl.php?player=" + TextBox1.Text
        Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
        Dim response As System.Net.HttpWebResponse = request.GetResponse()
        Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream(), System.Text.Encoding.GetEncoding("windows-1252"))
        Dim Online As String
        Online = sr.ReadToEnd()
Should be looking like this now.

We are almost done with this basic thing.

Step 4
Now what the above code did was read the html source of the persons page. Now we can make it so inside the text its reading it looks for a certian word or code.

People who are clean have the image "cbl/images/clean.png" and dirty people have "cbl/images/dirty.png"... And people who are banned have their names crossed out, so the code "</S></FONT></A>" is in it.

If we are wanting to detect if they are banned, we must put the banned code before everything, because if they are detected clean and banned, it will say they are clean, but not banned. So copy the below code and put it below the code we just made, in button1 click sub.

So to find out if they are clean, below the current code we just made put
Code:
  If InStr(Online, "</S></FONT></A> ") Then
            Label2.Text = "BANNED"
            Label2.ForeColor = Color.Red
            Label2.Visible = True
        ElseIf InStr(Online, "cbl/images/clean.png") Then
            Label2.Text = "CLEAN"
            Label2.ForeColor = Color.Green
            Label2.Visible = True
        ElseIf InStr(Online, "cbl/images/dirty.png") Then
            Label2.Text = "DIRTY"
            Label2.ForeColor = Color.Red
            Label2.Visible = True
        End If
Should look like this


And now you are done. Add a icon, change the details of the program, and your set to release.

Ive attached my finished masterpiece.
Below is the full code.



Code:
  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Label2.Visible = False
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Button1.Enabled = False
        Dim url As String
        url = "http://thecaconline.net/cbl/cbl.php?player=" + TextBox1.Text
        Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
        Dim response As System.Net.HttpWebResponse = request.GetResponse()
        Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream(), System.Text.Encoding.GetEncoding("windows-1252"))
        Dim Online As String
        Online = sr.ReadToEnd()

        If InStr(Online, "</S></FONT></A> ") Then
            Label2.Text = "BANNED"
            Label2.ForeColor = Color.Red
            Label2.Visible = True
        ElseIf InStr(Online, "cbl/images/clean.png") Then
            Label2.Text = "CLEAN"
            Label2.ForeColor = Color.Green
            Label2.Visible = True
        ElseIf InStr(Online, "cbl/images/dirty.png") Then
            Label2.Text = "DIRTY"
            Label2.ForeColor = Color.Red
            Label2.Visible = True
        End If
    End Sub

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        Button1.Enabled = True

    End Sub
CBL D Tut.rarattachment deleted · 115 downloads before removal
THIS IS AWESOME
THANKS MAN !

+rep deffinatly

EDIT: DUde am i blind or is there no thanks button?\
EDIT: I found it and thankd you!
Very! Ily ugleh. Your a beast.
I beleive your blind, haha. I just thanked him. :]

EDIT: Sorry Double post. :/
np guys, bet you would make a better cbl status checker with abit of practice.

Here is the the code for the clan part

Code:
 url = "http://thecaconline.net/cbl/cbl.php?csearch=" + TextBox2.Text
        Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
        Dim response As System.Net.HttpWebResponse = request.GetResponse()
        Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream(), System.Text.Encoding.GetEncoding("windows-1252"))
        Dim Online As String
        Online = sr.ReadToEnd()
        'TextBox3.Text = Online
        If InStr(Online, ">Cheat</FONT>") Then
            Label2.Text = "DIRTY"
            Label2.ForeColor = Color.Red
            Label2.Visible = True
            Button2.Text = "Found"
        ElseIf InStr(Online, ">Glitch</FONT>") Then
            Label2.Text = "DIRTY"
            Label2.ForeColor = Color.Red
            Label2.Visible = True
            Button2.Text = "Found"
        Else
            Label2.Text = "CLEAN"
            Label2.ForeColor = Color.Green
            Label2.Visible = True
            Button2.Text = "Found"
        End If
Change the label parts, and button parts with the right buttons and labels.
wow thats awesome :P!
done gimmie source for clan
Quote Originally Posted by Jimmy View Post
done gimmie source for clan
I posted it like 2-3 posts above yours.
Quote Originally Posted by Ugleh View Post
I posted it like 2-3 posts above yours.
Lololol i'm sooo new to vb 2008! Can you tell me how to do step one? lol. I don't know where to get a button and put the text box thing. D:
Your lying. I made the source code.
Quote Originally Posted by Obama View Post
Your lying. I made the source code.
Bish ill cut u if u lie to me.
lol ok obama u owe me a rematche still u up for it
Very useful post.
If your that new, you shouldn't be doing this tutorial.
Posts 1–15 of 31 · Page 1 of 3
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us