[Tutorial] Advanced Spammer Codes
Information
*Introduction:
I spent a couple hours making this awesome tutorial for anyone wanting to learn Visual Basic. Please give me some thanks, it was time consuming.
Also, for each tidbit of code down below, each control name is whatever you choose it to be. If you can't understand what each one is, I suggest you not read this as it may make your brain explode. Thanks.
*Goal:
To show anyone reading how to add more advanced(mostly useless), awesome features to your spammer to make it a lot better.
*Requirements:
Basic knowledge of Visual Basic 2008
*Credits:
Myself- these are all my hand written codes. I don't leech. If I see something that may help me with a control or two, I figure out how it works then completely change it.
*Problems:
I am willing to help anyone with any problems they have, just reply or send me a private message.
*Errors:
Please notify me about any errors I made putting this together.
I wrote it all in Notepad first and got a little disoriented with it.
*Visual Reference:
If any of you would like some help with how it may look/need to look. You can view the spammer that I made.
Post link: http://www.mpgh.net/forum/33-visual-...-v1-0-2-a.html
The Codes
(Please give credits to me (Lex) for any spammer you made using this tutorial)Also, please press Thanks. It goes a long way.

*Hot Keys:
Creating hot keys are really easy and with this, you can set your hot keys to whatever you want by changing (Keys.F6) & (Keys.F7) to (Keys.whatever key you want)
First, at the top of Form1.vb enter this code:
Code:
Public Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As Long) As Integer
In Form1_Load:
Code:
HKTimer.Enabled = True HKTimer.Interval = 50
Code:
Dim StartHotKey As Boolean Dim StopHotKey As Boolean
Code:
StartHotKey = GetAsyncKeyState(Keys.F6) StopHotKey = GetAsyncKeyState(Keys.F7) If StartHotKey = True Then SpamTimer.Enabled = True End If If StopHotKey = True Then SpamTimer.Enabled = False End If
*Multiple Lines:
This is amazingly simple. All you have to do is expand on the original anti = 1 code.
For 3 lines of spam:
Code:
If anti = 0 then
SendKeys.Send(SpamTextBox1.Text)
SendKeys.Send("{Enter}")
anti = 1
ElseIf anti = 1 Then
SendKeys.Send(SpamTextBox2.Text)
SendKeys.Send("{Enter}")
Call IncrementCounter()
anti = 2
ElseIf anti = 2 Then
SendKeys.Send(SpamTextBox3.Text)
SendKeys.Send("{Enter}")
anti = 0
*Spam Counter:
To make a counter, you would want some integer to increase by one each time you sent a spam. So, just add these few lines of code.
Add this right below Public Class Form1:
Code:
Dim Counter As Integer = 0
Code:
Private Sub IncrementCounter() Counter += 1 CounterLabel.Text = Counter
Code:
Call IncrementCounter()
Code:
If anti = 0 Then
SendKeys.Send(SpamTextBox1.Text)
SendKeys.Send("{Enter}")
Call IncrementCounter()
anti = 1
ElseIf anti = 1 Then
SendKeys.Send(SpamTextBox2.Text)
SendKeys.Send("{Enter}")
Call IncrementCounter()
anti = 0
End If
This way of saving settings will save whatever you want it to in a registry.
To do this, add this code in a new Save button:
Code:
SaveSetting("Form1", "Checkboxes", "CheckBox1", CheckBox1.CheckState)
SaveSetting("Form1", "Checkboxes", "CheckBox2", CheckBox2.CheckState)
SaveSetting("Form1", "Textboxes", "Textbox1", TextBox1.Text)
SaveSetting("Form1", "Textboxes", "Textbox2", TextBox2.Text)
SaveSetting("Form1", "Textboxes", "Textbox3", TextBox3.Text)
These 3 textboxes and these 2 checkboxes aren't exactly relevent towards this, but it gives you an idea for what you would like to save.
*Loading Settings:
This is for the same 2 checkboxes and 3 textboxes used above. Again, not relevent at the moment.
Code:
CheckBox1.CheckState = GetSetting("Form1", "CheckBoxes", "CheckBox1", "")
CheckBox2.CheckState = GetSetting("Form1", "CheckBoxes", "CheckBox2", "")
TextBox1.CheckState = GetSetting("Form1", "TextBoxes", "TextBox1", "")
TextBox2.CheckState = GetSetting("Form1", "TextBoxes", "TextBox2", "")
TextBox3.CheckState = GetSetting("Form1", "TextBoxes", "TextBox3", "")
For setting your interval, you can use a couple ways. I'm going to show you how to make a custom value or use a trackbar.
So, first, you need to pick how many values & what the interval is.
For this demonstration, I'll be using 10 different values with an interval of 250.
Put this in the IntervalTrackBar_Scroll:
Code:
IntervalTrackBar.Maximum = ("10")
IntervalTrackBar.Minimum = ("1")
IntervalTrackBar.TickFrequency = ("1")
If IntervalTrackBar.Value = 1 Then
SpamTimer.Interval = 250
IntervalTextBox.Text = 250
End If
If IntervalTrackBar.Value = 2 Then
SpamTimer.Interval = 500
IntervalTextBox.Text = 500
End If
Also, you can customize the entire thing however you would like.
Now, for the custom value, enter this code in SetIntervalButton_Click
Code:
If IsNumeric(IntervalTextBox.Text) = False Then
MsgBox("MsgBox(Incorrect Value. Please enter a number.")
EsleIf IsNumeric(IntervalTextBox.Text) = True Then
SpamTimer.Interval = IntervalTextBox.Text
End If
So you can basically add a radiobutton or checkbox to enable/disable any function on your spammer.
For this, I'll be enabling/disabling hotkeys, always on top, and have a switch for interval settings.
For hot keys, enter this code in HotKeyCheckBox_CheckChanged:
Code:
If HotKeyCheckBox.Checked = True Then HKTimer.Enabled = True End If If HotKeyCheckBox.Checked = False Then HKTimer.Enabled = False End If
Code:
If OnTopCheckBox.Checked = True Then Me.TopMost = True ElseIf OnTopCheckBox.Checked = False Then Me.TopMost = False End If
Code:
If TrackBarRadioButton.Checked = True Then CustomValueRadioButton.Checked = False IntervalTrackBar.Enabled = True ElseIf TrackBarRadioButton.checked = False Then IntervalTrackBar.Enabled = False End If
Code:
If CustomValueRadioButton.Checked = True Then TrackBarRadioButton.Checked = False IntervalTextBox.Enabled = True ElseIf customValueRadioButton.checked = False Then IntervalTextBox.Enabled = False End If
To create a log, you want something that would make a post in a richtextbox every time something happens, so in each control that you want logged, put this code:
Code:
RTBLog.SelectionStart = Len(RTBLog.Text) RTBLog.SelectedText = vbCrLf & "Your log text here."
Code:
RTBLog.SelectionStart = RTBLog.TextLength RTBLog.ScrollToCaret()
Enter this code in SaveLogButton_Click:
Code:
With RTBLog
.SelectionStart = 1
.SelectionLength = 5
.SelectionColor = Color.Black
.SaveFile("Log.rtf", 0)
End With


