summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/openvpn_simple_smb
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge/tasks/openvpn_simple_smb')
-rw-r--r--kpov_judge/tasks/openvpn_simple_smb/task.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/kpov_judge/tasks/openvpn_simple_smb/task.py b/kpov_judge/tasks/openvpn_simple_smb/task.py
index 1ff035b..2db4337 100644
--- a/kpov_judge/tasks/openvpn_simple_smb/task.py
+++ b/kpov_judge/tasks/openvpn_simple_smb/task.py
@@ -4,7 +4,7 @@
# kpov_random_helpers should be imported by add_assignment.py
instructions = {
- 'si':u"""
+ 'si':"""
Postavi dva navidezna računalnika - SimpleArbiter z diska SimpleArbiterVPN ter
VPNClient1. Poskrbite, da bosta povezana med seboj in v Internet.
Na VPNClient1 namestite OpenVPN in program za nadzor nad virtualnimi napravami
@@ -20,7 +20,7 @@ Nato poskrbite, da bo na VPNClient1 na navideznem omrežju prek NFS omogočen
dostop do imenika /home/test/{DIRNAME}.
V ta imenik skopirajte datoteke, ki so prek SMB dostopne na SimpleArbiter.
""",
- 'en':u"""
+ 'en':"""
Setup two virtual machines - SimpleArbiterVPN and a VPN client (VPNClient1).
Set the client's network up so that it has access to the internal network and
the internet.
@@ -244,12 +244,12 @@ def task_check(results, params):
# get r into the correct state
r = random.Random(params['secret_random_seed'])
s = "\n".join([
- "".join([r.choice("0123456789abcdef") for i in xrange(32)])
- for i in xrange(16)])
+ "".join([r.choice("0123456789abcdef") for i in range(32)])
+ for i in range(16)])
keyfile = kpov_random_helpers.fname_gen(r, extension=False)
# now check the filenames
fnames_ok = True
- for i in xrange(3):
+ for i in range(3):
fname = kpov_random_helpers.fname_gen(r, False)
foo = kpov_random_helpers.fortune(r, 4096)
pos = results['SimpleArbiter_ls'].find(fname + '.txt')
@@ -299,8 +299,8 @@ def prepare_disks(templates, task_params, global_params):
import random
r = random.Random(task_params['secret_random_seed'])
s = "\n".join([
- "".join([r.choice("0123456789abcdef") for i in xrange(32)])
- for i in xrange(16)])
+ "".join([r.choice("0123456789abcdef") for i in range(32)])
+ for i in range(16)])
s = """#
# 2048 bit OpenVPN static key
#
@@ -318,7 +318,7 @@ iface tap0 inet static
netmask 255.255.255.0
""".format(task_params['IP_SimpleArbiterVPN'])
templates['simpleArbiterDhcpGWVPN'].write_append("/etc/network/interfaces", netaddr_s)
- for i in xrange(3):
+ for i in range(3):
fname = kpov_random_helpers.fname_gen(r, False)
templates['simpleArbiterDhcpGWVPN'].write(
"/srv/smb/" + fname + '.txt',