[Tutorial]Basic Spammer

Posts 1–15 of 32 · Page 1 of 3
[Tutorial]Basic Spammer
Create a new Project and call it "Basic Spammer"

Add
- 2 Buttons
- 1 Textbox
- 1 Timer
.

Name the two Buttons
- Connect
- Disconnect

Double Click on "Connect"
Type this in
Code:
Timer1.Enabled = True
Double Click on "Disconnect"
Code:
Timer1.Enabled = False
Double Click on your timer
Code:
        SendKeys.Send(TextBox1.Text)
        SendKeys.Send("{Enter}")
Set the Timers Setting to
Enabled= True
Interval= 1

And your done!
Very basic. You should leave the focus from the application you are spamming so that it don't start spamming there. Coz if I had a textbox or anything that can take input then I have a problem.

You can minimize this window, hide it or change the focus to any other known window. This will make it a bit better.
this is excellent for newbs, good tutorial.
Thank him if you like it
Basic Indeed, But thanks for sharing

Just as a more "advanced" approach to concept

Add 2 Text boxes and one button

Name Space
- I notated everything

[php]
'Used to import COM and Invoke services , needed for DLL Import
Imports System.Runtime.InteropServices
[/php]

Functions (just below public class formname

[php]
' This function will allow us to get a window and find it, by window name
' You can use this anytime you need to find a window by window name for any reason
<DllImport("USER32.DLL", CharSet:=CharSet.Unicode)> _
Public Shared Function WindowName(ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
End Function
[/php]

and below that

[php]
' This function will allow us set the foreground window
' This will bring the window we need to send the keystrokes to upfront
<DllImport("USER32.DLL")> _
Public Shared Function UpFront(ByVal hWnd As IntPtr) As Boolean
End Function
[/php]

On the button click event

[php]
' when you use try, it litterly means "attempt the following code before catch, if the "code is unseccesful"
' then catch the exception and display it in a message box , you can use list boxes for storing errors in a database
' but that is a little more advaced
Try
' (apph = name I have chosen for the declaration, you can choose any thing you wish)
' Declaring AppH as IntPtr which is used represent a pointer or a handle, in this case we are setting = to windowname
' which is a function I created above to set the window to sendkeys to, the format is
' (ByVal lpClassName As String, ByVal lpWindowName As String)
' I Use Nothing as the IPclassname, if you know the IPclassname you can use it.
' In textbox1 you can add the name of the window to check for
'lets use notepad, the name of a unnamed notepad is Unitled - Notepad
' so if you were to open notepad without a given name, and put Unitled - Notepad in textbox1
'this would continue and function, if not you will get an error
Dim AppH As IntPtr = WindowName(Nothing, TextBox1.Text)
'IntPtr is a set value so if the value is 0 [window name is wrong or not a open application, error])
If AppH = IntPtr.Zero Then
MsgBox("Chosen Application is not Running")
Return
End If
' If successful bring the window to the foreground
UpFront(AppH)
'sendkeys the content of textbox2
SendKeys.SendWait(TextBox2.Text)
Catch ex As Exception
MsgBox(ex.Message)
End Try
[/php]

Remember, everything is very much notated, Your tutorial was well written, but as you are new to VB, i thought offering a more advanced sample may be beneficial.
Thanks everyone...


What will that spammer do or how would it function, Nextgen?
It will work similar to your example, except it will allow you to decide what Opened windows application to spam to

It will work in this process

---User Enters the Windows Name as it appears on the title bar (or in Task Manager Processes)

Example: Google Chromes Windows Name is Chrome

So user puts chrome in textbox1

then in textbox2 the user types in what to spam.

- User clicks button

-- Chrome gets pulled to the foreground as the active window

-- Then the keystrokes are sent to that specific window

so you can use this one application to spam just about any application that won't require some form of hook or virtual key.
Woah that cool.

Do you have to had .exe or there file path?
Nope, just the application window name

Notepad = Untitled - Notepad
or saved name - notepad

you can get the application name from running applications
Maybe you should make a thread with pictures for extra detail ::
Better hurry or I will

/Can you add this to your tutorials,resources and links sticky please?
Darn your fast!

And I believe my name only has the "g" as a capital :Hidesmile:

Hey uhh, I'm having trouble. When I do a test run, I click on the text box but then it starts spamming the "Enter" button. I mean, like, not like Enter a program, but like a new line. Help? Here is my code:

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled = True
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Enabled = False
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
SendKeys.Send(TextBox1.Text)
SendKeys.Send("{Enter}")
End Sub
End Class
EDIT: Nevermind. You have to press the Disconnect button first. Thanks.
Posts 1–15 of 32 · Page 1 of 3
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?