Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


Semi-Advanced Spambot Tutorial filter_list
Author
Message
Semi-Advanced Spambot Tutorial #1
Hello, this will be my first tutorial on here. I'll probably be making more shortly. This was all made by me, however, I don't doubt that you'd be able to find a similar source out there somewhere for something as small as this.


First off, add the following to your form:
3 Labels
1 Rich Text Box
1 Text Box
1 NumericUpDown
3 Buttons
3 Timers

I prefer them to be in this format, but it's your choice:
Spoiler:
[Image: 4OedW.png]

The (F9), (F11), and (F12) are hotkeys that we'll be adding to this program.



If you simply want to copy-paste my source code, then you'll need to change some of the design names.

Change the following:
TextBox --> TimeDelay
NumericUpDown --> NumTimes
Button1 --> Start
Button2 --> Infinte
Button3 --> StopSpam

Then just copy-paste the following code:
Spoiler:
Code:
Public Class Form1
    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Integer

    Private Sub Start_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Start.Click
        Timer1.Start()
    End Sub

    Private Sub Infinte_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Infinte.Click
        Timer2.Start()
    End Sub

    Private Sub StopSpam_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StopSpam.Click
        Timer1.Stop()
        Timer2.Stop()
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        For times = 0 To NumTimes.Value - 1
            System.Threading.Thread.Sleep(TimeDelay.Text)
            For lineCounter = 0 To RichTextBox1.Lines.Count - 1
                SendKeys.Send(RichTextBox1.Lines(lineCounter) + "{Enter}")
            Next
        Next
        Timer1.Stop()
    End Sub

    Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
        For lineCounter = 0 To RichTextBox1.Lines.Count - 1
            System.Threading.Thread.Sleep(TimeDelay.Text)
            SendKeys.Send(RichTextBox1.Lines(lineCounter) + "{Enter}")
        Next
    End Sub

    Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer5.Tick
        Dim hotkey1 As Boolean = GetAsyncKeyState(Keys.F9)
        Dim hotkey2 As Boolean = GetAsyncKeyState(Keys.F11)
        Dim hotkey3 As Boolean = GetAsyncKeyState(Keys.F12)
        If hotkey1 Then
            Start.PerformClick()
        End If
        If hotkey2 Then
            Infinte.PerformClick()
        End If
        If hotkey3 Then
            StopSpam.PerformClick()
        End If
    End Sub
End Class

If you want to understand it more, then keep reading.



First off, I'd like to say, don't worry if it's giving you errors throughout the tutorial, this is simply because at the point in the tutorial you're at, all things might not be instantiated yet. Just keep continuing until the end, and everything should be working completely fine. If it isn't, feel free to PM me.

First, double click on your Timer1. You'll want to add the following code inside of its sub:
Code:
For times = 0 To NumTimes.Value - 1
            For lineCounter = 0 To RichTextBox1.Lines.Count - 1
            System.Threading.Thread.Sleep(TimeDelay.Text)
                SendKeys.Send(RichTextBox1.Lines(lineCounter) + "{Enter}")
            Next
        Next
        Timer1.Stop()

Basically, this is a nested for loop. What will happen is times, an integer, will increase from 0 to however many times you want it to spam - 1. You could simply do "For times = 1 To NumTimes.Value", however, I prefer to start from 0 as I find that it is good practice for beginners to use.

The next for loop goes through each of the lines that you write inside of the RichTextBox and goes through each of them separately.

Inside of this loop is a delay, that will delay for however long you write inside of the textbox. This value is in milliseconds.

This line of code sends the keys that are on the line that the for loop is currently on, and then it will "press" Enter, as to send the message, or just go on to the next line.
NOTE: The for loop NEEDS to be "0 To RichTextBox1.Lines.Count - 1", and the send keys NEEDS to be RichTextBox1.Lines(lineCounter), or else it won't work.

