Introduction: Email Spam Bot Using VBScript (VBS)

Picture of Email Spam Bot Using VBScript (VBS)

hello, i recently got back into VBS programming and wanted to make an email bot. so i did.

here it is
just copy paste into notepad save as anything.vbs, where anything is any name you want.

if you use hotmail just find the lines labelled smtp.gmail.com and change to the one for hotmail or whatever one you use.

Dim User
Dim Pass
Dim Name
Dim Input
Dim Input2
Dim Input3
X=MsgBox("Welcome. To log in Please Click OK and enter your G-mail & pass.",0,"EmailSpamBot V1.0")
User = InputBox("Enter your G-mail:")
Pass = InputBox("Enter Password:"& vbCrLf & ""& vbCrLf & "Please note passwords are NOT stored in this script and are case sensitive.")
Name = InputBox("Enter Name:")
Input = InputBox("Enter e-mail of victim:")
Input2 = InputBox("Enter title:")
Input3 = InputBox("Enter message:")
EmailSubject = (""& Input2)
EmailBody = (""& Input3)

'Const EmailFrom = ""
'Const EmailFromName = ""

Const SMTPServer = "smtp.gmail.com"
'Const SMTPLogon = ""
'Const SMTPPassword = ""
Const SMTPSSL = True
Const SMTPPort = 465

Const cdoSendUsingPickup = 1  'Send message using local SMTP service pickup directory.
Const cdoSendUsingPort = 2  'Send the message using SMTP over TCP/IP networking.

Const cdoAnonymous = 0  ' No authentication
Const cdoBasic = 1  ' BASIC clear text authentication
Const cdoNTLM = 2  ' NTLM, Microsoft proprietary authentication

' First, create the message

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = EmailSubject
objMessage.From = "<" & User & Name & ">"
objMessage.To = "<" & Input & ">"
objMessage.TextBody = EmailBody

' Second, configure the server

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPServer

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = User

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = Pass

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = SMTPPort

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = SMTPSSL

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

objMessage.Configuration.Fields.Update

do
objMessage.Send
loop

feel free to leave comments telling me what you think, what to improve ect.

Comments

bareketscript (author)2017-03-19

hello,

What if I want to take all the attached files from a specific mail and save it into a folder? can you help me do it please?

Thanks,

Bareket

Don't know how to do that, sorry.

xp4xbox made it! (author)2016-01-31

I felt that I needed to improve this, so I added lots of if's, such as if the user typed in a invalid username, or the user hit cancel to quit,ect if you are interested I will send you the code.

JacksonK23 (author)xp4xbox2017-03-22

can you please send me the improved code.

xp4xbox (author)xp4xbox2016-11-08

One note about using vbscript to send emails, is that you must make sure you that you allow access for less secure apps to be turned on in your gmail. Otherwise you will get an error.

AbdulrahmanB3 (author)xp4xbox2017-03-18

It only sends 40 how can we accelerate it?

xp4xbox (author)AbdulrahmanB32017-03-18

It must be a limit with the email provider. In that case then there is no way to increase it.

kaasstengel (author)xp4xbox2016-11-24

Where can you find that option of allowing less secure app to access?

xp4xbox (author)kaasstengel2016-11-24

https://support.google.com/accounts/answer/6010255?hl=en

kaasstengel (author)xp4xbox2016-11-25

I keep getting an error: The transportfunction can not connect to the server. What us this? and how can i solve this?

xp4xbox (author)kaasstengel2016-11-26

Also, if you want an error report from VBscript, remove line 2 in the file 'On Error Resume Next'. And remove lines 115 to 119 in my script

xp4xbox (author)kaasstengel2016-11-25

Make sure you are using gmail, since the port number is configured to 465, it is probably different for other email service providers. Then make sure that you typed everything correctly. Make sure you have an internet connection and if you get any prompts from your firewall from WScript.exe make sure to allow it. Other than that, I don't know why it wouldn't work, since it works for me.

caseclosed (author)xp4xbox2016-10-22

can you sned me the code ?

xp4xbox (author)caseclosed2016-10-22

k, I will send you a pm

ImEvox (author)xp4xbox2016-11-06

Can you send it to me too?

devicemodder (author)xp4xbox2016-04-06

Sure, I'd be interested.

BiscuitB (author)devicemodder2016-10-12

Can you get this to work through the console?

rkrishnan3 (author)2016-12-14

Hi can someone please spam my school email? Thanks send like 50,000 emails. My address is rkrishnan@cfsnc.org ty! I appreciate it!

BiscuitB (author)2016-10-12

do you have to have premium to download it?

AlfredM11 (author)2016-06-02

Is there any way i can make it to always login to the same email without having me to type it in all the time? And: Can i limit it to a specic amount of emails?

Blurryface21 (author)2016-04-29

Hey xp4xbox, can u send me the code? raxhonPlex@yandex.com

ba324195 (author)2016-03-15

How can you shut this off?

sander111222 (author)2016-03-01

mensen kom op pixelplaneet met leuke pixels en gekke dingen dus kom snel

dwtyre (author)2015-12-16

I find that it stops sending emails after about 100 are sent. Is there any way around this?

SamosaS (author)2014-12-09

hey there is apparently an error in line 70 saying the message could not be sent to the SMTP server. The server response was not avaible

PLS PLS FIX IT

xp4xbox (author)SamosaS2015-12-15

You have to make sure that you enable access for less secure accounts in your gmail.

devicemodder (author)SamosaS2015-01-03

that problem is on google's end or it is your firewall, ports closed ect. i get same error with the code code is correct.

RayW6 (author)devicemodder2015-10-22

I Have The Same Problem. I Checked My Firewall, It is allowed.

devicemodder (author)SamosaS2015-01-02

there is no error ,works fine on my machine. havent tested with hotmail yet ,only gmail. works on my end for gmail. sorry for late reply, been busy with the family.

fake 42 (author)2015-09-02

does this still work

matt.devine.54943 (author)2015-04-20

hey how many times will this spam the person

i recon you should add a part where you can choose how many times it spams the person.

this will spam the person in an infinite loop until the bot is killed with taskmanager

About This Instructable

29,236views

21favorites

License:

Bio: Twitter: @devicemodder1
More by devicemodder:Hacking Camcorder CRT Viewfindersspeed controlled desk fan
Add instructable to: