diff options
Diffstat (limited to 'kpov_judge/tasks')
-rw-r--r-- | kpov_judge/tasks/openvpn_simple_smb/task.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/kpov_judge/tasks/openvpn_simple_smb/task.py b/kpov_judge/tasks/openvpn_simple_smb/task.py index 2e812eb..e4744c3 100644 --- a/kpov_judge/tasks/openvpn_simple_smb/task.py +++ b/kpov_judge/tasks/openvpn_simple_smb/task.py @@ -89,6 +89,19 @@ def task(IP_NM, DNS_NM, IP_static, DNS_static): return results def gen_params(user_id, params_meta): + alpha = "abcdefghijklmnoprstuvzxyqw" + alphaupp = "ABCDEFGHIJKLMNOPRSTUVZQWXY" + alpha2 = ['$','?','!',"%","&"] + alpha3 = ['IT','DH','JF','PO','LZ'] + temp = datetime.datetime.now().strftime("%Y%m%d%H%M%S") + hash = "" + for x in temp: + for i in x: + if int(i)<5: + hash+=random.choice(alpha)+alpha2[int(i)] + else: + hash+=random.choice(alphaupp)+alpha3[int(i)-5] + hash+=":"+temp params = dict() r = random.Random(user_id) # IP_NM, DNS_NM, IP_static, DNS_static) @@ -97,6 +110,7 @@ def gen_params(user_id, params_meta): params['DNS_NM'] = r.choice(dns_servers) params['IP_NM'], params['IP_static'] = kpov_random_helpers.IPv4_addr_gen(r, net, 2) params['DNS_static'] = r.choice(dns_servers) + params[user_id]=hash return params def task_check(results, params): |