antichat PM flooder

  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
#!usr/bin/env python
# -*- coding:utf-8 -*-
# Antichat PM flooder
import time
import urllib
import urllib2
import cookielib
import threading
from Tkinter import *
from tkMessageBox import showerror
PAUSE = False
STOP = False
Headers = {"User-Agent" : "Opera/9.64 (Windows NT 5.1; U; en) Presto/2.1.1",
"Accept" : "text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1",
"Accept-Language" : "ru,uk-UA;q=0.9,uk;q=0.8,en;q=0.7",
"Accept-Charset" : "iso-8859-1, utf-8, utf-16, *;q=0.1",
"Accept-Encoding" : "identity, *;q=0",
"Connection" : "Keep-Alive",
"Referer" : "http://forum.antichat.ru/"}
def login_(login, password):
login_table = urllib.urlencode({"do":"login",
"forceredirect":u"1",
"url":"http://forum.antichat.ru/forum36.html",
"vb_login_md5password":"",
"vb_login_md5password_utf":"",
"s":"",
"vb_login_username":login.encode("cp1251"),
"vb_login_password":password.encode("cp1251"),
"cookieuser":"1"})
cookies = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookies))
urllib2.install_opener(opener)
login_request = urllib2.Request("http://forum.antichat.ru/login.php", login_table, Headers)
try:
login_page = urllib2.urlopen(login_request).read()
except:
return None
if "http://forum.antichat.ru/forum36.html" in login_page:
return cookies
else:
return None
def send_message(cookies, victim):
message = MessageText.get(0.0, "end")
header = HeaderEntry.get()
send_table = urllib.urlencode({"recipients":victim.encode("cp1251"),
"title":header.encode("cp1251"),
"mode":"0",
"message":message.encode("cp1251"),
"iconid":"0",
"s":"",
"do":"insertpm",
"forward":"",
"receipt":"0",
"sbutton":u"Создать сообщение".encode("cp1251"),
"savecopy":"0",
"parseurl":"1"})
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookies))
urllib2.install_opener(opener)
flood_request = urllib2.Request("http://forum.antichat.ru/private.php", send_table, Headers)
try:
flood_page = urllib2.urlopen(flood_request).read()
except:
pass
def flood(login, password, victim, howmany):
global Counter
cnter = 0
cookies = login_(login, password)
if cookies is None:
YournickEntry["state"] = "normal"
YourpasswordEntry["state"] = "normal"
VictimEntry["state"] = "normal"
CountSpinbox["state"] = "readonly"
StartButton["state"] = "normal"
PauseButton["state"] = "disabled"
StopButton["state"] = "disabled"
PauseButton["text"] = u"Подождать11"
showerror(u"Ошибка", u"Неверные имя пользователя/пароль")
return
else:
while not STOP:
if PAUSE:
time.sleep(0.1)
else:
if cnter == howmany:
return
else:
send_message(cookies, victim)
cnter += 1
Counter.set(cnter)
time.sleep(60)
YournickEntry["state"] = "normal"
YourpasswordEntry["state"] = "normal"
VictimEntry["state"] = "normal"
CountSpinbox["state"] = "readonly"
StartButton["state"] = "normal"
PauseButton["state"] = "disabled"
StopButton["state"] = "disabled"
PauseButton["text"] = u"Подождать11"
return
def Start_Button():
PAUSE = False
STOP = False
login = YournickEntry.get()
password = YourpasswordEntry.get()
victim = VictimEntry.get()
howmany = int(CountSpinbox.get())
YournickEntry["state"] = "disabled"
YourpasswordEntry["state"] = "disabled"
VictimEntry["state"] = "disabled"
CountSpinbox["state"] = "disabled"
StartButton["state"] = "disabled"
PauseButton["state"] = "normal"
StopButton["state"] = "normal"
threading.Thread(target=flood, args=[login, password, victim, howmany]).start()
return
def Pause_Button():
global PAUSE
if PAUSE:
PAUSE = False
PauseButton["text"] = u"Подождать11"
elif not PAUSE:
PAUSE = True
PauseButton["text"] = u"Ждемс11"
return
def Stop_Button():
global STOP
global PAUSE
PAUSE = False
STOP = True
YournickEntry["state"] = "normal"
YourpasswordEntry["state"] = "normal"
VictimEntry["state"] = "normal"
CountSpinbox["state"] = "readonly"
StartButton["state"] = "normal"
PauseButton["state"] = "disabled"
StopButton["state"] = "disabled"
PauseButton["text"] = u"Подождать11"
MainWindow = Tk()
MainWindow.title(u"Antichat.ru PM flooder")
MainWindow["bd"] = 5
Counter = StringVar()
YournickLabel = Label(MainWindow, text=u"Ваш ник :", anchor="w", width=15)
YournickEntry = Entry(MainWindow, width=20)
YournickLabel.grid(row=0, column=0, sticky="w")
YournickEntry.grid(row=0, column=1, sticky="e")
YourpasswordLabel = Label(MainWindow, text=u"Ваш пароль :", anchor="w", width=15)
YourpasswordEntry = Entry(MainWindow, width=20)
YourpasswordLabel.grid(row=1, column=0, sticky="w")
YourpasswordEntry.grid(row=1, column=1, sticky="e")
VictimLabel = Label(MainWindow, text=u"Ник жертвы :", anchor="w", width=15)
VictimEntry = Entry(MainWindow, width=20)
VictimLabel.grid(row=2, column=0, sticky="w")
VictimEntry.grid(row=2, column=1, sticky="e")
CountLabel = Label(MainWindow, text=u"Количество(шт) :", anchor="w", width=15)
CountSpinbox = Spinbox(MainWindow, width=5, state="readonly", wrap=True, from_=0, to_=1000)
CountLabel.grid(row=3, column=0, sticky="w")
CountSpinbox.grid(row=3, column=1, sticky="e")
SendedLabel = Label(MainWindow, text=u"Отправлено(шт) :", anchor="w", width=15)
SendedCount = Label(MainWindow, textvariable=Counter, width=20, anchor="e")
SendedLabel .grid(row=4, column=0, sticky="w")
SendedCount.grid(row=4, column=1, sticky="e")
HeaderLabel = Label(MainWindow, text=u"Заголовок мессаги :", anchor="w", width=15)
HeaderEntry = Entry(MainWindow, width=20)
HeaderLabel.grid(row=5, column=0, sticky="w")
HeaderEntry.grid(row=5, column=1, sticky="e")
MessageLabel = Label(MainWindow, text=u"Текст мессаги :", anchor="w", width=15)
MessageText = Text(MainWindow, width=5, height=5)
MessageLabel.grid(row=6, column=0, columnspan=2, sticky="we")
MessageText.grid(row=7, column=0, columnspan=2, sticky="we")
ButtonsFrame = Frame(MainWindow)
ButtonsFrame.grid(row=8, column=0, columnspan=2)
StartButton = Button(ButtonsFrame, text=u"Отаке!!11", command=Start_Button)
StartButton.grid(row=0, column=0)
PauseButton = Button(ButtonsFrame, text=u"Подождать11", state="disabled", command=Pause_Button)
PauseButton.grid(row=0, column=1)
StopButton = Button(ButtonsFrame, text=u"Стоять!!", state="disabled", command=Stop_Button)
StopButton.grid(row=0, column=2)
MainWindow.mainloop()