summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge/tasks')
-rw-r--r--kpov_judge/tasks/basic_network_gcc/task.py33
-rw-r--r--kpov_judge/tasks/copy_rename_100_files/task.py8
-rw-r--r--kpov_judge/tasks/copy_rename_20_files_tail_env/task.py120
-rw-r--r--kpov_judge/tasks/custom_rdate/task.py49
-rw-r--r--kpov_judge/tasks/dhcp_dns_predefined_ip/task.py2
-rw-r--r--kpov_judge/tasks/edit_find_grep_compile_convert/task.py65
-rw-r--r--kpov_judge/tasks/isc_dhcp_live_boot/task.py82
-rw-r--r--kpov_judge/tasks/ldap_import/task.py5
-rw-r--r--kpov_judge/tasks/ldap_search/task.py88
-rw-r--r--kpov_judge/tasks/mock_entrance_exam/task.py69
-rw-r--r--kpov_judge/tasks/nat_port_forward/task.py5
-rw-r--r--kpov_judge/tasks/nat_vlc/task.py46
-rw-r--r--kpov_judge/tasks/network_boot_custom_program/task.py4
-rw-r--r--kpov_judge/tasks/openvpn_multiple_hops/task.py4
-rw-r--r--kpov_judge/tasks/openvpn_simple_smb/task.py55
-rw-r--r--kpov_judge/tasks/openwrt/task.py4
-rw-r--r--kpov_judge/tasks/public_ip_ssh/task.py4
-rw-r--r--kpov_judge/tasks/public_ssh_motd_http/task.py4
-rw-r--r--kpov_judge/tasks/radius_multiple_realms/task.py4
-rw-r--r--kpov_judge/tasks/radius_mysql_pam/task.py65
-rw-r--r--kpov_judge/tasks/rdate_64bit/task.py4
-rw-r--r--kpov_judge/tasks/rename_grep_network/task.py4
-rw-r--r--kpov_judge/tasks/set_ip_dhcp_hostname/task.py4
-rw-r--r--kpov_judge/tasks/set_ip_static_dhcp/task.py48
-rw-r--r--kpov_judge/tasks/set_motd/task.py51
-rw-r--r--kpov_judge/tasks/smb_nfs/task.py30
-rw-r--r--kpov_judge/tasks/snmp_agent_uptime/task.py81
-rw-r--r--kpov_judge/tasks/snmp_alarms_interfaces/task.py4
-rw-r--r--kpov_judge/tasks/vlc_stream_rtp/task.py39
29 files changed, 477 insertions, 504 deletions
diff --git a/kpov_judge/tasks/basic_network_gcc/task.py b/kpov_judge/tasks/basic_network_gcc/task.py
index c4c4393..b23c060 100644
--- a/kpov_judge/tasks/basic_network_gcc/task.py
+++ b/kpov_judge/tasks/basic_network_gcc/task.py
@@ -5,29 +5,30 @@
# - switch to a real SSH/SFTP client to properly handle filenames
instructions = {
- 'si': '''
-Postavite dva navidezna računalnika - SimpleArbiter in Student.
-Oba naj bosta povezana na internet. Poleg tega mora biti
-Student na naslovu {student_IP} dostopen s SimpleArbiter.
+ 'si': '''\
+<p>
+Postavite dva navidezna računalnika: <em>SimpleArbiter</em> in <em>Student</em>. Oba naj bosta povezana na internet. Poleg tega mora biti <em>Student</em> na naslovu <code>{{student_IP}</code> dostopen s <em>SimpleArbiter</em>.
-Računajte, da se na Student ob zagonu zažene program {net_prog_name},
+<p>
+Računajte, da se na <em>Student</em> ob zagonu zažene program <code>{{net_prog_name}</code>,
ki vam spreminja nastavitve mrežne kartice.
-V domačem imeniku uporabnika student obstaja program {P_c} v programskem jeziku C.
-Prevedite ga v program z imenom {P_executable}.
-Izvorna koda je namenoma pokvarjena tako, da so vanjo vrinjeni nepotrebni znaki.
+<p>
+V domačem imeniku uporabnika <code>student</code> obstaja program <code>{{P_c}</code> v programskem jeziku C. Prevedite ga v program z imenom <code>{{P_executable}</code>. Izvorna koda je namenoma pokvarjena tako, da so vanjo vrinjeni nepotrebni znaki.
Pred prevajanjem jo morate popraviti.
-Napišite skripto ali program {P_script} v domačem imeniku uporabnika student, ki:
-- požene {P_executable} z argumentom "{arg_c}" in mu na standardni vhod
- pripelje vrednost spremenljivke {env_c}
-- vse, kar {P_executable} izpiše na stderr, spravi v datoteko {out_stderr_c}.
-- vse vrstice, ki jih {P_executable} izpiše na stdout in vsebujejo
- zaporedje znakov "ma", zapiše v {out_stdout_c}.
+<p>
+Napišite skripto ali program <code>{{P_script}</code> v domačem imeniku uporabnika <code>student</code>, ki
+<ul>
+<li>požene <code>{{P_executable}</code> z argumentom <code>{{arg_c}</code> in mu na standardni vhod pripelje vrednost spremenljivke <code>{{env_c}</code>;
+<li>vse, kar <code>{{P_executable}</code> izpiše na <code>stderr</code>, spravi v datoteko <code>{{out_stderr_c}</code>;
+<li>vse vrstice, ki jih <code>{{P_executable}</code> izpiše na <code>stdout</code> in vsebujejo zaporedje znakov <code>ma</code>, zapiše v <code>{{out_stdout_c}</code>.
+</ul>
-Lastnik vseh ustvarjenih datotek mora biti uporabnik student.
-Gesla uporabnika student (vaje) ne smete spreminjati.''',
+<p>
+Lastnik vseh ustvarjenih datotek mora biti uporabnik <code>student</code>. Gesla uporabnika student (<code>vaje</code>) ne smete spreminjati.
+''',
'en': '''
''',
}
diff --git a/kpov_judge/tasks/copy_rename_100_files/task.py b/kpov_judge/tasks/copy_rename_100_files/task.py
index 051f9f7..9dcf69a 100644
--- a/kpov_judge/tasks/copy_rename_100_files/task.py
+++ b/kpov_judge/tasks/copy_rename_100_files/task.py
@@ -6,20 +6,20 @@
instructions = {
'si':"""
-Ustvari dva navidezna računalnika. Za prvega uporabi sliko diska simpleArbiterDhcp. Na drugem računalniku
+<pre>Ustvari dva navidezna računalnika. Za prvega uporabi sliko diska simpleArbiterDhcp. Na drugem računalniku
ustvari uporabnika test z geslom test.
Na sliki diska simpleArbiterDhcp najdeš imenik s 100 datotekami. Prekopiraj vse datoteke na drugi računalnik v domači imenik uporabnika test.
Spremeni vsebino datotek tako, da vse male črke spremeniš v velike. Poskrbi, da se bo s prvega računalnika (simpleArbiterDhcp) mogoče prek
-ssh prijaviti na drugi računalnik in prebrati predelane datoteke.
+ssh prijaviti na drugi računalnik in prebrati predelane datoteke.</pre>
""",
'en': '''
-Create two virtual machines. For the first, use the `simpleArbiterDhcp' image.
+<pre>Create two virtual machines. For the first, use the `simpleArbiterDhcp' image.
On the second machine, create a user `test' with the password `test'.
The `simpleArbiterDhcp' disk image contains a folder with 100 files. Copy all
of these files to the other computer into the home folder of theuser `test'.
Modify the content of these files by converting all lowercase letters into
uppercase. Make sure that the first machine (`simpleArbiterDhcp') can use ssh
-to access the second machine and read the processed files.
+to access the second machine and read the processed files.</pre>
''',
}
diff --git a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
index aa57d3e..6a4b18a 100644
--- a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
+++ b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
@@ -1,69 +1,56 @@
# kpov_util should be imported by add_assignment.py
-# TODO (polz):
instructions = {
- 'si':"""
-Prijavi se na sistem kot uporabnik student z geslom vaje.
-V domači mapi najdeš imenik {file_rename_dirname} z 20 datotekami.
- - Preimenuj vse datoteke tako, da zamenjaš minuse s podčrtaji
- - Napiši najkrajši ukaz v bash, ki vse datoteke iz imenika {mv_src_dir}
- premakne v imenik {mv_dst_dir}. Ukaz spravi v
- /home/student/mv_ukaz. Pazi, da bodo ob testiranju v izvornem imeniku ISTE
- datoteke, kot so bile, ko je bila virtualka nova, ciljni imenik pa bo
- prazen. To pomeni, da boste verjetno morali po vsakem testiranju datoteke
- premakniti nazaj. Za krajšanje ukaza lahko izkoristite imeni imenikov.
- - Napiši ukaz, ki s pomočjo ukaza grep v datoteko ~/mama.txt izpiše imena vseh
- navadnih (ne skritih) datotek v trenutnem imeniku, ki vsebujejo niz "mama",
- v datoteko ~/napake.txt pa izpiše vse morebitne napake (npr. to, da so nekateri
- objekti v trenutnem imeniku dejansko imeniki ali napačne simbolične povezave).
- Ukaz spravite v datoteko /home/student/mama_ukaz.
- - Napiši program (lahko v bash), ki bo 5s sledil vsebini /var/log/syslog. V
- primeru, da se v syslogu pojavi niz "zmeda", naj program izpiše "imam ga".
- Poleg tega naj program med sledenjem syslog-u odšteva od 5 do 1 (vsako sekundo
- naj se izpiše naslednja številka. Program naj bo v /home/student/syslog_ukaz.sh
- - Namesti paket "cowsay" in ga preizkusi :)
- - S pomočjo programa cURL preštej število pojavitev niza "images" v html kodi,
- ki jo dobiš na naslovu http://localhost/{curl_fname} na malishell in število zapiši
- v spremenljivko $images na simpleArbiterDhcpGW v lupini, kjer poganjaš
- task_check.py
- - V imeniku {wc_dirname} najdeš datoteko count.txt. Preštej število prehodov
- v novo vrstico v count.txt in rezultat zapiši v novo datoteko - lines.txt
- v istem imeniku.
-""",
- 'en':"""
-Log into the system as student using vaje as your password.
-In your home folder you will find a directory called {file_rename_dirname}
- containing 20 files.
- - Rename all files in that directory replacing all dashes with
- underscores
- - Find the shortest command for copying all the files located in
- {mv_src_dir} into the folder {mv_dst_dir}.
- Create a shell script /home/student/mv_ukaz containing this command.
- Before running test_task, make sure {mv_src_dir} contains the same
- files as when you downloaded your virtual disk. This probably means
- that you will have to move the files back from {mv_dst_dir} to
- {mv_src_dir} after each test. You can use the directory na
- - Come up with a command or sequence of commands in bash which will,
- using grep, write the names all normal (not hidden) files which contain
- the string "mama" and are located in the working directory (pwd)
- into the file ~/mama.txt while writing errors such as files in current
- directory being folders or symbolic links in the file called
- "napake.txt". Write this command to mama_ukaz.
- - Write a program (which may be a shell script) that will track the contents
- of /var/log/syslog for 5s. Every time an entry containing the string "zmeda"
- appears in the syslog, the script should output "imam ga".
- In addition, the script should count down from 5 to 1 with a 1 second
- interval. Store the script in /home/student/syslog_ukaz.sh .
- - Install the packet "cowsay" and test it :)
- - With the help of cURL count the number of occurences of the string
- "images" on the web page accessible from malishell at
- http://localhost/{curl_fname}.
- On simpleArbiterDhcpGW within the shell where you are running test_task.py, set
- the environment variable $images to this number.
- - In the directory {wc_dirname} there is a file called count.txt. Write the
- number of newlines in this file into the file lines.txt in the same
- directory.
-"""
+ 'si': '''\
+<p>
+Prijavi se na sistem kot uporabnik <code>student</code> z geslom <code>vaje</code>.
+
+<p>
+V domači mapi najdeš imenik <code>{{file_rename_dirname}}</code> z 20 datotekami. Preimenuj vse datoteke tako, da zamenjaš minuse s podčrtaji.
+
+<p>
+Napiši najkrajši ukaz v <code>bash</code>, ki vse datoteke iz imenika <code>{{mv_src_dir}}</code> premakne v imenik <code>{{mv_dst_dir}}</code>. Ukaz spravi v <code>/home/student/mv_ukaz</code>. Pazite, da bodo ob testiranju v izvornem imeniku <em>iste</em> datoteke, kot so bile, ko je bila virtualka nova, ciljni imenik pa bo prazen. To pomeni, da boste verjetno morali po vsakem testiranju datoteke premakniti nazaj. Za krajšanje ukaza lahko izkoristite imeni imenikov.
+
+<p>
+Napiši ukaz, ki s pomočjo ukaza <code>grep</code> v datoteko <code>~/mama.txt</code> izpiše imena vseh navadnih (ne skritih) datotek v trenutnem imeniku, ki vsebujejo niz <code>mama</code>, v datoteko <code>~/napake.txt</code> pa izpiše vse morebitne napake (npr. to, da so nekateri objekti v trenutnem imeniku dejansko imeniki ali napačne simbolične povezave). Ukaz spravite v datoteko <code>/home/student/mama_ukaz</code>.
+
+<p>
+Napiši program (lahko v <code>bash</code>), ki bo pet sekund sledil vsebini <code>/var/log/syslog</code>. V primeru, da se v syslogu pojavi niz <code>zmeda</code>, naj program izpiše <code>imam ga</code>. Poleg tega naj program med sledenjem syslog-u odšteva od 5 do 1 (vsako sekundo naj se izpiše naslednja številka). Program naj bo v <code>/home/student/syslog_ukaz.sh</code>.
+
+<p>
+Namesti paket <code>cowsay</code> in ga preizkusi. 😊
+
+<p>
+S pomočjo programa <code>curl</code> preštej število pojavitev niza <code>images</code> v spletni strani, ki jo dobiš na naslovu <code>http://localhost/{{curl_fname}}</code> na <em>malishell</em> in število zapiši v spremenljivko <code>$images</code> na <em>simpleArbiterDhcpGW</em> v lupini, kjer poganjaš <code>task_check.py</code>.
+
+<p>
+V imeniku <code>{{wc_dirname}}</code> najdeš datoteko <code>count.txt</code>. Preštej število prehodov v novo vrstico v <code>count.txt</code> in rezultat zapiši v novo datoteko <code>lines.txt</code> v istem imeniku.
+''',
+ 'en': '''\
+<p>
+Log into the system as <code>student</code> using <code>vaje</code> as your password.
+
+<p>
+In your home folder you will find a directory called <code>{{file_rename_dirname}}</code> containing 20 files. Rename all files in that directory replacing all dashes with underscores
+
+<p>
+Find the shortest command for copying all the files located in <code>{{mv_src_dir}}</code> into the folder <code>{{mv_dst_dir}}</code>. Create a shell script <code>/home/student/mv_ukaz</code> containing this command. Before running <code>test_task.py</code>, make sure <code>{{mv_src_dir}}</code> contains the same files as when you downloaded your virtual disk. This probably means that you will have to move the files back from <code>{{mv_dst_dir}}</code> to <code>{{mv_src_dir}}</code> after each test.
+
+<p>
+Come up with a command or sequence of commands in bash which will, using <code>grep</code>, write the names all normal (not hidden) files which contain the string <code>mama</code> and are located in the working directory (<code>pwd</code>) into the file <code>~/mama.txt</code> while writing errors such as files in current directory being folders or symbolic links in the file called <code>napake.txt</code>. Write this command to <code>/home/student/mama_ukaz</code>.
+
+<p>
+Write a program (which may be a shell script) that will track the contents of <code>/var/log/syslog</code> for five seconds. Every time an entry containing the string <code>zmeda</code> appears in the syslog, the script should output <code>imam ga</code>. In addition, the script should count down from 5 to 1 with a one-second interval. Store the script in <code>/home/student/syslog_ukaz.sh</code>.
+
+<p>
+Install the package <code>cowsay</code> and test it. 😊
+
+<p>
+Using the <code>curl</code> command count the number of occurences of the string <code>images</code> on the web page accessible from <em>malishell</em> at <code>http://localhost/{{curl_fname}}</code>. On <em>simpleArbiterDhcpGW</em> within the shell where you are running <code>test_task.py</code>, set the environment variable <code>$images</code> to this number.
+
+<p>
+In the directory <code>{{wc_dirname}}</code> there is a file called <code>count.txt</code>. Write the number of newlines in this file into the file <code>lines.txt</code> in the same directory.
+''',
}
computers = {
@@ -303,11 +290,7 @@ def task_check(results, params):
return score, hints
def prepare_disks(templates, task_params, global_params):
-# d = templates['simpleArbiterDhcp']
import random
- #print "Haha!"
- #print params
- #print templates
d = templates['malishell']
r = random.Random(task_params['file_creator_random_seed'])
# rename
@@ -366,4 +349,5 @@ def prepare_disks(templates, task_params, global_params):
d.mkdir(task_params['wc_dirname'])
d.chown(1000, 1000, task_params['wc_dirname'])
d.write("{}".format(os.path.join(task_params['wc_dirname'], 'count.txt')), "".join(lx))
- #write_default_config(templates['simpleArbiterDhcpGW'], global_params)
+
+ write_default_config(templates['simpleArbiterDhcpGW'], global_params)
diff --git a/kpov_judge/tasks/custom_rdate/task.py b/kpov_judge/tasks/custom_rdate/task.py
index 4959266..4c5ff9f 100644
--- a/kpov_judge/tasks/custom_rdate/task.py
+++ b/kpov_judge/tasks/custom_rdate/task.py
@@ -2,34 +2,27 @@
# TODO: finish this!
instructions = {
- 'si':"""
-Postavite dva navidezna racunalnika:
-- SimpleArbiterDhcpRdate s slike diska simpleArbiterRdate ter
-- rdateClient.
-
-Na rdateClient ustvarite uporabnika test z geslom test. Nastavite cas na
-rdateClient tako, da kot rdate strežnik uporabite SimpleArbiterDhcpRdate.
-Nato v domacem imeniku uporabnika test ustvarite program z imenom
-{PROGRAM_FILENAME}.
-Program naj prebere 4 byte podatkov s standardnega vhoda in jih pretvori v
-predznaceno celo število, pri čemer naj uporablja zapis z debelim koncem
-(big endian).
-Število naj program izpiše na standardni izhod v obliki niza.
-""",
- 'en':"""
-Setup two virtual machines:
-- SimpleArbiterDhcpRdate from disk image simpleArbiterRdate and
-- rdateClient.
-
-On rdateClient, create a user with the username test and password test.
-Set the time on rdateClient using rdate with SimpleArbiterDhcpRdate as
-the server. Then, write a program called {PROGRAM_FILENAME} and put it in
-user test's home directory.
-The program should read 4 bytes of data from standard input, convert
-them into a signed integer using big endian byte ordering and output the
-resulting integer (as a string) to standard output.
-"""
-
+ 'si': '''\
+<p>
+Postavite dva navidezna računalnika: <em>SimpleArbiterDhcpRdate</em> in <em>rdateClient</em>.
+
+<p>
+Nastavite čas na <em>rdateClient</em> tako, da kot rdate strežnik uporabite <em>SimpleArbiterDhcpRdate</em>.
+
+<p>
+Na <em>rdateClient</em> ustvarite uporabnika <code>test</code> z geslom <code>test</code>. V domačem imeniku uporabnika <code>test</code> ustvarite program z imenom <code>{{PROGRAM_FILENAME}}</code>. Program naj prebere štiri bajte podatkov s standardnega vhoda in jih pretvori v predznačeno celo število, pri čemer naj uporablja zapis z debelim koncem (angl. <em lang="en">big endian</em>). Število naj program izpiše na standardni izhod v obliki niza.
+''',
+ 'en': '''\
+<p>
+Set up two virtual machines: <em>SimpleArbiterDhcpRdate</em> and <em>rdateClient</em>.
+
+<p>
+Set the time on <em>rdateClient</em> using rdate with <em>SimpleArbiterDhcpRdate</em> as
+the server.
+
+<p>
+On <em>rdateClient</em> create a user with the username <code>test</code> and password <code>test</code>. Then, write a program called <code>{{PROGRAM_FILENAME}}</code> and put it in user <code>test</code>’s home directory. The program should read four bytes of data from standard input, convert them into a signed integer using big endian byte ordering and output the resulting integer (as a string) to standard output.
+''',
}
computers = {
diff --git a/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py b/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py
index fb0de84..4822c2a 100644
--- a/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py
+++ b/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py
@@ -2,7 +2,7 @@
instructions = {
'si':"""
-Ustvari tri navidezne računalnike. Za enega (SimpleArbiter) uporabi sliko diska simpleArbiter. Na drugega (DHCP_server) postavi strežnika DHCP in DNS in poskrbi, da ta računalnik dobi IP naslov {IP_server}. Poskrbi, da bo preostali računalnik (DHCP_client) dobil naslov {IP_client}, ki mu ga določi DHCP strežnik. Poskrbi še,da DNS strežnik vrne za hostname {HOSTNAME_X} IP naslov {IP_X}.
+<pre>Ustvari tri navidezne računalnike. Za enega (SimpleArbiter) uporabi sliko diska simpleArbiter. Na drugega (DHCP_server) postavi strežnika DHCP in DNS in poskrbi, da ta računalnik dobi IP naslov {IP_server}. Poskrbi, da bo preostali računalnik (DHCP_client) dobil naslov {IP_client}, ki mu ga določi DHCP strežnik. Poskrbi še,da DNS strežnik vrne za hostname {HOSTNAME_X} IP naslov {IP_X}.</pre>
"""
}
diff --git a/kpov_judge/tasks/edit_find_grep_compile_convert/task.py b/kpov_judge/tasks/edit_find_grep_compile_convert/task.py
index 7a96a0b..48b713b 100644
--- a/kpov_judge/tasks/edit_find_grep_compile_convert/task.py
+++ b/kpov_judge/tasks/edit_find_grep_compile_convert/task.py
@@ -5,54 +5,43 @@
# - switch to a real SSH/SFTP client to properly handle filenames
instructions = {
- 'si':"""
-Ustvari dva navidezna računalnika s slikama diskov
-- SimpleArbiter s sliko diska simpleArbiterDhcp in
-SmallStudent s sliko diska student-entrance2.
+ 'si': '''\
+<p>
+Ustvari dva navidezna računalnika: <em>SimpleArbiter</em> <em>SmallStudent</em>.
-Na SimpleArbiter se lahko prijaviš z uporabniškim imenom tester in geslom tester.
-Na SmallStudent se lahko prijaviš kot root z geslom kaboom.
+<p>
+Poskrbi, da bo <em>SmallStudent</em> s <em>SimpleArbiter</em> dostopen na naslovu <code>{{testip}}</code>.
-Poskrbi, da bo SmallStudent s SimpleArbiter dostopen na naslovu {testip}.
+<p>
+Na <em>SmallStudent</em> ustvari uporabnika <code>{{testuser}}</code> z geslom <code>{{passwd}}</code>.
-Na SmallStudent ustvari uporabnika {testuser} z geslom {passwd}.
+<p>
+Na <em>SmallStudent</em> je nekje v domačem imeniku uporabnika <code>bilbo</code> skrita datoteka, ki vsebuje niz <code>{{magicstr}}</code>. Skopiraj jo v domači imenik uporabnika <code>{{testuser}}</code> in jo poimenuj <code>{{dstfile}}</code>. Poskrbi, da bo lastnik <code>{{testuser}}</code>, skupina pa naj bo enaka kot pri izvorni datoteki. Brati naj jo ima pravico samo lastnik, pisati lastnik in skupina, poganjati nihče.
-Na SmallStudent je nekje v domačem imeniku uporabnika "bilbo" skrita datoteka, ki vsebuje niz {magicstr}.
-Skopiraj jo v domači imenik {testuser} in poimenuj {dstfile}.
-Poskrbi, da bo lastnik {testuser}, skupina pa naj ostane nespremenjena.
-Brati naj jo ima pravico samo lastnik, pisati lastnik in skupina, poganjati nihče.
-V {dstfile} zamenjaj vse vrstice oblike poXYZlz, kjer so XYZ poljubni znaki, tako, da bo namesto XYZ niz "kaka".
+<p>
+V <code>{{dstfile}}</code> zamenjaj vse vrstice oblike <code>poXYZlz</code>, kjer je <code>XYZ</code> poljubno zaporedje znakov, tako, da bo namesto <code>XYZ</code> niz <code>kaka</code>.
-Napiši program v poljubnem programskem jeziku, ki kot argument sprejme število B med 0 in 7.
-Program naj prebere znak s standardnega vhoda.
-Če je B-ti bit v znaku nastavljen na 1, naj izpiše "ta".
-Če je B-ti bit nastavljen na 0, naj program izpiše "ti".
-Program poimenuj {progname} in ga spravi v domači imenik {testuser}.
-""",
- 'en': '''
-Create two virtual machines
-- SimpleArbiter using simpleArbiterDhcp as the disk image and
-SmallStudent using student-entrance2 as its disk.
+<p>
+Napiši program v poljubnem programskem jeziku, ki kot argument sprejme število B med 0 in 7. Program naj prebere znak s standardnega vhoda Če je B-ti bit v znaku nastavljen na 1, naj izpiše <code>ta</code>. Če je B-ti bit nastavljen na 0, naj program izpiše <code>ti</code>. Program poimenuj <code>{{progname}}</code> in ga spravi v domači imenik uporabnika <code>{{testuser}}</code>.
+''',
+ 'en': '''\
+<p>
+Create two virtual machines: <em>SimpleArbiter</em> and <em>SmallStudent</em>.
-You can log in as tester on SimpleArbiter with the password tester.
-You can log in as root on SimpleStudent with the password kaboom.
+<p>
+Make sure that <em>SmallStudent</em> is accessible from <em>SimpleArbiter</em> on IP <code>{{testip}}</code>.
-Make sure that SmallStudent is accessible from SimpleArbiter on IP {testip}.
+<p>
+Create a user <code>{{testuser}}</code> with the password <code>{{passwd}}</code> on <em>SmallStudent</em>.
-Create a user {testuser} with the password {passwd} on SmallStudent.
+<p>
+There is a file containing <code>{{magicstr}}</code> hidden somewhere in the home directory of user <code>bilbo</code>. Copy it into <code>{{testuser}}</code>’s home directory and name it <code>{{dstfile}}</code>. Change the owner to <code>{{testuser}}</code> and ensure the group is the same as for the original file. Make sure only the owner has the right to read it, only the owner and group members have the right to write to it and nobody has the right to execute it.
-There is a file containing {magicstr} hidden somewhere in the home directory of
-user "bilbo".
-Copy the into the home directory of user {testuser} and name it {dstfile}.
-Change the owner to {testuser} and leave the group unchanged.
-Make sure only the owner has the right to read it, only the owner and group members have the right to write to it and noone has the right to execute it.
-In {dstfile}, replace all lines of the form poXYZlz where XYZ are arbitrary characters so that XYZ is replaced by "kaka".
+<p>
+In <code>{{dstfile}}</code>, replace all lines of the form <code>poXYZlz</code> where <code>XYZ</code> are arbitrary characters so that <code>XYZ</code> is replaced by <code>kaka</code>.
-Write a program in any programming language.
-The program should accept a single argument, B, which is a number between 0 and 7.
-It should read a character from standard input and output "ta" if B-th bit in this character is
-set to 1. If B-th bit is not set, the program should output "ti".
-Name the program {progname} and place it in the home directory of {testuser}.
+<p>
+Write a program in any programming language. The program should accept a single argument B, which is a number between 0 and 7. It should read a character from standard input and output <code>ta</code> if B-th bit in this character is set to 1, and <code>ti</code>. If B-th bit is set to 0. Name the program <code>{{progname}}</code> and place it in the home directory of <code>{{testuser}}</code>.
''',
}
diff --git a/kpov_judge/tasks/isc_dhcp_live_boot/task.py b/kpov_judge/tasks/isc_dhcp_live_boot/task.py
index 38bbcd8..c1adc47 100644
--- a/kpov_judge/tasks/isc_dhcp_live_boot/task.py
+++ b/kpov_judge/tasks/isc_dhcp_live_boot/task.py
@@ -2,44 +2,40 @@
# kpov_util should be imported by add_assignment.py
instructions = {
- 'si':"""
-Postavi štiri navidezne računalnike - simpleArbiter, DHCP_server,
-BootableClientA ter BootableClientB.
-
-Na DHCP_server postavi DHCP strežnik s pomočjo ISC dhcp 3 na naslovu {IP_DHCP}.
-SimpleArbiter naj dobi {IP_GW}. DHCP_server naj ga uporabi kot gateway.
-
-Če se zaganja BootableClientB, naj se sistem zažene v datoteko z imenom {BOOT_FNAME}.
-Če se zaganja katerikoli drug, naj se sistem zažene z živega USB, ki ga predstavlja
-slika diska bootable_usb, ime datoteke z zagonskim nalagalnikom pa naj bo
-kakršno koli razen {BOOT_FNAME}.
-
-Živi USB priklopite na na DHCP_server ter z njega poberite datoteke, potrebne za zagon.
-Datoteke z nastavitvami za PXELinux, ki jih najdete na živem USB,
-MORAJO biti dostopne na korenskem imeniku strežnika TFTP.
-
-Tako BootableClientA kot BootableClientB naj bosta brez diskov.
-""",
- # TODO: write a proper translation. The one that used to be here was just wrong.
- 'en': """Set up 4 virtual computers - simpleArbiter, DHCP_server,
-BootableClientA and BootableClientB.
-
-On DHCP_server, set up a DHCP server using ISC dhcp 3. Set the IP address of
-this server to {IP_DHCP}. If SimpleArbiter requests an IP, have the DHCP server
-serve it {IP_GW}. DHCP_server should use SimpleArbiter as it's gateway.
-
-If BootableClientB tries to boot over the network, have the DHCP server tell it
-to boot from the file {BOOT_FNAME}. If any other system tries to boot over the
-network, have it boot from a live USB drive represented by the disk image
-bootable_usb and have the bootloader filename be different from {BOOT_FNAME}.
-
-Connect the live USB to DHCP_server and copy the files neccessarry for it to
-boot. The PXELinux configuration files must be the same as the ones found on
-the live USB and MUST be accessible on the TFTP server root.
-
-Both BootableCLientA and BootableClientB should be diskless.
-"""
+ 'si': '''\
+<p>
+Postavi štiri navidezne računalnike: <em>simpleArbiter</em>, <em>DHCP_server</em>, <em>BootableClientA</em> in <em>BootableClientB</em>.
+
+<p>
+Na <em>DHCP_server</em> postavi strežnik DHCP s pomočjo ISC dhcp 3 na naslovu <code>{{IP_DHCP}}</code>. <em>SimpleArbiter</em> naj dobi <code>{{IP_GW}}</code>. <em>DHCP_server</em> naj ga uporabi kot privzeti prehod (angl. <em lang="en">gateway</em>).
+
+<p>
+Če se zaganja <em>BootableClientB</em>, naj se sistem zažene v datoteko z imenom <code>{{BOOT_FNAME}}</code>. Če se zaganja katerikoli drug, naj se sistem zažene z živega USB, ki ga predstavlja slika diska <code>bootable_usb</code>, ime datoteke z zagonskim nalagalnikom pa naj bo kakršno koli razen <code>{{BOOT_FNAME}}</code>.
+
+<p>
+Živi USB priklopite na na <em>DHCP_server</em> in z njega poberite datoteke, potrebne za zagon. Datoteke z nastavitvami za PXELinux, ki jih najdete na živem USB, <em>morajo</em> biti dostopne na korenskem imeniku strežnika TFTP.
+
+<p>
+Tako <em>BootableClientA</em> kot <em>BootableClientB</em> naj bosta brez diskov.
+''',
+ 'en': '''\
+<p>
+Set up four virtual machines: <em>simpleArbiter</em>, <em>DHCP_server</em>, <em>BootableClientA</em> and <em>BootableClientB</em>.
+
+<p>
+On <em>DHCP_server</em>, set up a DHCP server using ISC dhcp 3. Set the IP address of this server to <code>{{IP_DHCP}}</code>. If <em>SimpleArbiter</em> requests an IP, have the DHCP server serve it <code>{{IP_GW}}</code>. <em>DHCP_server</em> should use <em>SimpleArbiter</em> as the gateway.
+
+<p>
+If <em>BootableClientB</em> tries to boot over the network, have the DHCP server tell it to boot from the file <code>{{BOOT_FNAME}}</code>. If any other system tries to boot over the network, have it boot from a live USB drive represented by the disk image <code>bootable_usb</code> and have the bootloader filename be different from <code>{{BOOT_FNAME}}</code>.
+
+<p>
+Connect the live USB to DHCP_server and copy the files neccessarry for it to boot. The PXELinux configuration files must be the same as the ones found on the live USB and <em>must</em> be accessible on the TFTP server root.
+
+<p>
+Both <em>BootableCLientA</em> and <em>BootableClientB</em> should be diskless.
+''',
}
+
computers = {
'DHCPServer': {
'disks': [
@@ -49,10 +45,6 @@ computers = {
'options':{'readonly': False},
'parts': [ {'dev': 'sdb1', 'path':'/mnt'} ],
},
- #{ 'name': 'CDROM',
- # 'options':{'readonly': True},
- # 'parts': [],# no parts, no mounting.
- #}
],
'network_interfaces': [{'network': 'net1'}],
'flavor': 'm1.tiny',
@@ -76,10 +68,6 @@ computers = {
'disks': [
{ 'name': 'simpleArbiterGW',
},
- #{ 'name': 'CDROM',
- # 'options': {'readonly': True},
- # 'parts': [{'dev': 'b1', 'path': '/cdrom'}],
- #},
],
'network_interfaces': [{'network': 'net1'}, {'network': 'test-net'}],
'flavor': 'm1.tiny',
@@ -121,8 +109,6 @@ def task(IP_DHCP, IP_GW, MAC_BOOT, BOOT_FNAME):
# could work (but you should test it)
ip_str = pexpect.run('ip addr show')
eth_re_str = r"ether (([0-9a-f]{{2}}:){{5}}[0-9a-f]{{2}})(.*)\r\n(.*){}(.*)\s(\w*)\r\n"
- # print eth_re_str.format(IP_DHCP)
- # print ip_str
ip_re = re.search(eth_re_str.format(IP_GW), ip_str)
mac_SA = ip_re.group(1)
eth_dev_SA = ip_re.group(6)
@@ -162,7 +148,6 @@ def gen_params(user_id, params_meta):
params['IP_DHCP'], params['IP_GW'] = kpov_util.IPv4_addr_gen(r, net, 2)
params['BOOT_FNAME'] = kpov_util.fname_gen(r)
params['TFTP_STRING'] = kpov_util.alnum_gen(r, 45)
- # IP_NM, DNS_NM, IP_static, DNS_static)
return params
def task_check(results, params):
@@ -209,7 +194,6 @@ def task_check(results, params):
return score, hints
def prepare_disks(templates, task_params, global_params):
-# d = templates['simpleArbiterDhcp']
d = templates['student-DHCPServer']
s = """# {}""".format(task_params['TFTP_STRING'])
d = templates['bootable_usb']
diff --git a/kpov_judge/tasks/ldap_import/task.py b/kpov_judge/tasks/ldap_import/task.py
index b46b432..f8fdd60 100644
--- a/kpov_judge/tasks/ldap_import/task.py
+++ b/kpov_judge/tasks/ldap_import/task.py
@@ -2,14 +2,13 @@
instructions = {
'si':"""
-Ustvari dva navidezna računalnika - SimpleArbiter z diskom simpleArbiterDhcp ter LDAPServer.
+<pre>Ustvari dva navidezna računalnika - SimpleArbiter z diskom simpleArbiterDhcp ter LDAPServer.
Na LDAPServer namesti strežnik LDAP. Na SimpleArbiter preberi ime domene DOMENA,
uporabniško ime BIND_DN ter geslo BIND_PASS. Poskrbi, da se bo lahko klient s simpleArbiterDhcp povezal na LDAP strežnik na LDAPServer.
V primeru, da se klient poveže kot BIND_DN z geslom BIND_PASS, naj strežnik omogoči branje vseh podatkov za objekte v
DC=DOMENA,DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si. Nato na LDAP strežniku poišči datoteko /home/test/users.txt. Vsaka vrstica
v datoteki vsebuje uporabniško ime, ime ter priimek, ločene s tabulatorji. V bazi LDAP
-pod DC=DOMENA,DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si za vsako vrstico v users.txt ustvari svojega uporabnika.
-
+pod DC=DOMENA,DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si za vsako vrstico v users.txt ustvari svojega uporabnika.</pre>
"""
}
diff --git a/kpov_judge/tasks/ldap_search/task.py b/kpov_judge/tasks/ldap_search/task.py
index 92a7223..29117db 100644
--- a/kpov_judge/tasks/ldap_search/task.py
+++ b/kpov_judge/tasks/ldap_search/task.py
@@ -5,59 +5,84 @@
# TODO: finish this!
instructions = {
- 'si':"""
-Ustvari dva navidezna računalnika - SimpleArbiter z diskom simpleArbiterDhcp
-ter LDAPServer.
+ 'si': '''\
+<p>
+Ustvari dva navidezna računalnika: <em>SimpleArbiter</em> in <em>LDAPServer</em>.
-Na LDAPServer namesti strežnik LDAP. Strežnik naj skrbi za domeno
-DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+<p>
+Na <em>LDAPServer</em> namesti strežnik LDAP. Strežnik naj skrbi za domeno
-V imeniku ustvari uporabnika
-CN={LDAP_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+<pre><code>DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si</code></pre>
-z geslom {LDAP_PASSWORD} in uporabnika
-CN={BIND_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
-z geslom {BIND_PASSWORD}
+<p>
+V imeniku ustvari uporabnika
-Poskrbi, da se bo lahko klient s simpleArbiterDhcp povezal na LDAP strežnik na LDAPServer.
-V primeru, da se klient poveže kot {BIND_USERNAME} z geslom {BIND_PASSWORD},
+<pre><code>CN={{LDAP_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si</code></pre>
+
+<p>
+z geslom <code>{{LDAP_PASSWORD}}</code> in uporabnika
+
+<pre><code>CN={{BIND_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si</code></pre>
+
+<p>
+z geslom <code>{{BIND_PASSWORD}}</code>.
+
+<p>
+Poskrbi, da se bo lahko klient s <em>SimpleArbiter</em> povezal na LDAP strežnik na <em>LDAPServer</em>.
+V primeru, da se klient poveže kot <code>{{BIND_USERNAME}}</code> z geslom <code>{{BIND_PASSWORD}}</code>,
naj strežnik omogoči spreminjanje podatkov za objekt
-CN={LDAP_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
-ter ustvarjanje novih objektov v DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+
+<pre><code>CN={{LDAP_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si</code></pre>
+
+<p>
+ter ustvarjanje novih objektov v
+
+<pre><code>DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
CN = Common Name
O = Organization
OU = Organizational Unit
DC = Domain Component
-""",
- 'en': """
-Create two virtual machines - SimpleArbiter using the disk simpleArbiterDhcp
-and LDAPServer.
+</code></pre>
+''',
+ 'en': '''\
+<p>
+Create two virtual machines: <em>SimpleArbiter</em> and <em>LDAPServer</em>.
-Set up an LDAP server on LDAPServer. Make it responsible for
-DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+<p>
+Set up an LDAP server on <em>LDAPServer</em>. Make it responsible for
+<pre><code>DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si</code></pre>
+
+<p>
Create a user
-CN={LDAP_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
-with the password {LDAP_PASSWORD} and a user
-CN={BIND_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+<pre><code>CN={{LDAP_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si</code></pre>
+
+<p>
+with the password <code>{{LDAP_PASSWORD}}</code>, and a user
+
+<pre><code>CN={{BIND_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si</code></pre>
+
+<p>
+with the password <code>{{LDAP_PASSWORD}}</code> .
-with the password {LDAP_PASSWORD} .
+<p>
+Make sure that a client from <em>SimpleArbiter</em> can connect to the LDAP server on <em>LDAPServer</em>. If the client identifies themself as <code>{{BIND_USERNAME}}</code> with the password <code>{{BIND_PASSWORD}}</code>, allow it to change data for the object
-Make sure that a client from simpleArbiterDhcp can connect to the LDAP server on
-LDAPServer. If the client identifies themself as {BIND_USERNAME} with the password
-{BIND_PASSWORD}, allow it to change data for the object
+<pre><code>CN={{LDAP_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si</code></pre>
-CN={LDAP_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
-and to create objects in DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+<p>
+and to create objects in
+
+<pre><code>DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
CN = Common Name
O = Organization
OU = Organizational Unit
DC = Domain Component
-
-"""
+</code></pre>
+''',
}
computers = {
@@ -183,4 +208,3 @@ objectClass: organization\r
def prepare_disks(templates, task_params, global_params):
write_default_config(templates['simpleArbiterDhcpGWLDAP'], global_params)
-
diff --git a/kpov_judge/tasks/mock_entrance_exam/task.py b/kpov_judge/tasks/mock_entrance_exam/task.py
index 906df97..ad51c2a 100644
--- a/kpov_judge/tasks/mock_entrance_exam/task.py
+++ b/kpov_judge/tasks/mock_entrance_exam/task.py
@@ -5,45 +5,50 @@
# - switch to a real SSH/SFTP client to properly handle filenames
instructions = {
- 'si': '''
-Postavite dva navidezna računalnika - SimpleArbiter in Student.
-Oba naj bosta povezana na internet. Poleg tega mora biti
-Student na naslovu {student_IP} dostopen s SimpleArbiter.
+ 'si': '''\
+<p>
+Postavite dva navidezna računalnika - <em>SimpleArbiter</em> in <em>Student</em>. Oba naj bosta povezana na internet. Poleg tega mora biti <em>Student</em> na naslovu {{student_IP}} dostopen s <em>SimpleArbiter</em>.
-Računajte, da se na Student ob zagonu zažene program {net_prog_name},
-ki vam spreminja nastavitve mrežne kartice.
+<p>
+Računajte, da se na <em>Student</em> ob zagonu zažene program {{net_prog_name}}, ki vam spreminja nastavitve mrežne kartice.
-V domačem imeniku uporabnika student obstaja program {P_c} v programskem jeziku C.
-Prevedite ga v program z imenom {P_executable}.
-Izvorna koda je namenoma pokvarjena tako, da so vanjo vrinjeni nepotrebni znaki.
-Pred prevajanjem jo morate popraviti.
+<p>
+V domačem imeniku uporabnika <code>student</code> obstaja program <code>{{P_c}}</code> v programskem jeziku C.
+Prevedite ga v program z imenom <code>{{P_executable}}</code>. Izvorna koda je namenoma pokvarjena tako, da so vanjo vrinjeni nepotrebni znaki. Pred prevajanjem jo morate popraviti.
-Napišite skripto ali program {P_script} v domačem imeniku uporabnika student, ki:
-- požene {P_executable} z argumentom "{arg_c}" in mu na standardni vhod pripelje vrednost spremenljivke {env_c}
-- vse, kar {P_executable} izpiše na stderr, spravi v datoteko {out_stderr_c}.
-- vse vrstice, ki jih {P_executable} izpiše na stdout in vsebujejo zaporedje znakov "ma", zapiše v {out_stdout_c}.
+<p>
+Napišite skripto ali program <code>{{P_script}}</code> v domačem imeniku uporabnika <code>student</code>, ki:
-Lastnik vseh ustvarjenih datotek mora biti uporabnik student.
-Gesla uporabnika student (vaje) ne smete spreminjati.''',
- 'en': '''Set up two virtual machines - SimpleArbiter and Student.
-Both should be connected to the Internet. Student should also be accessible
-from SimpleArbiter at the address {student_IP}.
+<ul>
+<li>požene <code>{{P_executable}}</code> z argumentom <code>"{{arg_c}}"</code> in mu na standardni vhod pripelje vrednost spremenljivke <code>{{env_c}}</code>;
+<li>vse, kar <code>{{P_executable}}</code> izpiše na stderr, spravi v datoteko <code>{{out_stderr_c}}</code>; in
+<li>vse vrstice, ki jih <code>{{P_executable}}</code> izpiše na stdout in vsebujejo zaporedje znakov <code>ma</code>, zapiše v <code>{{out_stdout_c}}</code>.
+</ul>
-Keep in mind that a program called {net_prog_name} starts on Student
-whenever Student boots. This program may change your network settings.
+<p>
+Lastnik vseh ustvarjenih datotek mora biti uporabnik <code>student</code>. Gesla uporabnika <code>student</code> (<code>vaje</code>) ne smete spreminjati.
+''',
+ 'en': '''\
+<p>
+Set up two virtual machines - <em>SimpleArbiter</em> and <em>Student</em>. Both should be connected to the internet. <em>Student</em> should also be accessible from <em>SimpleArbiter</em> at the address <code>{{student_IP}}</code>.
+
+<p>
+Keep in mind that a program called <code>{{net_prog_name}}</code> starts on <em>Student</em> on each boot. This program may change your network settings.
-There is a program called {P_c} in the home directory of student. Compile it
-into a program called {P_executable}. The source code is intentionally broken
-so that unneccessarry characters are inserted into the file. You have to fix
-the file before compiling.
+<p>
+There is a program called <code>{{P_c}}</code> in <code>student</code>’s home directory. Compile it into a program called <code>{{P_executable}}</code>. The source code is intentionally broken so that unneccessarry characters are inserted into the file. You have to fix the file before compiling.
-Also, write a script or program called {P_script} in the home directory of student.
-The script should:
-- run {P_executable} with the argument {arg_c} and pipe the value of the environment variable {env_c} into {P_executable}'s standard input.
-- redirect stderr of {P_executable} into a file called {out_stderr_c}.
-- save each line which {P_executable} outputs and which contains the character sequence "ma" into {out_stdout_c}.
+<p>
+Also, write a script or program called <code>{{P_script}}</code> in <code>student</code>’s home directory. The script should:
-The owner of all created files should be student. You are not allowed to change student's password (vaje).
+<ul>
+<li>run <code>{{P_executable}}</code> with the argument <code>{{arg_c}}</code> and pipe the value of the environment variable <code>{{env_c}}</code> into <code>{{P_executable}}</code>’s standard input;
+<li>redirect stderr of <code>{{P_executable}}</code> into a file called <code>{{out_stderr_c}}</code>; and
+<li>save each line which <code>{{P_executable}}</code> outputs and which contains the character sequence <code>ma</code> into <code>{{out_stdout_c}}</code>.
+</ul>
+
+<p>
+The owner of all created files should be <code>student</code>. You are not allowed to change <code>student</code>’s password (<code>vaje</code>).
''',
}
@@ -304,3 +309,5 @@ nohup {} &
exit 0
""".format(sh_path, task_params['net_prog_name']))
+
+ write_default_config(templates['simpleArbiter'], global_params)
diff --git a/kpov_judge/tasks/nat_port_forward/task.py b/kpov_judge/tasks/nat_port_forward/task.py
index 8fe28d7..80d2e47 100644
--- a/kpov_judge/tasks/nat_port_forward/task.py
+++ b/kpov_judge/tasks/nat_port_forward/task.py
@@ -2,13 +2,12 @@
instructions = {
'si':"""
-Postavi tri računalnike - SimpleArbiter z diska simpleArbiter, TestClient z diska testClient in NATServer. NATServer naj ima dva omrežna vmesnika - z enim naj bo
+<pre>Postavi tri računalnike - SimpleArbiter z diska simpleArbiter, TestClient z diska testClient in NATServer. NATServer naj ima dva omrežna vmesnika - z enim naj bo
povezan na omrežje, od koder bo imel dostop do Interneta, z drugim pa na SimpleArbiter. TestClient naj bo povezan na isto omrežje z dostopom do Interneta kot NATServer.
Poskrbi, da bo NATServer služil kot DHCP strežnik ter privzeti prehod za SimpleArbiter.
Na SimpleArbiter preberi vrednosti NET, PORT_OUTER in PORT_INNER ter vpiši IP_TEST_CLIENT. Poskrbi, da
bo omrežje med SimpleArbiter in NATServer na področju NET. Nato poskrbi, da se
-bo TCP promet z omrežja z dostopom do Interneta na vrata PORT_OUTER prepošiljal na SimpleArbiter na vrata PORT_INNER.
-"""
+bo TCP promet z omrežja z dostopom do Interneta na vrata PORT_OUTER prepošiljal na SimpleArbiter na vrata PORT_INNER.</pre>"""
}
computers = {
diff --git a/kpov_judge/tasks/nat_vlc/task.py b/kpov_judge/tasks/nat_vlc/task.py
index ffcb6c1..5224495 100644
--- a/kpov_judge/tasks/nat_vlc/task.py
+++ b/kpov_judge/tasks/nat_vlc/task.py
@@ -7,29 +7,29 @@
#TODO: finish this
instructions = {
- 'si':"""
-Postavi dva navidezna računalnika - SimpleArbiter z diskom simpleArbiter
-ter NATServer. NATServer naj ima dva omrežna vmesnika - z enim naj bo povezan
-na lokalno omrežje, na katerem naj bo tudi simpleArbiter, z drugim pa na
-Internet. Na NATServer skonfiguriraj omrežne vmesnike tako, da bo imel dostop
-do Interneta in da bo imel na lokalnem omrežju {IP_NAT}. Na NATServer
-ustvarite še uporabnika {IP_NAT_user}.
-
-Poskrbi, da bo SimpleArbiter prek DHCP dobil naslov {IP_simple}.
-Poskrbi, da bo NATServer deloval kot prehod za SimpleArbiter in izvajal NAT.
-""",
- 'en':"""
-Set up two virtual machines - SimpleArbiter (using the disc simpleArbiter) and
-NATServer. NATServer should have two network adapters. Connect the first
-adapter to SimpleArbiter and the second adapter to the Internet. Configure the
-network in NATServer so that one interface is connected to the Internet while
-the other is connected to SimpleArbiter and has the address {IP_NAT}. Create
-a user called {IP_NAT_user} on NATServer.
-
-Configure a DHCP server on NATServer so that SimpleArbiter gets the IP
-{IP_simple}. Also, set up NAT on NATServer and set it as the gateway for
-SimpleArbiter.
-"""
+ 'si': '''\
+<p>
+Postavi dva navidezna računalnika: <em>SimpleArbiter</em> in <em>NATServer</em>. <em>NATServer</em> naj ima dva omrežna vmesnika - z enim naj bo povezan na lokalno omrežje, na katerem naj bo tudi simpleArbiter, z drugim pa na Internet.
+
+<p>
+Na <em>NATServer</em> skonfiguriraj omrežne vmesnike tako, da bo imel dostop do Interneta in da bo imel na lokalnem omrežju <code>{{IP_NAT}}</code>. Na <em>NATServer</em> ustvarite še uporabnika <code>{{IP_NAT_user}}</code>.
+
+<p>
+Poskrbi, da bo <em>SimpleArbiter</em> prek DHCP dobil naslov <code>{{IP_simple}}</code>. Poskrbi, da bo <em>NATServer</em> deloval kot prehod za <em>SimpleArbiter</em> in izvajal NAT.
+''',
+ 'en': '''\
+<p>
+Set up two virtual machines: <em>SimpleArbiter</em> and
+<em>NATServer</em>. <em>NATServer</em> should have two network
+adapters. Connect the first adapter to <em>SimpleArbiter</em> and the
+second adapter to the Internet.
+
+<p>
+Configure the network in <em>NATServer</em> so that one interface is connected to the Internet while the other is connected to <em>SimpleArbiter</em> and has the address <code>{{IP_NAT}}</code>. Create a user called <code>{{IP_NAT_user}}</code> on <em>NATServer</em>.
+
+<p>
+Configure a DHCP server on <em>NATServer</em> so that <em>SimpleArbiter</em> gets the IP <code>{{IP_simple}}</code>. Also, set up NAT on <em>NATServer</em> and set it as the gateway for <em>SimpleArbiter</em>.
+''',
}
computers = {
diff --git a/kpov_judge/tasks/network_boot_custom_program/task.py b/kpov_judge/tasks/network_boot_custom_program/task.py
index e81939f..e3fbad2 100644
--- a/kpov_judge/tasks/network_boot_custom_program/task.py
+++ b/kpov_judge/tasks/network_boot_custom_program/task.py
@@ -2,12 +2,12 @@
instructions = {
'si':"""
-Postavi tri navidezne računalnike - simpleArbiter, DHCP_server, DHCP_client.
+<pre>Postavi tri navidezne računalnike - simpleArbiter, DHCP_server, DHCP_client.
Na računalniku DHCP_server najdeš program A. DHCP_server nastavi tako, da se bo
DHCP_client lahko zagnal prek mreže. Na datotečni sistem, s katerega
se zaganja DHCP_client, spravi program A. Poskrbi, da se A požene ob zagonu DHCP_client.
-DHCP_client ne sme imeti priklopljenega nobenega trdega diska.
+DHCP_client ne sme imeti priklopljenega nobenega trdega diska.</pre>
"""
}
diff --git a/kpov_judge/tasks/openvpn_multiple_hops/task.py b/kpov_judge/tasks/openvpn_multiple_hops/task.py
index 230393d..44ad8c4 100644
--- a/kpov_judge/tasks/openvpn_multiple_hops/task.py
+++ b/kpov_judge/tasks/openvpn_multiple_hops/task.py
@@ -2,13 +2,13 @@
instructions = {
'si':"""
-Postavi 4 navidezne računalnike - SimpleArbiter z diska simpleArbiterDhcp, A, B ter C.
+<pre>Postavi 4 navidezne računalnike - SimpleArbiter z diska simpleArbiterDhcp, A, B ter C.
Na računalnikih A, B in C ustvari uporabnika test z geslom test.
Poskrbi, da bodo vsi štirje na istem navideznem fizičnem omrežju. Naslov omrežja (NET_PHYS) ter naslove
(IP_A, IP_B, IP_C) preberi na SimpleArbiter. S pomočjo OpenVPN postavi navidezno omrežje med A in B na naslovih NET_VPN1.
Nato s pomočjo OpenVPN postavi še navidezno omrežje med B in C na naslovih NET_VPN2.
Poskrbi, da bo promet z A prek VPN prišel do C in obratno. Za avtentikacijo uporabi skupne skrivnosti, ki
-jih prebereš na SimpleArbiter - med A in B SECRET_AB ter med B in C SECRET_BC.
+jih prebereš na SimpleArbiter - med A in B SECRET_AB ter med B in C SECRET_BC.</pre>
"""
}
diff --git a/kpov_judge/tasks/openvpn_simple_smb/task.py b/kpov_judge/tasks/openvpn_simple_smb/task.py
index d4bb510..5d7c22f 100644
--- a/kpov_judge/tasks/openvpn_simple_smb/task.py
+++ b/kpov_judge/tasks/openvpn_simple_smb/task.py
@@ -1,40 +1,33 @@
# kpov_util should be imported by add_assignment.py
instructions = {
- '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
-(s katerim kreirate napravo tap).
+ 'si': '''\
+<p>
+Postavi dva navidezna računalnika: <em>SimpleArbiter</em> in <em>VPNClient1</em>. Poskrbite, da bosta povezana med seboj in v internet. Na <em>VPNClient1</em> namestite OpenVPN in program za nadzor nad virtualnimi napravami (s katerim kreirate napravo <code>tap</code>).
-Na strežniku SimpleArbiterVPN že teče VPN strežnik in uporablja skrivnost,
-ki jo najdete tudi na VPNClient1 v domačem imeniku uporabnika student.
-Na VPNClient1 vzpostavite VPN tako, da napišete primerno datoteko z
-nastavitvami. VPNClient1 na navideznem lokalnem omrežju nastavite naslov
-{IP_VPNClient1}
+<p>
+Na strežniku <em>SimpleArbiter</em> že teče strežnik in uporablja skrivnost, ki jo najdete tudi na <em>VPNClient1</em> v domačem imeniku uporabnika <code>student</code>. Na <em>VPNClient1</em> vzpostavite VPN tako, da napišete primerno datoteko z nastavitvami. Računalniku <em>VPNClient1</em> na navideznem lokalnem omrežju nastavite naslov
+<code>{{IP_VPNClient1}}</code>.
-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':"""
-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.
-On VPNClient1, install OpenVPN and a program for supervising virtual devices
-(which you will use to create a tap device). On the VPN, set the IP for
-VPNClient1 to {IP_VPNClient1}.
+<p>
+Nato poskrbite, da bo na <em>VPNClient1</em> na navideznem omrežju prek NFS omogočen
+dostop do imenika <code>/home/test/{{DIRNAME}}</code>. V ta imenik skopirajte datoteke, ki so prek SMB dostopne na <em>SimpleArbiter</em>.
+''',
+ 'en': '''\
+<p>
+Setup two virtual machines: <em>SimpleArbiter</em> and <em>VPNClient1</em>. Set the client's network up so that it has access to the internal network and the internet. On <em>VPNClient1</em>, install OpenVPN and a program for supervising virtual devices
+(which you will use to create a <code>tap</code> device). On the VPN, set the IP for
+<em>VPNClient1</em> to <code>{{IP_VPNClient1}}</code>.
-An OpenVPN server is already running on SimpleArbiterVPN. Use the secret
-available on VPNClient1 in the home directory of user student to connect to
-the VPN server on SimpleArbiterVPN. To do that, you will have to write your
-own OpenVPN configuration file.
+<p>
+An OpenVPN server is already running on <em>SimpleArbiter</em>. Use the secret
+available on <em>VPNClient1</em> in the home directory of user <code>student</code> to connect to the VPN server on <em>SimpleArbiter</em>. To do that, you will have to write your
+own OpenVPN configuration file.
-After you have set up the VPN, make the directory
-/home/test/{DIRNAME} on VPNClient1 available over NFS from SimpleArbiter over
-your VPN. Copy files that are available from SimpleArbiter over SMB to
-/home/test/{DIRNAME}.
-"""
+<p>
+After you have set up the VPN, make the directory <code>/home/test/{{DIRNAME}}</code> on <em>VPNClient1</em> available over NFS from <em>SimpleArbiter</em> over
+your VPN. Copy files that are available from <em>SimpleArbiter</em> over SMB to <code>/home/test/{{DIRNAME}}</code>.
+'''
}
computers = {
@@ -264,3 +257,5 @@ iface tap0 inet static
templates['student-VPNClient1'].write("/home/student/" + keyfile, s)
# uid, gid (student = )
templates['student-VPNClient1'].chown(1000, 1000, "/home/student/" + keyfile)
+
+ write_default_config(templates['simpleArbiterDhcpGWVPN'], global_params)
diff --git a/kpov_judge/tasks/openwrt/task.py b/kpov_judge/tasks/openwrt/task.py
index ed2783a..8872989 100644
--- a/kpov_judge/tasks/openwrt/task.py
+++ b/kpov_judge/tasks/openwrt/task.py
@@ -2,11 +2,11 @@
instructions = {
'si':"""
-Postavi dva navidezna računalnika - simpleArbiter z diska SimpleArbiter ter
+<pre>Postavi dva navidezna računalnika - simpleArbiter z diska SimpleArbiter ter
OpenWRT z diska OpenWRT. Na disku OpenWRT je nameščena distribucija OpenWRT.
Nastavi OpenWRT tako, da bo imel dva omrežna vmesnika - en naj bo povezan na Internet,
drugo na omrežje, na katerem bo SimpleArbiter. Na SimpleArbiter preberi naslov omrežja
-med OpenWrt in SimpleArbiter ter njuna naslova.
+med OpenWrt in SimpleArbiter ter njuna naslova.</pre>
"""
}
diff --git a/kpov_judge/tasks/public_ip_ssh/task.py b/kpov_judge/tasks/public_ip_ssh/task.py
index 561a1fa..8dcb858 100644
--- a/kpov_judge/tasks/public_ip_ssh/task.py
+++ b/kpov_judge/tasks/public_ip_ssh/task.py
@@ -2,10 +2,10 @@
instructions = {
'si':"""
-Ustvari dva navidezna računalnika. Za disk enega (imenujmo ga SimpleArbiter) uporabite
+<pre>Ustvari dva navidezna računalnika. Za disk enega (imenujmo ga SimpleArbiter) uporabite
sliko diska Test. Na drugega (imenujmo ga A) namesti poljubno Linux distribucijo. Na SimpleArbiter
preberi uporabniško ime in geslo uporabnika, ki ga moraš ustvariti na A. Poskrbi, da se bo novoustvarjeni
-uporabnik s svojim geslom lahko na A prijavil z Interneta.
+uporabnik s svojim geslom lahko na A prijavil z Interneta.</pre>
"""
}
diff --git a/kpov_judge/tasks/public_ssh_motd_http/task.py b/kpov_judge/tasks/public_ssh_motd_http/task.py
index 227425a..bd48d77 100644
--- a/kpov_judge/tasks/public_ssh_motd_http/task.py
+++ b/kpov_judge/tasks/public_ssh_motd_http/task.py
@@ -2,11 +2,11 @@
instructions = {
'si':"""
-Na internet postavi računalnik, ki bo dostopen prek ssh in http.
+<pre>Na internet postavi računalnik, ki bo dostopen prek ssh in http.
Poskrbi, da bo na računalniku ustvarjen uporabnik test z geslom test. Ob prijavi naj se
uporabniku v MOTD izpiše (le) zgodbica ali pesmica, ki vam je všeč, dolžine vsaj 50 znakov.
Ista zgodbica ali pesmica naj se na strežniku izpiše, če se na strežnik kdorkoli poveže prek
-http.
+http.</pre>
"""
}
diff --git a/kpov_judge/tasks/radius_multiple_realms/task.py b/kpov_judge/tasks/radius_multiple_realms/task.py
index 773a3f2..0067f46 100644
--- a/kpov_judge/tasks/radius_multiple_realms/task.py
+++ b/kpov_judge/tasks/radius_multiple_realms/task.py
@@ -2,7 +2,7 @@
instructions = {
'si':"""
-Postavi tri navidezne računalnike - SimpleArbiter z diska simpleArbiterDhcp,
+<pre>Postavi tri navidezne računalnike - SimpleArbiter z diska simpleArbiterDhcp,
RadiusA ter RadiusB. Na simpleArbiterDhcp preberi imeni domen DOMENA_A ter DOMENA_B,
uporabniški imeni USER_A in USER_B, gesli PASSWORD_A in PASSWORD_B ter skrivnosti
SECRET_A in SECRET_B. Poskrbi, da se bo lahko radius klient s SimpleArbiter povezal
@@ -12,7 +12,7 @@ na RadiusB uporabnik USER_B z geslom PASSWORD_B.
Poskrbi, da bo strežnik RadiusA odgovarjal na zahtevke za avtentikacijo uporabnikov na domeni DOMENA_A,
zahtevke za uporabnike na domeni DOMENA_B pa bo preposlal naprej na RadiusB. RadiusB naj odgovarja na
-zahtevke za uporabnike na domeni DOMENA_B, zahtevke za uporabnike na DOMENA_A pa naj preprosto zavrže.
+zahtevke za uporabnike na domeni DOMENA_B, zahtevke za uporabnike na DOMENA_A pa naj preprosto zavrže.</pre>
"""
}
diff --git a/kpov_judge/tasks/radius_mysql_pam/task.py b/kpov_judge/tasks/radius_mysql_pam/task.py
index 72b5a74..5051bb4 100644
--- a/kpov_judge/tasks/radius_mysql_pam/task.py
+++ b/kpov_judge/tasks/radius_mysql_pam/task.py
@@ -1,52 +1,47 @@
# kpov_util should be imported by add_assignment.py
instructions = {
- 'si':"""
-Ustvari dva navidezna računalnika - SimpleArbiter z diska simpleArbiterDhcp ter
-RadiusServer. Na RadiusServer namesti FreeRadius ter MySQL.
+ 'si': '''\
+<p>
+Ustvari dva navidezna računalnika: <em>SimpleArbiter</em> in <em>RadiusServer</em>. Na <em>RadiusServer</em> namesti FreeRadius ter MySQL.
-Ustvari mysql podatkovno bazo z imenom {MYSQL_DB_NAME}. Ustvari mysql
-uporabnika z imenom {MYSQL_ADMIN_USER} in geslom {MYSQL_ADMIN_PASSWORD},
-ki naj ima poln dostop do te baze. Prijava za tega uporabnika mora biti
-omogočena tudi s SimpleArbiter.
+<p>
+Ustvari podatkovno bazo MySQL z imenom <code>{{MYSQL_DB_NAME}}</code>. Ustvari uporabnika za MySQL z imenom <code>{{MYSQL_ADMIN_USER}}</code> in geslom <code>{{MYSQL_ADMIN_PASSWORD}}</code>, ki naj ima poln dostop do te baze. Prijava za tega uporabnika mora biti omogočena tudi s <em>SimpleArbiter</em>.
-Nastavi FreeRadius tako, da bo podatke o uporabnikih in geslih pobiral iz baze
-MySQL z imenom {MYSQL_DB_NAME}. Podatkovna shema (imena tabel) naj ostane
+<p>
+Nastavi FreeRadius tako, da bo podatke o uporabnikih in geslih pobiral iz baze MySQL z imenom <code>{{MYSQL_DB_NAME}}</code>. Podatkovna shema (imena tabel) naj ostane
privzeta.
-Dostop do strežnika Radius na RadiusServer s SimpleArbiter naj bo mogoč ob
-uporabi skrivnosti {RADIUS_SECRET}.
+<p>
+Dostop do strežnika Radius na <em>RadiusServer</em> s <em>SimpleArbiter</em> naj bo mogoč ob uporabi skrivnosti <code>{{RADIUS_SECRET}}</code>.
-V bazi ustvari vnos, ki bo omogočil, da se na RadiusServer s pomočjo protokola
-Radius avtenticira uporabnik {RADIUS_USERNAME} z geslom {RADIUS_PASSWORD}.
+<p>
+V bazi ustvari vnos, ki bo omogočil, da se na <em>RadiusServer</em> s pomočjo protokola Radius avtenticira uporabnik <code>{{RADIUS_USERNAME}}</code> z geslom <code>{{RADIUS_PASSWORD}}</code>.
-Nastavi PAM za prijavo (login) tako, da bo dovolj, če se uporabnik na ssh
-predstavi z uporabniškim imenom in geslom, ki sta veljavna na FreeRadius,
-ne glede na /etc/shadow oziroma /etc/password.
-""",
- 'en':"""
-Create two virtual machines - SimpleArbiter using the disk simpleArbiterDhcp
-and RadiusServer. On RadiusServer, install FreeRadius and MySQL.
+<p>
+Nastavi PAM za prijavo (login) tako, da bo dovolj, če se uporabnik na SSH predstavi z uporabniškim imenom in geslom, ki sta veljavna na FreeRadius, ne glede na <code>/etc/shadow</code> oziroma <code>/etc/password</code>.
+''',
+ 'en': '''\
+<p>
+Create two virtual machines: <em>SimpleArbiter</em> and <em>RadiusServer</em>. On <em>RadiusServer</em>, install FreeRadius and MySQL.
-Create a mysql database named {MYSQL_DB_NAME}. Create a mysql user with the
-username {MYSQL_ADMIN_USER} and password {MYSQL_ADMIN_PASSWORD}. Make sure
-this user can access the database from SimpleArbiter and has administrative
-rights over the {MYSQL_DB_NAME} database.
+<p>
+Create a MySQL database named <code>{{MYSQL_DB_NAME}}</code>. Create a mysql user with the username <code>{{MYSQL_ADMIN_USER}}</code> and password <code>{{MYSQL_ADMIN_PASSWORD}}</code>. Make sure this user can access the database from <em>SimpleArbiter</em> and has administrative rights over the <code>{{MYSQL_DB_NAME}}</code> database.
-Set up FreeRadius so that the data about users and passwords is stored in the
-MySQL database. Keep the default schema (table names).
+<p>
+Set up FreeRadius so that the data about users and passwords is stored in the MySQL database. Keep the default schema (table names).
-Make the Radius server on RadiusServer accessible from SimpleArbiter using
-{RADIUS_SECRET} as the secret.
+<p>
+Make the Radius server on <em>RadiusServer</em> accessible from <em>SimpleArbiter</em> using <code>{{RADIUS_SECRET}}</code> as the secret.
-Create an entry in the database which will enable a user with the username
-{RADIUS_USERNAME} to authenticate themself against the Radius server using
-the password {RADIUS_PASSWORD}.
+<p>
+Create an entry in the database which will enable a user with the username <code>{{RADIUS_USERNAME}}</code> to authenticate themself against the Radius server using the password <code>{{RADIUS_PASSWORD}}</code>.
-Set up PAM to enable login over ssh using a username and password which are
-valida on the FreeRadius server, regardless of the entries in /etc/shadow
-and/or /etc/password.
-"""
+<p>
+Set up PAM to enable login over SSH using a username and password which are
+valida on the FreeRadius server, regardless of the entries in <code>/etc/shadow</code>
+and/or <code>/etc/password</code>.
+''',
}
#KABOOM
diff --git a/kpov_judge/tasks/rdate_64bit/task.py b/kpov_judge/tasks/rdate_64bit/task.py
index b08cddc..9f90014 100644
--- a/kpov_judge/tasks/rdate_64bit/task.py
+++ b/kpov_judge/tasks/rdate_64bit/task.py
@@ -2,12 +2,12 @@
instructions = {
'si':"""
-Postavi dva navidezna računalnika - SimpleArbiter z diska simpleArbiterDhcp ter
+<pre>Postavi dva navidezna računalnika - SimpleArbiter z diska simpleArbiterDhcp ter
RdateServer. Na RdateServer postavi strežnik, ki bo poslušal na vratih VRATA_X.
Vsakič, ko se na vrata poveže klient, naj strežnik pošlje število sekund od DATUM_X.
Število naj bo kodirano kot 64-bitno predznačeno število s tankim koncem.
-VRATA_X in DATUM_X preberi na SimpleArbiter.
+VRATA_X in DATUM_X preberi na SimpleArbiter.</pre>
"""
}
diff --git a/kpov_judge/tasks/rename_grep_network/task.py b/kpov_judge/tasks/rename_grep_network/task.py
index 4f8f1ad..4d81313 100644
--- a/kpov_judge/tasks/rename_grep_network/task.py
+++ b/kpov_judge/tasks/rename_grep_network/task.py
@@ -6,7 +6,7 @@
instructions = {
'si': """
-Ustvari dva navidezna računalnika s slikama diskov
+<pre>Ustvari dva navidezna računalnika s slikama diskov
- SimpleArbiterExam s sliko diska simpleArbiterDhcp in
SmallStudent s slikama diska student-entrance3
in smallstudent-personal.
@@ -26,7 +26,7 @@ Skopiraj jo v domači imenik {testuser} in preimenuj tako, da vse znake 'O' v im
Pazi, da nobena druga datoteka v domačem imeniku v svojem imenu ne bo vsebovala "I".
Poskrbi, da bo lastnik {testuser}, skupina pa naj ostane nespremenjena.
-Brati naj jo ima pravico samo lastnik, pisati lastnik in skupina, poganjati nihče.
+Brati naj jo ima pravico samo lastnik, pisati lastnik in skupina, poganjati nihče.</pre>
""",
'en': '''
''',
diff --git a/kpov_judge/tasks/set_ip_dhcp_hostname/task.py b/kpov_judge/tasks/set_ip_dhcp_hostname/task.py
index 77648e6..1007424 100644
--- a/kpov_judge/tasks/set_ip_dhcp_hostname/task.py
+++ b/kpov_judge/tasks/set_ip_dhcp_hostname/task.py
@@ -2,14 +2,14 @@
instructions = {
'si':"""
-Ustvari tri navidezne računalnike. Za disk prvega uporabi sliko diska simpleArbiterDhcp.
+<pre>Ustvari tri navidezne računalnike. Za disk prvega uporabi sliko diska simpleArbiterDhcp.
Za enega od ostalih dveh (Z_DHCP) poskrbi, da bo dobil IP prek DHCP, pri čemer
naj kot hostname strežniku pošlje ime, ki ga dobiš na simpleArbiterDhcp.
Za drugega (BREZ_DHCP) poskrbi, da bo imel statično nastavljen IP.
Prvi omrežni vmesnik računalnika SimpleArbiter naj bo povezan na Internet. Drugi naj bo povezan na neko lokalno omrežje, na katerega bosta priklopljena računalnika Z_DHCP ter BREZ_DHCP. Na računalniku Z_DHCP poskrbite, da bo ob pridobivanju naslova DHCP strežniku poslal tudi posebej nastavljeno ime računalnika (hostname), ki ne bo enako dejanskemu imenu računalnika (tistemu, ki ga izpiše ukaz hostname).
-Naslov BREZ_DHCP ter ime računalnika za Z_DHCP dobite ob zagonu run_test.py na računalniku SimpleArbiter.
+Naslov BREZ_DHCP ter ime računalnika za Z_DHCP dobite ob zagonu run_test.py na računalniku SimpleArbiter.</pre>
"""
}
diff --git a/kpov_judge/tasks/set_ip_static_dhcp/task.py b/kpov_judge/tasks/set_ip_static_dhcp/task.py
index aac93f7..0d11f43 100644
--- a/kpov_judge/tasks/set_ip_static_dhcp/task.py
+++ b/kpov_judge/tasks/set_ip_static_dhcp/task.py
@@ -1,30 +1,30 @@
# kpov_util should be imported by add_assignment.py
instructions = {
- 'si':"""
-Ustvari tri navidezne racunalnike. Za prvega
-uporabi sliko diska simpleArbiterDhcpGW, za drugega sliko diska
-maliNetworkManager, za tretjega sliko diska maliBrezNetworkManager.
-Racunalnike imenujmo enako kot slike diska.
-Na maliBrezNetworkManager poskrbi, da networkmanager ne bo več skrbel
-za omrežni vmesnik, temveč bosta delovala ukaza ifup in ifdown.
-
-Na maliNetworkManager nastavi IP naslov {IP_NM} ter DNS {DNS_NM}.
-Na maliBrezNetworkManager nastavi IP naslov {IP_static} ter DNS {DNS_static}.
-""",
- 'en':"""Create three virtual machines. Use simpleArbiterDhcpGW as the
-disk image for the first, maliNetworkManager as the disk image for the second
-and maliBrezNetworkManager for the third. The virtual machine names can match
-the disks.
-
-Make sure that on maliBrezNetworkManager ifup/ifdown can be used to configure
-the network and that NetworkManager, while still installed, will not manage
-the network interface. The IP should be {IP_static} and the computer should
-use the server {DNS_static} as it's DNS.
-
-On maliNetworkManager, set the IP address to {IP_NM} and use {DNS_NM}
-as the DNS.
-"""
+ 'si': '''\
+<p>
+Ustvari tri navidezne računalnike. Za prvega uporabi sliko diska <em>simpleArbiterDhcpGW</em>, za drugega sliko diska
+<em>maliNetworkManager</em>, za tretjega sliko diska <em>maliBrezNetworkManager</em>. Računalnike imenujmo enako kot slike diska.
+
+<p>
+Na <em>maliBrezNetworkManager</em> poskrbi, da NetworkManager ne bo več skrbel za omrežni vmesnik, temveč bosta delovala ukaza <code>ifup</code> in <code>ifdown</code>.
+
+<p>
+Na <em>maliNetworkManager</em> nastavi naslov IP <code>{{IP_NM}}</code> ter DNS <code>{{DNS_NM}}</code>.
+
+<p>
+Na <em>maliBrezNetworkManager</em> nastavi naslov IP <code>{{IP_static}}</code> ter DNS <code>{{DNS_static}}</code>.
+''',
+ 'en': '''\
+<p>
+Create three virtual machines. Use <em>simpleArbiterDhcpGW</em> as the disk image for the first, <em>maliNetworkManager</em> as the disk image for the second, and <em>maliBrezNetworkManager</em> for the third. The virtual machine names can match the disks.
+
+<p>
+Make sure that on <em> maliBrezNetworkManager</em> <code>ifup</code> and <code>ifdown</code> can be used to configure the network and that NetworkManager, while still installed, will not manage the network interface. The IP should be <code>{{IP_static}}</code> and the computer should use the server <code>{{DNS_static}}</code> for DNS.
+
+<p>
+On <em>maliNetworkManager</em>, set the IP address to <code>{{IP_NM}}</code> and use <code>{{DNS_NM}}</code> for DNS.
+''',
}
computers = {
diff --git a/kpov_judge/tasks/set_motd/task.py b/kpov_judge/tasks/set_motd/task.py
index f2b65fb..ea5d686 100644
--- a/kpov_judge/tasks/set_motd/task.py
+++ b/kpov_judge/tasks/set_motd/task.py
@@ -1,41 +1,40 @@
# kpov_util should be imported by add_assignment.py
instructions = {
- "si":"""
-Ustvari dva navidezna računalnika - imenujmo ju SimpleArbiterDhcpGW in
-Student. Za računalnik SimpleArbiterDhcpGW uporabite sliko diska, poimenovano
-SimpleArbiterDhcpGW.
+ 'si': '''\
+<p>
+Ustvari dva navidezna računalnika - imenujmo ju <em>SimpleArbiterDhcpGW</em> in <em>Student</em>.
+Na računalniku <em>Student</em> ustvarite uporabnika z uporabniškim imenom <code>{{peer_user}}</code>. IP navideznega računalnika <em>Student</em> ter geslo za uporabnika <code>{{peer_user}}</code> nastavite sami.
-Na računalniku Student ustvarite uporabnika z uporabniškim imenom {peer_user}.
+<p>
+Poskrbite, da se bo v sporočilu, ki se ob prijavi izpiše na računalniku <em>Student</em>, pojavil niz
-Poskrbite, da se bo v sporočilu, ki se ob prijavi izpiše na računalniku
-Student, pojavil niz "{niz}". Temu sporočilu v angleščini rečemo
-"message of the day" - MOTD.
+<pre><code>{{niz}}</code></pre>
-IP navideznega računalnika Student ter geslo za {peer_user} nastavite sami.
+<p>
+Temu sporočilu v angleščini rečemo <em lang="en">message of the day</em> oziroma <em>MOTD</em>. Ocenjevalni program pričakuje, da se bo ob koncu prijave pojavila ukazna vrstica oblike
-Ocenjevalni program pričakuje, da se bo ob koncu prijave pojavila ukazna
-vrstica oblike uporabnisko_ime@ime_racunalnika:~$ .
+<pre><code>username@hostname:~$ </code></pre>
-Pazite, da se bo takšna vrstica pojavila šele po nizu, ki ste ga dobili v
-teh navodilih.
- """,
- 'en':"""
-Create two virtual machines - named SimpleArbiterDhcpGW and Student.
-For the 'SimpleArbiterDhcpGW', use disc image named SimpleArbiterDhcpGW.
+Pazite, da se bo takšna vrstica pojavila šele po nizu, ki ste ga dobili v teh navodilih.
+ ''',
+ 'en': '''\
+<p>
+Create two virtual machines named <em>SimpleArbiterDhcpGW</em> and <em>Student</em>. On <em>Student</em>, create a user with the username <code>{{peer_user}}</code>. Set the IP of <em>Student</em> and the password for <code>{{peer_user}}</code> yourself.
-On Student, create a user with the username {peer_user}.
+<p>
+Set the <em>message of the day</em> (MOTD) on <em>Student</em> to
-Set the message of the day (MOTD) on Student to "{niz}". This is the message
-which is displayed when you log in.
+<pre><code>{{niz}}</code></pre>
-Set the IP of Student and the password for {peer_user} yourself.
+<p>
+This is the message which is displayed when you log in. The grading system expects that after login a prompt similar to
-The grading system expects that at the end of login,
-a prompt similar to username@name_of_computer:~$ appears.
-Make sure that this line shows up only after the
-string you got in these instructions.
-"""
+<pre><code>username@hostname:~$ </code></pre>
+
+<p>
+appears. Make sure that this line shows up only after the string you got in these instructions.
+'''
}
computers = {
diff --git a/kpov_judge/tasks/smb_nfs/task.py b/kpov_judge/tasks/smb_nfs/task.py
index a94d677..6d1e51d 100644
--- a/kpov_judge/tasks/smb_nfs/task.py
+++ b/kpov_judge/tasks/smb_nfs/task.py
@@ -2,24 +2,26 @@
# TODO: dokoncaj!
instructions = {
- 'si':"""
-Postavi dva navidezna računalnika (simpleArbiterDhcp in FileServer).
+ 'si': '''\
+<p>
+Postavi dva navidezna računalnika: <em>simpleArbiterDhcp</em> in <em>FileServer</em>.
-Poskrbi, da bo imenik {NFS_MOUNT} na FileServer dostopen prek NFS in
-prek SMB kot imenik v skupni rabi {SMB_SHARENAME}.
-Ime SMB strežnika nastavite na {FILESERVER_NAME}.
+<p>
+Poskrbi, da bo imenik <code>{{NFS_MOUNT}}</code> na <em>FileServer</em> dostopen prek NFS in prek SMB kot imenik v skupni rabi <code>{{SMB_SHARENAME}}</code>. Ime strežnika SMB nastavite na <code>{{FILESERVER_NAME}}</code>.
-SimpleArbiterDhcp naj ima prek NFS pravico pisati po imeniku.
-""",
-'en':"""
-Set up two virtual computers (simpleArbiterDhcp and FileServer).
+<p>
+<em>SimpleArbiterDhcp</em> naj ima prek NFS pravico pisati po imeniku.
+''',
+ 'en': '''\
+<p>
+Set up two virtual computers: <em>simpleArbiterDhcp</em> and <em>FileServer</em>.
-Make sure that the directory {NFS_MOUNT} on FileServer is accessible
-over NFS and over SMB under the sharename {SMB_SHARENAME}.
-Set the SMB server name to {FILESERVER_NAME}.
+<p>
+Make sure that the directory <code>{{NFS_MOUNT}}</code> on <em>FileServer</em> is accessible over NFS and over SMB under the sharename <code>{{SMB_SHARENAME}}</code>. Set the SMB server name to <code>{{FILESERVER_NAME}}</code>.
-SimpleArbiterDhcp should have write access to {NFS_MOUNT} over NFS.
-"""
+<p>
+<em>SimpleArbiterDhcp</em> should have write access to <code>{{NFS_MOUNT}}</code> over NFS.
+''',
}
computers = {
diff --git a/kpov_judge/tasks/snmp_agent_uptime/task.py b/kpov_judge/tasks/snmp_agent_uptime/task.py
index 7b3143c..919fcb4 100644
--- a/kpov_judge/tasks/snmp_agent_uptime/task.py
+++ b/kpov_judge/tasks/snmp_agent_uptime/task.py
@@ -2,44 +2,49 @@
# TODO: finish this.
instructions = {
- 'si':"""
-Naloga: Postavi tri navidezne racunalnike:
-- SimpleArbiter s sliko diska simpleArbiterDhcpGW,
-- SNMPServer in
-- SNMPClient.
-Napiši program upminutes, ki bo izpisal v minutah koliko casa je racunalnik
-vklopljen.
-
-Postavi ga na SNMPClient v domaci imenik uporabnika test z geslom test.
-
-Poskrbi, da bo SNMP strežnik prek SNMP pod
-OID {SNMP_UPTIME_OID} sporočal, koliko casa je vklopljen
-v sekundah.
-
-Napiši skripto, poimenovano beri.sh, ki prek SNMP prebere vrednost s
-simpleArbiterDhcpGWSNMP na OID {SNMP_CLIENT_OID} kot član skupnosti
-"testers".
-
-Postavi jo na SNMP klienta, v domaci imenik uporabnika test z geslom test.
-
-Poskrbi, da bodo podatki na SNMPServer dostopni za skupino (community) studentje.
-""",
- 'en':"""
-Set up three virtual computers, SimpleArbiter with the disk image simpleArbiterDhcp,
-SNMPServer and SNMPClient. Write a program called upminutes. This program should output
-the uptime of the computer in minutes. Set it up on SNMPClient in the home directory
-of the user test with the password test.
-
-Make sure that the SNMP server reports it's uptime in seconds over SNMP under
-OID {SNMP_UPTIME_OID}.
-
-Write a script called beri.sh that reads the value from the OID
-{SNMP_CLIENT_OID} on simpleArbiterDhcpGWSNMP as a member of the
-community "testers".
-Set it up on SNMPClient in the home directory of the user test.
-
-Make all the data available over SNMP readable by the "studentje" community.
-"""
+ 'si': '''\
+<p>
+Postavi tri navidezne računalnike: <em>SimpleArbiter</em>, <em>SNMPServer</em> in <em>SNMPClient</em>.
+
+<p>
+Napiši program <code>upminutes</code>, ki bo izpisal v minutah, koliko časa je racunalnik vklopljen. Postavi ga na <em>SNMPClient</em> v domači imenik uporabnika <code>test</code> z geslom <code>test</code>.
+
+<p>
+Poskrbi, da bo strežnik SNMP pod OID
+
+<pre><code>{{SNMP_UPTIME_OID}}</code></pre>
+
+<p>
+sporočal, koliko časa je vklopljen v sekundah.
+
+<p>
+Napiši skripto, poimenovano <code>beri.sh</code>, ki prek SNMP prebere vrednost s <em>simpleArbiterDhcpGWSNMP</em> na OID
+
+<pre><code>{{SNMP_CLIENT_OID}}</code></pre>
+
+<p>
+kot član skupnosti <code>testers</code>. Postavi jo na <em>SNMPClient</em>, v domači imenik uporabnika <code>test</code>. Poskrbi, da bodo podatki na SNMPServer dostopni za skupino (angl. <em lang="en">community</em>) <code>studentje</code>.
+''',
+ 'en': '''\
+<p>
+Set up three virtual computers: <em>SimpleArbiter</em>, <em>SNMPServer</em> and <em>SNMPClient</em>.
+
+<p>
+Write a program called <code>upminutes</code>. This program should output the uptime of the computer in minutes. Set it up on <em>SNMPClient</em> in the home directory of the user <code>test</code> with the password <code>test</code>.
+
+<p>
+Make sure that the SNMP server reports its uptime in seconds over SNMP under OID
+
+<pre><code>{{SNMP_UPTIME_OID}}</code></pre>
+
+<p>
+Write a script called <code>beri.sh</code> that reads the value from the OID
+
+<pre><code>{{SNMP_CLIENT_OID}}</code></pre>
+
+<p>
+on <em>simpleArbiterDhcpGWSNMP</em> as a member of the community <code>testers</code>. Set it up on <em>SNMPClient</em> in the home directory of the user <code>test</code>. Make all the data available over SNMP readable by the community <code>studentje</code>.
+''',
}
computers = {
diff --git a/kpov_judge/tasks/snmp_alarms_interfaces/task.py b/kpov_judge/tasks/snmp_alarms_interfaces/task.py
index f1e8d62..03d4509 100644
--- a/kpov_judge/tasks/snmp_alarms_interfaces/task.py
+++ b/kpov_judge/tasks/snmp_alarms_interfaces/task.py
@@ -2,7 +2,7 @@
instructions = {
'si':"""
-Postavite tri računalnike - SimpleArbiterSNMP s sliko diska simpleArbiterSNMP, ServerSNMP s sliko
+<pre>Postavite tri računalnike - SimpleArbiterSNMP s sliko diska simpleArbiterSNMP, ServerSNMP s sliko
diska serverSNMP ter SNMPClient.
Na SNMPClient ustvarite uporabnika test z geslom test. V datoteko /home/test/alarmi zapišite
@@ -10,7 +10,7 @@ vse IP in vse OID, s katerih po SNMP prihajajo alarmi. Za vsak alarm zapišite e
v kateri bosta najprej IP, nato OID, ločena s presledkom.
V datoteko /home/test/vmesniki vpišite imena vseh omrežnih vmesnikov, ki jih prek SNMP dobite na
-ServerSNMP.
+ServerSNMP.</pre>
"""
}
diff --git a/kpov_judge/tasks/vlc_stream_rtp/task.py b/kpov_judge/tasks/vlc_stream_rtp/task.py
index bfdfb4f..427fc0e 100644
--- a/kpov_judge/tasks/vlc_stream_rtp/task.py
+++ b/kpov_judge/tasks/vlc_stream_rtp/task.py
@@ -4,31 +4,28 @@
# TODO: finish this
instructions = {
- 'si':"""
-Postavi navidezni računalnik SimpleArbiter z diska simpleArbiter
-ter StudentVLC z diska student-VLC. Poskrbi, da bosta na istem omrežju, od
-koder bosta imela dostop tudi do Interneta Na StudentVLC posodobi datoteko
-/etc/apt/sources.list, preveri posodobitve in naloži VLC.
+ 'si': '''\
+<p>
+Postavi navidezni računalnik <em>SimpleArbiter</em> in <em>StudentVLC</em>. Poskrbi, da bosta na istem omrežju, od koder bosta imela dostop tudi do interneta.
-Posnemi ali kako drugače ustvari film ter poskrbi, da bo film dostopen na
-lokalnem omrežju prek RTP z imenom toka {TOK} na naslovu {NASLOV}, vrata {PORT}.
-Računaj, da bodo film lahko videli tvoji sošolci. Kršenje avtorskih pravic
-je pri reševanju te naloge strogo prepovedano.
-""",
- 'en':"""
-Set up a virtual computer called SimpleArbiter using the simpleArbiter disk and
-a virtual computer called StudentVLC using the student-VLC disk. Make sure they
+<p>
+Na <em>StudentVLC</em> posodobi datoteko <code>/etc/apt/sources.list</code>, preveri posodobitve in naloži VLC.
+
+<p>
+Posnemi ali kako drugače ustvari film ter poskrbi, da bo film dostopen na lokalnem omrežju prek RTP z imenom toka <code>{{TOK}}</code> na naslovu <code>{{NASLOV}}</code>, vrata <code>{{PORT}}</code>. Računaj, da bodo film lahko videli tvoji sošolci. Kršenje avtorskih pravic je pri reševanju te naloge strogo prepovedano.
+''',
+ 'en': '''\
+<p>
+Set up a virtual computer called <em>SimpleArbiter</em> using the simpleArbiter disk and
+a virtual computer called <em>StudentVLC</em> using the student-VLC disk. Make sure they
are on the same network and that they have access to the Internet.
-On StundentVLC, update /etc/apt/sources.list, check the for updates and install
-VLC.
-Record or otherwise create a movie and make sure the movie is avaliable
-on your local network via RTP with the name of the stream {TOK} at the address
-{NASLOV} on port {PORT}.
-Take into account that the movie may be seen by your classmates.
-Copyright infrigement while solving this task is strictly prohibited.
+<p>
+On StundentVLC, update /etc/apt/sources.list, check the for updates and install VLC.
-"""
+<p>
+Record or otherwise create a movie and make sure the movie is avaliable on your local network via RTP with the name of the stream <code>{{TOK}}</code> at the address <code>{{NASLOV}}</code> on port <code>{{PORT}}</code>. Take into account that the movie may be seen by your classmates. Copyright infrigement while solving this task is strictly prohibited.
+''',
}
computers = {