#!/usr/bin/env python # -*- coding: utf-8 -*- # # Спамер движка wap-motor # created by inlanger # http://towap.info # импорт библиотек from twill.commands import go, showforms, formclear, fv, submit, code, show,find, get_browser import re, time # Заполните переменные siteIn = raw_input("Input site name without http: ") login = raw_input("Input login: ") passw = raw_input("Input pass: ") message = raw_input("Input message: ".encode('utf8')) sleeptime = raw_input("Input timeout: ") # тело программы site = "http://"+siteIn+"/" go(site+'input.php?login='+login+'&pass='+passw) # авторизация go(site+'forum/') # идём на форум forumhtml = show() # получаем содержимое страницы в переменную forumhtml sections = re.findall('fid=(\d+)&"', forumhtml) # ищем ID разделов форума. sections - массив с разделами for section in sections: # перебираем все значения sections go(site+'forum/index.php?fid='+section+'&') # идём в категорию, ID которой равно section html=show() # получаем содержимое страницы в переменную html print "================================================" themes = re.findall('amp;id=(\d+)&"', html) # получаем список тем code("200") print u"Themes found, spam starting..." for number in themes: # перебираем все значения themes print u"Try to spam "+site+"forum/index.php?fid="+section+"&id=" + number try: go (site+'forum/index.php?fid='+section+'&id=' + number) except: print u"go URL error" try: fv("1", "msg", message) submit() except: print u"Form not found!!!" code("200") print u"Done... Waiting to spam next theme..." time.sleep(sleeptime) # пауза работы скрипта. На некоторых сайтах стоит ограничение по времени между двумя постами print "DONE"