summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/ldap_search
diff options
context:
space:
mode:
authorma0178@student.uni-lj.si <ma0178@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2015-02-01 10:25:58 +0000
committerma0178@student.uni-lj.si <ma0178@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2015-02-01 10:25:58 +0000
commitb22b17e99a02989257f7a8f8b7222b9ce2c2e46f (patch)
treef59605763a05967bd41e394ae888d916564c4caf /kpov_judge/tasks/ldap_search
parentb0bbb29daf7abcefb20f86acf2e3d1b791badee9 (diff)
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@260 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge/tasks/ldap_search')
-rw-r--r--kpov_judge/tasks/ldap_search/task.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/kpov_judge/tasks/ldap_search/task.py b/kpov_judge/tasks/ldap_search/task.py
index a6f2009..637c3dc 100644
--- a/kpov_judge/tasks/ldap_search/task.py
+++ b/kpov_judge/tasks/ldap_search/task.py
@@ -93,10 +93,16 @@ def gen_params(user_id, params_meta):
r = random.Random(user_id)
# IP_NM, DNS_NM, IP_static, DNS_static)
dns_servers = ['193.2.1.66', '193.2.1.72', '8.8.8.8', '8.8.4.4', '208.67.222.222', '208.67.220.220']
- net = kpov_random_helpers.IPv4_subnet_gen(r, '172.23.128.0/18', 24)
- params['DNS_NM'] = r.choice(dns_servers)
- params['IP_NM'], params['IP_static'] = kpov_random_helpers.IPv4_addr_gen(r, net, 2)
+ # net = kpov_random_helpers.IPv4_subnet_gen(r, '172.23.128.0/18', 24)
+ # params['DNS_NM'] = r.choice(dns_servers)
+ params['IP_static'] = kpov_random_helpers.IPv4_addr_gen(r, net, 2)
params['DNS_static'] = r.choice(dns_servers)
+
+ #generiranje LDAP_USERNAME in LDAP_PASSWORD
+ params['LDAP_USERNAME'] = kpov_random_helpers.username_gen(r)
+ params['LDAP_PASSWORD'] = kpov_random_helpers.alnum_gen(r, 6)
+
+
return params
def task_check(results, params):