Timer1.Stop() is used so that after the for loops finish (The message is spammed the requested amount of times), the Timer1 will stop so that it doesn't continue to repeat itself.



Now, double click on Timer2. This is basically the same exact thing as Timer1, except for you won't be needing the first forloop, as this Timer will be used for the spammer to spam infinitely (until you click stop). So, I don't think I'll be needing to reexplain this.
Code:
For lineCounter = 0 To RichTextBox1.Lines.Count - 1
            System.Threading.Thread.Sleep(TimeDelay.Text)
            SendKeys.Send(RichTextBox1.Lines(lineCounter) + "{Enter}")
        Next



Onto the last Timer, Timer3. This one doesn't have to be a timer, however, since we've been working with Timers so much, I figured it may be easier for this to also be one. Click on the Timer ONCE. On the lower right you'll see the properties box which you used to change the name of your buttons, textbox, etc. Inside of here, you'll want to change "Enabled" from "False" to "True". This will make it so that the Timer is already on. Now, double click on Timer3. This will be where we'll be adding the hotkeys to our program.

Copy-Paste this into the sub:
Code:
Dim hotkey1 As Boolean = GetAsyncKeyState(Keys.F9)
        Dim hotkey2 As Boolean = GetAsyncKeyState(Keys.F11)
        Dim hotkey3 As Boolean = GetAsyncKeyState(Keys.F12)
        If hotkey1 Then
            Start.PerformClick()
        End If
        If hotkey2 Then
            Infinte.PerformClick()
        End If
        If hotkey3 Then
            StopSpam.PerformClick()
        End If

What this does is it creates 3 different boolean variables (booleans are True/False). It then assigns each of these booleans to a specific key, that way, when the specific key it is assigned to is pressed, then the boolean value will be true. The if statements simply check whether or not the boolean is false or true, and if it is true, then it will perform a click on the button it is assigned to (Start, Infinite, or StopSpam). You can change what hotkeys you want to use simply by changing the F12 in "GetAsyncKeyState(Keys.F12)" to a different key. I prefer these 3 keys simply because it is most comfortable to me.



Almost at the very top of the program code, just under "Public Class Form1" you'll be wanting to add:
Code:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Integer

This declares the function "GetAsyncKeyState" and allows us to use the hotkeys.



OK, the program is now nearly all complete, now all we have to do is make it so the buttons will start or stop the timers.

Double click your Start button and write:
Code:
Timer1.Start()

Double click your Infinite button and write:
Code:
Timer2.Start()

And finally double click your StopSpam button and write:
Code:
Timer1.Stop()
Timer2.Stop()

All these lines of codes do is start or stop the timer which will make the program start spamming the messages. Now the program is complete.



If you have any questions, feel free to message me. Also, if you have another idea for a program that you want a tutorial on feel free to ask me to do it.

Reply

RE: Semi-Advanced Spambot Tutorial #2
Nice tutorial, but kinda plain, should add some pictures and colors to keep view interest.
[Image: eAwhVeW.png]

Reply

RE: Semi-Advanced Spambot Tutorial #3
(10-12-2013, 05:50 PM)Spartan Wrote: Nice tutorial, but kinda plain, should add some pictures and colors to keep view interest.

Thanks, I'll keep that in mind for any future tutorials I make.

Reply

RE: Semi-Advanced Spambot Tutorial #4
Using GetAsyncKeyState for hotkeys and Thread.Sleep() for the delay instead of using your Timer intervals.... This is already bad.
-- cxS

[ Haskell/.NET/C/C++ - Software Engineer ]

Reply

RE: Semi-Advanced Spambot Tutorial #5
(10-12-2013, 06:24 PM)cxS Wrote: Using GetAsyncKeyState for hotkeys and Thread.Sleep() for the delay instead of using your Timer intervals.... This is already bad.

I figured this would be the easiest to explain to a beginner. For anyone who isn't a beginner, they probably won't be needing a tutorial for this anyways.

Reply

