Created
May 31, 2017 07:30
-
-
Save wozozo/49b93c0579006bbaa929ce67956d1c5f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
from uuid import uuid4 | |
import redis | |
r = redis.StrictRedis(host='', port=0, db=0, password='') | |
class Attacker(threading.Thread): | |
def __init__(self, name): | |
threading.Thread.__init__(self) | |
self.name = name | |
def run(self): | |
for i in range(1000): | |
key = str(uuid4()) | |
r.set(key, i) | |
print(f'{self.name}: {i} ({key})') | |
for i in range(20): | |
attacker_ = Attacker(f'Attacker{i}') | |
attacker_.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment