SHOW:
|
|
- or go back to the newest paste.
1 | #include <file.au3> | |
2 | #include <ButtonConstants.au3> | |
3 | #include <EditConstants.au3> | |
4 | #include <GUIConstantsEx.au3> | |
5 | #include <StaticConstants.au3> | |
6 | #include <WindowsConstants.au3> | |
7 | #region ### START Koda GUI section ### Form= | |
8 | $Form1 = GUICreate("Googlemail Spammer", 493, 416, 208, 137) | |
9 | $Input1 = GUICtrlCreateInput("Email@gmail.com", 104, 40, 305, 21) | |
10 | $Label1 = GUICtrlCreateLabel("Your Email:", 208, 8, 57, 17) | |
11 | $Label2 = GUICtrlCreateLabel("Password:", 208, 72, 53, 17) | |
12 | $Input2 = GUICtrlCreateInput("Input2", 104, 104, 305, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_PASSWORD)) | |
13 | $Input3 = GUICtrlCreateInput("Victim@gmail.com", 104, 160, 305, 21) | |
14 | $Label3 = GUICtrlCreateLabel("Victims Email:", 200, 136, 68, 17) | |
15 | $Button1 = GUICtrlCreateButton("Send", 104, 328, 307, 25) | |
16 | $Label4 = GUICtrlCreateLabel("Made by Okustan", 24, 368, 88, 17) | |
17 | $Label5 = GUICtrlCreateLabel("Youtube: DerOkustan", 376, 376, 107, 17) | |
18 | $Input4 = GUICtrlCreateInput("Spam Message", 104, 272, 305, 35) | |
19 | $Label6 = GUICtrlCreateLabel("Spam Message:", 192, 240, 80, 17) | |
20 | $Input5 = GUICtrlCreateInput("", 104, 208, 305, 21) | |
21 | $Label7 = GUICtrlCreateLabel("Subject:", 216, 184, 43, 17) | |
22 | $Label8 = GUICtrlCreateLabel("F6 to stop", 24, 32, 51, 17) | |
23 | GUISetState(@SW_SHOW) | |
24 | #endregion ### END Koda GUI section ### | |
25 | HotKeySet("{F6}", "pause") | |
26 | While 1 | |
27 | $nMsg = GUIGetMsg() | |
28 | Switch $nMsg | |
29 | Case $GUI_EVENT_CLOSE | |
30 | ||
31 | Exit | |
32 | ||
33 | Case $Button1 | |
34 | $SmtpServer = "Smtp.gmail.com" ; address for the smtp-server to use - REQUIRED | |
35 | $FromName = "Dude" ; name from who the email was sent | |
36 | $FromAddress = GUICtrlRead($Input1) ; address from where the mail should come | |
37 | $ToAddress = GUICtrlRead($Input3) ; destination address of the email - REQUIRED | |
38 | $Subject = GUICtrlRead($Input5) ; subject from the email - can be anything you want it to be | |
39 | $Body = GUICtrlRead($Input4) ; the messagebody from the mail - can be left blank but then you get a blank mail | |
40 | $AttachFiles = "" ; the file(s) you want to attach seperated with a ; (Semicolon) - leave blank if not needed | |
41 | $CcAddress = "" ; address for cc - leave blank if not needed | |
42 | $BccAddress = "" ; address for bcc - leave blank if not needed | |
43 | $Importance = "Normal" ; Send message priority: "High", "Normal", "Low" | |
44 | $Username = GUICtrlRead($Input1) ; username for the account used from where the mail gets sent - REQUIRED | |
45 | $Password = GUICtrlRead($Input2) ; password for the account used from where the mail gets sent - REQUIRED | |
46 | $IPPort = 465 ; port used for sending the mail | |
47 | $ssl = 1 | |
48 | ||
49 | While 1 | |
50 | Global $oMyRet[2] | |
51 | Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") | |
52 | $rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl) | |
53 | If @error Then | |
54 | MsgBox(0, "Error sending message", "Error code:" & @error & " Description:" & $rc) | |
55 | ||
56 | EndIf | |
57 | Func pause () | |
58 | ExitLoop | |
59 | EndFunc | |
60 | WEnd | |
61 | EndSwitch | |
62 | WEnd | |
63 | ;################################## | |
64 | ; Script | |
65 | ;################################## | |
66 | ||
67 | Global $oMyRet[2] | |
68 | Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") | |
69 | $rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl) | |
70 | If @error Then | |
71 | MsgBox(0, "Error sending message", "Error code:" & @error & " Description:" & $rc) | |
72 | EndIf | |
73 | ; | |
74 | ; The UDF | |
75 | Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance = "Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0) | |
76 | Local $objEmail = ObjCreate("CDO.Message") | |
77 | $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' | |
78 | $objEmail.To = $s_ToAddress | |
79 | Local $i_Error = 0 | |
80 | Local $i_Error_desciption = "" | |
81 | If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress | |
82 | If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress | |
83 | $objEmail.Subject = $s_Subject | |
84 | If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then | |
85 | $objEmail.HTMLBody = $as_Body | |
86 | Else | |
87 | $objEmail.Textbody = $as_Body & @CRLF | |
88 | EndIf | |
89 | If $s_AttachFiles <> "" Then | |
90 | Local $S_Files2Attach = StringSplit($s_AttachFiles, ";") | |
91 | For $x = 1 To $S_Files2Attach[0] | |
92 | $S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x]) | |
93 | ;~ ConsoleWrite('@@ Debug : $S_Files2Attach[$x] = ' & $S_Files2Attach[$x] & @LF & '>Error code: ' & @error & @LF) ;### Debug Console | |
94 | If FileExists($S_Files2Attach[$x]) Then | |
95 | ConsoleWrite('+> File attachment added: ' & $S_Files2Attach[$x] & @LF) | |
96 | $objEmail.AddAttachment($S_Files2Attach[$x]) | |
97 | Else | |
98 | ConsoleWrite('!> File not found to attach: ' & $S_Files2Attach[$x] & @LF) | |
99 | SetError(1) | |
100 | Return 0 | |
101 | EndIf | |
102 | Next | |
103 | EndIf | |
104 | $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 | |
105 | $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer | |
106 | If Number($IPPort) = 0 Then $IPPort = 25 | |
107 | $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort | |
108 | ;Authenticated SMTP | |
109 | If $s_Username <> "" Then | |
110 | $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 | |
111 | $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username | |
112 | $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password | |
113 | EndIf | |
114 | If $ssl Then | |
115 | $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True | |
116 | EndIf | |
117 | ;Update settings | |
118 | $objEmail.Configuration.Fields.Update | |
119 | ; Set Email Importance | |
120 | Switch $s_Importance | |
121 | Case "High" | |
122 | $objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "High" | |
123 | Case "Normal" | |
124 | $objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "Normal" | |
125 | Case "Low" | |
126 | $objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "Low" | |
127 | EndSwitch | |
128 | $objEmail.Fields.Update | |
129 | ; Sent the Message | |
130 | $objEmail.Send | |
131 | If @error Then | |
132 | SetError(2) | |
133 | Return $oMyRet[1] | |
134 | EndIf | |
135 | $objEmail = "" | |
136 | EndFunc ;==>_INetSmtpMailCom | |
137 | ; | |
138 | ; | |
139 | ; Com Error Handler | |
140 | Func MyErrFunc() | |
141 | $HexNumber = Hex($oMyError.number, 8) | |
142 | $oMyRet[0] = $HexNumber | |
143 | $oMyRet[1] = StringStripWS($oMyError.description, 3) | |
144 | ConsoleWrite("### COM Error ! Number: " & $HexNumber & " ScriptLine: " & $oMyError.scriptline & " Description:" & $oMyRet[1] & @LF) | |
145 | SetError(1); something to check for when this function returns | |
146 | Return | |
147 | EndFunc ;==>MyErrFunc |