diff --git a/dipla/client/client_factory.py b/dipla/client/client_factory.py index f8c91d1..d184773 100644 --- a/dipla/client/client_factory.py +++ b/dipla/client/client_factory.py @@ -8,6 +8,10 @@ from dipla.shared.statistics import StatisticsUpdater from logging import FileHandler import multiprocessing +import hashlib +import string +import random +import os class ClientFactory: @@ -89,4 +93,13 @@ def _create_verify_inputs_service(client): @staticmethod def _create_binary_receiver(client): - return BinaryReceiverService(client, './binary') + m = hashlib.md5() + path = None + while True: + m.update(random.choice(string.ascii_letters).encode('utf-8')) + path = '.dipla_' + m.hexdigest() + if not os.path.isdir(path): + os.mkdir(path) + break + path += '/' + return BinaryReceiverService(client, path)