RE: Semi-Advanced Spambot Tutorial #6
(10-12-2013, 06:31 PM)John_DZ Wrote: I figured this would be the easiest to explain to a beginner. For anyone who isn't a beginner, they probably won't be needing a tutorial for this anyways.

That's all fine and dandy, but avoiding the System.Threading namespace altogether would have been easier for a beginner in my opinion. Setting an interval is not difficult, unless you're trying to justify a bad use of Thread.Sleep() here?
-- cxS

[ Haskell/.NET/C/C++ - Software Engineer ]

Reply

RE: Semi-Advanced Spambot Tutorial #7
(10-12-2013, 06:37 PM)cxS Wrote: That's all fine and dandy, but avoiding the System.Threading namespace altogether would have been easier for a beginner in my opinion. Setting an interval is not difficult, unless you're trying to justify a bad use of Thread.Sleep() here?

Fair enough, I'll update the tutorial shortly to avoid Thread.Sleep().

Reply

RE: Semi-Advanced Spambot Tutorial #8
(10-12-2013, 05:21 PM)John_DZ Wrote: Hello, this will be my first tutorial on here. I'll probably be making more shortly. This was all made by me, however, I don't doubt that you'd be able to find a similar source out there somewhere for something as small as this.


First off, add the following to your form:
3 Labels
1 Rich Text Box
1 Text Box
1 NumericUpDown
3 Buttons
3 Timers

I prefer them to be in this format, but it's your choice:
Spoiler:
[Image: 4OedW.png]

The (F9), (F11), and (F12) are hotkeys that we'll be adding to this program.



If you simply want to copy-paste my source code, then you'll need to change some of the design names.

Change the following:
TextBox --> TimeDelay
NumericUpDown --> NumTimes
Button1 --> Start
Button2 --> Infinte
Button3 --> StopSpam

Then just copy-paste the following code:
Spoiler:
Code:
Public Class Form1
    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Integer

    Private Sub Start_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Start.Click
        Timer1.Start()
    End Sub

    Private Sub Infinte_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Infinte.Click
        Timer2.Start()
    End Sub

    Private Sub StopSpam_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StopSpam.Click
        Timer1.Stop()
        Timer2.Stop()
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        For times = 0 To NumTimes.Value - 1
            System.Threading.Thread.Sleep(TimeDelay.Text)
            For lineCounter = 0 To RichTextBox1.Lines.Count - 1
                SendKeys.Send(RichTextBox1.Lines(lineCounter) + "{Enter}")
            Next
        Next
        Timer1.Stop()
    End Sub

    Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
        For lineCounter = 0 To RichTextBox1.Lines.Count - 1
            System.Threading.Thread.Sleep(TimeDelay.Text)
            SendKeys.Send(RichTextBox1.Lines(lineCounter) + "{Enter}")
        Next
    End Sub

    Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer5.Tick
        Dim hotkey1 As Boolean = GetAsyncKeyState(Keys.F9)
        Dim hotkey2 As Boolean = GetAsyncKeyState(Keys.F11)
        Dim hotkey3 As Boolean = GetAsyncKeyState(Keys.F12)
        If hotkey1 Then
            Start.PerformClick()
        End If
        If hotkey2 Then
            Infinte.PerformClick()
        End If
        If hotkey3 Then
            StopSpam.PerformClick()
        End If
    End Sub
End Class

If you want to understand it more, then keep reading.



First off, I'd like to say, don't worry if it's giving you errors throughout the tutorial, this is simply because at the point in the tutorial you're at, all things might not be instantiated yet. Just keep continuing until the end, and everything should be working completely fine. If it isn't, feel free to PM me.

First, double click on your Timer1. You'll want to add the following code inside of its sub:
Code:
For times = 0 To NumTimes.Value - 1
            For lineCounter = 0 To RichTextBox1.Lines.Count - 1
            System.Threading.Thread.Sleep(TimeDelay.Text)
                SendKeys.Send(RichTextBox1.Lines(lineCounter) + "{Enter}")
            Next
        Next
        Timer1.Stop()

