Login Register
The stories and information posted here are artistic works of fiction and falsehood. Only a fool would take anything posted here as fact.


[HC Official] Email Spammer filter_list
Author
Message
[HC Official] Email Spammer #1
[Image: PWlX5.png]

[Image: pichc-1_zpsc246a181.png]


Source Code- [UPDATED]

Code:
Imports System.Net.Mail Public Class Form1 Dim s1 As Integer = 0 Dim p As Integer Private Sub GhostButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GhostButton3.Click Application.Exit() End Sub Private Sub GhostButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GhostButton2.Click BackgroundWorker1.CancelAsync() End Sub Private Sub clear() Label12.Visible = False Label13.Visible = False Label14.Visible = False Label15.Visible = False Label16.Visible = False GhostTextBox6.ReadOnly = True GhostTextBox7.ReadOnly = True End Sub Private Sub GhostButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GhostButton1.Click Select Case String.Empty Case GhostTextBox1.Text Label12.Visible = True Case GhostTextBox2.Text Label13.Visible = True Case GhostTextBox5.Text Label14.Visible = True Case GhostTextBox6.Text, GhostTextBox7.Text Label15.Visible = True Label16.Visible = True MessageBox.Show("Please choose your Mail Provider", "Mail Provider Not Chosen", MessageBoxButtons.OK, MessageBoxIcon.Error) Case Else clear() s1 = 0 ProgressBar1.Value = 0 ProgressBar1.Update() GhostButton1.Enabled = False GhostButton3.Enabled = False GhostButton2.Enabled = True If NumericUpDown1.Value = 0 Then MessageBox.Show("Please select how many mails do you want to sent!", "How many mail to be sent ?", MessageBoxButtons.OK, MessageBoxIcon.Error) Else BackgroundWorker1.RunWorkerAsync() ProgressBar1.Maximum = NumericUpDown1.Value ProgressBar1.Value = 0 End If End Select End Sub Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork Try Dim msg As New MailMessage() msg.From = New MailAddress(GhostTextBox1.Text) msg.To.Add(GhostTextBox5.Text) msg.Subject = (GhostTextBox4.Text) msg.Body = GhostTextBox3.Text For counter = 0 To ListBox1.Items.Count - 1 Dim Attach As Net.Mail.Attachment = New Net.Mail.Attachment(ListBox1.Items(counter)) msg.Attachments.Add(Attach) Next Dim SMTPServer As New SmtpClient SMTPServer.Host = GhostTextBox6.Text SMTPServer.Port = GhostTextBox7.Text SMTPServer.Credentials = New System.Net.NetworkCredential(GhostTextBox1.Text, GhostTextBox2.Text) SMTPServer.EnableSsl = True Do Until s1 = NumericUpDown1.Value If BackgroundWorker1.CancellationPending Then Exit Sub End If SMTPServer.Send(msg) s1 = s1 + 1 Me.ProgressBar1.Value = s1 Loop MessageBox.Show("All the Mail has been Sent!", "Mail Sent", MessageBoxButtons.OK, MessageBoxIcon.Information) ProgressBar1.Value = 0 Catch ex As Exception MessageBox.Show(ex.ToString) End Try End Sub Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk For Each fls As String In OpenFileDialog1.FileNames ListBox1.Items.Add(fls) Next End Sub Private Sub GhostButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GhostButton4.Click OpenFileDialog1.ShowDialog() End Sub Private Sub donework(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackgroundWorker1.RunWorkerCompleted GhostButton1.Enabled = True GhostButton3.Enabled = True GhostButton2.Enabled = False End Sub Private Sub GhostButton5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GhostButton5.Click If ListBox1.Items.Count = 0 Then MessageBox.Show("No attachments to clear", "No Attachments", MessageBoxButtons.OK, MessageBoxIcon.Error) Else ListBox1.Items.Clear() End If End Sub Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged Select Case ComboBox1.SelectedIndex Case 1 GhostTextBox6.ReadOnly = False GhostTextBox7.ReadOnly = False Case 2 GhostTextBox6.Text = "smtp.gmail.com" GhostTextBox7.Text = "587" Case 3 GhostTextBox6.Text = "smtp.mail.yahoo.com" GhostTextBox7.Text = "465" Case 4 GhostTextBox6.Text = "smtp.live.com" GhostTextBox7.Text = "587" Case 5 GhostTextBox6.Text = "smtp.aol.com" GhostTextBox7.Text = "587" End Select End Sub End Class

[Image: 97253571510598985560.png]

Mail Spammer-(Source + exe)

[Image: 97253571510598985560.png]

Mail Spammer-(exe only)

Note:-
Both both x64 and x86 exe are there the links




Credits for theme:

Aeonhack - For GhostTheme

Reference:
1. http://vb.net-informations.com/
2. MSDN Library.
[Image: OilyCostlyEwe.gif]

Reply

RE: [VB.NET]Email Spammer[SOURCE] #2
Gonna test this when i get some time!!!, but looks great thanks for the share Confusedmoke:
[Image: HChelpers_zps3210ab3a.png]

Reply

RE: [VB.NET]Email Spammer[SOURCE] #3
(04-02-2013, 08:08 PM)Exploits Wrote: Gonna test this when i get some time!!!, but looks great thanks for the share Confusedmoke:

Well I have tested my application before posting here, lol,
But yes sure you can,

I just need a bit of help with bugs I have mention.
[Image: OilyCostlyEwe.gif]

Reply

RE: [VB.NET]Email Spammer[SOURCE] #4
(04-02-2013, 08:45 PM)Psycho_Coder Wrote:
(04-02-2013, 08:08 PM)Exploits Wrote: Gonna test this when i get some time!!!, but looks great thanks for the share Confusedmoke:

Well I have tested my application before posting here, lol,
But yes sure you can,

I just need a bit of help with bugs I have mention.

Yeah i wasn't doubting that you had tested it Wink
its just always good to play around with new toys yourself!
Im sure you can understand Cool
[Image: HChelpers_zps3210ab3a.png]

Reply

RE: [VB.NET]Email Spammer[SOURCE] #5
(04-02-2013, 09:22 PM)Exploits Wrote:
(04-02-2013, 08:45 PM)Psycho_Coder Wrote:
(04-02-2013, 08:08 PM)Exploits Wrote: Gonna test this when i get some time!!!, but looks great thanks for the share Confusedmoke:

Well I have tested my application before posting here, lol,
But yes sure you can,

I just need a bit of help with bugs I have mention.

Yeah i wasn't doubting that you had tested it Wink
its just always good to play around with new toys yourself!
Im sure you can understand Cool

yup,
if one doesnt test this app. by themselves then posting it here would have been wothless.
[Image: OilyCostlyEwe.gif]

Reply

RE: [VB.NET]Email Spammer[SOURCE] #6
Alright, since you asked for feedback on the code I wanted to go through the entire thing with you.

Where it starts...
Code:
Private Sub GhostButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GhostButton3.Click End End Sub
Don't use End, it's a VB6 carry over method, meaning it is only there for compatibility.

Code:
Private Sub GhostButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GhostButton2.Click Try BackgroundWorker1.CancelAsync() Catch EX As Exception End Try End Sub
You don't need to declare the exception if you don't need to use it, although this is poor. If an exception is thrown because of cancelling, then you are probably not handling anything and just expecting to forcefully cancel the asynchronous operation, ignoring any errors.

What is this BackgroundWorker here for?
Code:
Private WithEvents TestWorker As System.ComponentModel.BackgroundWorker

Code:
ElseIf GhostTextBox6.Text = "" And GhostTextBox7.Text = "" Then
Use AndAlso here to shortcircuit for better performance on the condition checking...

Also in this conditional you are using MsgBox(), which is an ugly carry over from VB6 too.

You also declare this useless TestWorker that doesn't do anything as a new instance of the BackgroundWorker for no reason every time this button is clicked. Not only that, but the BackgroundWorker class implements the IDisposable interface for a reason, and you aren't disposing of ANY of these resources because none of these instances are being Dispose()'d of... This is bad, because when the GC comes along and does it's sweep, garbage collection is a resource intensive task, and it could be avoided more likely if you paid more attention to things like this.

Now, in your BackgroundWorker1_DoWork() event method, there are other classes that implement the IDisposable interface, but you aren't disposing of anything at all... I actually don't see you disposing of anything in this entire source code.

And before I explain about the ProgressBar, this entire bit of code at the end:
Code:
Dim a, b As Integer Dim np As New System.Drawing.Point Private Sub GhostTheme1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles GhostTheme1.MouseDown a = MousePosition.X - Me.Location.X b = MousePosition.Y - Me.Location.Y End Sub Private Sub GhostTheme1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles GhostTheme1.MouseMove If e.Button = MouseButtons.Left Then np = MousePosition np.X = np.X - a np.X = np.Y - b End If End Sub

Is all useless. You are setting values that aren't being used anywhere else in your entire program, and the fact that they are member variables to your Form1 class, their scope is pretty widespread, and you're using up that extra memory on the stack for no reason (because Integer and System.Drawing.Point are value types).

Now as for the ProgressBar, you simply can't update the ProgressBar because a BackgroundWorker runs asynchronously on a new thread. How can you update the ProgressBar, which was created on the UI thread, from a BackgroundWorker thread? You need to invoke the UI thread to do anything with the ProgressBar.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: [VB.NET]Email Spammer[SOURCE] #7
And with all of that in short order, the Author should have a perfectly functioning HC Program ready for use by the Community at large in no time flat.

Reply

RE: [VB.NET]Email Spammer[SOURCE] #8
(04-03-2013, 05:56 AM)ArkPhaze Wrote: Alright, since you asked for feedback on the code I wanted to go through the entire thing with you.

Where it starts...
Code:
Private Sub GhostButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GhostButton3.Click End End Sub
Don't use End, it's a VB6 carry over method, meaning it is only there for compatibility.

Code:
Private Sub GhostButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GhostButton2.Click Try BackgroundWorker1.CancelAsync() Catch EX As Exception End Try End Sub
You don't need to declare the exception if you don't need to use it, although this is poor. If an exception is thrown because of cancelling, then you are probably not handling anything and just expecting to forcefully cancel the asynchronous operation, ignoring any errors.

What is this BackgroundWorker here for?
Code:
Private WithEvents TestWorker As System.ComponentModel.BackgroundWorker

Code:
ElseIf GhostTextBox6.Text = "" And GhostTextBox7.Text = "" Then
Use AndAlso here to shortcircuit for better performance on the condition checking...

Also in this conditional you are using MsgBox(), which is an ugly carry over from VB6 too.

You also declare this useless TestWorker that doesn't do anything as a new instance of the BackgroundWorker for no reason every time this button is clicked. Not only that, but the BackgroundWorker class implements the IDisposable interface for a reason, and you aren't disposing of ANY of these resources because none of these instances are being Dispose()'d of... This is bad, because when the GC comes along and does it's sweep, garbage collection is a resource intensive task, and it could be avoided more likely if you paid more attention to things like this.

Now, in your BackgroundWorker1_DoWork() event method, there are other classes that implement the IDisposable interface, but you aren't disposing of anything at all... I actually don't see you disposing of anything in this entire source code.

And before I explain about the ProgressBar, this entire bit of code at the end:
Code:
Dim a, b As Integer Dim np As New System.Drawing.Point Private Sub GhostTheme1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles GhostTheme1.MouseDown a = MousePosition.X - Me.Location.X b = MousePosition.Y - Me.Location.Y End Sub Private Sub GhostTheme1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles GhostTheme1.MouseMove If e.Button = MouseButtons.Left Then np = MousePosition np.X = np.X - a np.X = np.Y - b End If End Sub

Is all useless. You are setting values that aren't being used anywhere else in your entire program, and the fact that they are member variables to your Form1 class, their scope is pretty widespread, and you're using up that extra memory on the stack for no reason (because Integer and System.Drawing.Point are value types).

Now as for the ProgressBar, you simply can't update the ProgressBar because a BackgroundWorker runs asynchronously on a new thread. How can you update the ProgressBar, which was created on the UI thread, from a BackgroundWorker thread? You need to invoke the UI thread to do anything with the ProgressBar.

Thank you for your feedback.

To your first feedback that is why I did use "End", well I dont think this does any harm as it is acceptable in VB.NET though it was derived from VB6 , but from time I will not use this for sure following you.So I will use "Application.Exit()", I hope using this is okay.

Secondly,
for the try catch one, I agree to your point and thanks for clearing the concept.

Thirdly,
Code:
Private WithEvents TestWorker As System.ComponentModel.BackgroundWorker
It is junk , I changed the code later , but I forgot to remove some of statements, I am sorry for that.

fourthly,
Yes, I will use AndAlso , I didnt knew about this, thanks for pointing out.

fifthly,
I don't see any harm in using MsgBox(), it works perfectly.I think thats more important.

Sixth,
Code:
Dim a, b As Integer Dim np As New System.Drawing.Point Private Sub GhostTheme1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles GhostTheme1.MouseDown a = MousePosition.X - Me.Location.X b = MousePosition.Y - Me.Location.Y End Sub Private Sub GhostTheme1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles GhostTheme1.MouseMove If e.Button = MouseButtons.Left Then np = MousePosition np.X = np.X - a np.X = np.Y - b End If End Sub

The above code is my doubt number 2, But I had edited the thread and removed that part.The Source has been edited Now, I have used different functions now, removed MsgBox and End

Thread Updated and progress bar fixed.
Thank you for your suggesttion.
[Image: OilyCostlyEwe.gif]

Reply

RE: [VB.NET]Email Spammer[SOURCE] #9
Application.Exit() is what I would have suggested here. If you need an example of And vs. AndAlso I can show you that as well. The reason why I suggested not using MsgBox() is not mainly because it is a VB6 carry over, although that is a valid reason in itself because it may become entirely deprecated in the future and unusable, but rather because of the background code. If you seen the difference between MsgBox() and the Show() function from the MessageBox class you might consider using that instead.

On your updated code however:
Code:
mailpro = ComboBox1.SelectedIndex If mailpro = 5 Then GhostTextBox6.ReadOnly = False GhostTextBox7.ReadOnly = False Else GhostTextBox6.ReadOnly = True GhostTextBox7.ReadOnly = True End If If mailpro = 1 Then GhostTextBox6.Text = "smtp.gmail.com" GhostTextBox7.Text = "587" ElseIf mailpro = 2 Then GhostTextBox6.Text = "smtp.mail.yahoo.com" GhostTextBox7.Text = "465" ElseIf mailpro = 3 Then GhostTextBox6.Text = "smtp.live.com" GhostTextBox7.Text = "587" ElseIf mailpro = 4 Then GhostTextBox6.Text = "smtp.aol.com" GhostTextBox7.Text = "587" End If

Why is the condition for mailpro = 5 in it's own if block? It would also be better to use a case statement here in my opinion as you've got 5 conditions all based on the same variable. In addition to that I don't see a point for mailpro to be a global member variable here. If you wanted to optimize your code I would remove that and just reference the SelectedIndex directly. Whenever you can avoid global member variables though, you should in my opinion, otherwise it's a waste of memory.

Wrote this in notepad quick so there might be errors:
Code:
Select Case ComboBox1.SelectedIndex Case 5: GhostTextBox6.ReadOnly = False GhostTextBox7.ReadOnly = False Case 1: GhostTextBox6.Text = "smtp.gmail.com" GhostTextBox7.Text = "587" Case 2: GhostTextBox6.Text = "smtp.mail.yahoo.com" GhostTextBox7.Text = "465" Case 3: GhostTextBox6.Text = "smtp.live.com" GhostTextBox7.Text = "587" Case 4: GhostTextBox6.Text = "smtp.aol.com" GhostTextBox7.Text = "587" End Select GhostTextBox6.ReadOnly = True GhostTextBox7.ReadOnly = True

Your progressbar works now though? :huh:
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: [VB.NET]Email Spammer[SOURCE] #10
Thanks a lot , I didn't knew that part.Okay thanks for your reply.
The updated code , has the functions MessageBox.Show() and Application.Exit(), I had hanged those part, and I will make this sure that in my further application I use Select case.
And for that progress bar , ooh , earlier it was a terrible mistake , but I corrected it and now it works.

Thanks for you nice replies. I learnt something good and from next time I will try to make my code completely perfect.Thank you.
[Image: OilyCostlyEwe.gif]

Reply







Users browsing this thread: 1 Guest(s)