Basically, this is a nested for loop. What will happen is times, an integer, will increase from 0 to however many times you want it to spam - 1. You could simply do "For times = 1 To NumTimes.Value", however, I prefer to start from 0 as I find that it is good practice for beginners to use.

The next for loop goes through each of the lines that you write inside of the RichTextBox and goes through each of them separately.

Inside of this loop is a delay, that will delay for however long you write inside of the textbox. This value is in milliseconds.

This line of code sends the keys that are on the line that the for loop is currently on, and then it will "press" Enter, as to send the message, or just go on to the next line.
NOTE: The for loop NEEDS to be "0 To RichTextBox1.Lines.Count - 1", and the send keys NEEDS to be RichTextBox1.Lines(lineCounter), or else it won't work.

Timer1.Stop() is used so that after the for loops finish (The message is spammed the requested amount of times), the Timer1 will stop so that it doesn't continue to repeat itself.



Now, double click on Timer2. This is basically the same exact thing as Timer1, except for you won't be needing the first forloop, as this Timer will be used for the spammer to spam infinitely (until you click stop). So, I don't think I'll be needing to reexplain this.
Code:
For lineCounter = 0 To RichTextBox1.Lines.Count - 1
            System.Threading.Thread.Sleep(TimeDelay.Text)
            SendKeys.Send(RichTextBox1.Lines(lineCounter) + "{Enter}")
        Next



Onto the last Timer, Timer3. This one doesn't have to be a timer, however, since we've been working with Timers so much, I figured it may be easier for this to also be one. Click on the Timer ONCE. On the lower right you'll see the properties box which you used to change the name of your buttons, textbox, etc. Inside of here, you'll want to change "Enabled" from "False" to "True". This will make it so that the Timer is already on. Now, double click on Timer3. This will be where we'll be adding the hotkeys to our program.

Copy-Paste this into the sub:
Code:
Dim hotkey1 As Boolean = GetAsyncKeyState(Keys.F9)
        Dim hotkey2 As Boolean = GetAsyncKeyState(Keys.F11)
        Dim hotkey3 As Boolean = GetAsyncKeyState(Keys.F12)
        If hotkey1 Then
            Start.PerformClick()
        End If
        If hotkey2 Then
            Infinte.PerformClick()
        End If
        If hotkey3 Then
            StopSpam.PerformClick()
        End If

What this does is it creates 3 different boolean variables (booleans are True/False). It then assigns each of these booleans to a specific key, that way, when the specific key it is assigned to is pressed, then the boolean value will be true. The if statements simply check whether or not the boolean is false or true, and if it is true, then it will perform a click on the button it is assigned to (Start, Infinite, or StopSpam). You can change what hotkeys you want to use simply by changing the F12 in "GetAsyncKeyState(Keys.F12)" to a different key. I prefer these 3 keys simply because it is most comfortable to me.



Almost at the very top of the program code, just under "Public Class Form1" you'll be wanting to add:
Code:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Integer

This declares the function "GetAsyncKeyState" and allows us to use the hotkeys.



OK, the program is now nearly all complete, now all we have to do is make it so the buttons will start or stop the timers.

Double click your Start button and write:
Code:
Timer1.Start()

Double click your Infinite button and write:
Code:
Timer2.Start()

And finally double click your StopSpam button and write:
Code:
Timer1.Stop()
Timer2.Stop()

All these lines of codes do is start or stop the timer which will make the program start spamming the messages. Now the program is complete.



If you have any questions, feel free to message me. Also, if you have another idea for a program that you want a tutorial on feel free to ask me to do it.

I've done one similar to spam on a minecraft server once before stupid mojang added anti spam, great vb tutorial keep them going
[Image: 5IN9GdK.png]

Reply







Users browsing this thread: 1 Guest(s)