From c5a8b2c72841ad0b58fb36870624737634778056 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sat, 13 Oct 2018 03:10:03 +0200 Subject: HTMLize instructions and use jinja2 to render them Only fixed tasks for the kpov_2018 class for now. --- kpov_judge/tasks/basic_network_gcc/task.py | 33 +++--- kpov_judge/tasks/copy_rename_100_files/task.py | 8 +- .../tasks/copy_rename_20_files_tail_env/task.py | 113 +++++++++------------ kpov_judge/tasks/custom_rdate/task.py | 49 ++++----- kpov_judge/tasks/dhcp_dns_predefined_ip/task.py | 2 +- .../tasks/edit_find_grep_compile_convert/task.py | 65 +++++------- kpov_judge/tasks/isc_dhcp_live_boot/task.py | 82 ++++++--------- kpov_judge/tasks/ldap_import/task.py | 5 +- kpov_judge/tasks/ldap_search/task.py | 87 ++++++++++------ kpov_judge/tasks/mock_entrance_exam/task.py | 67 ++++++------ kpov_judge/tasks/nat_port_forward/task.py | 5 +- kpov_judge/tasks/nat_vlc/task.py | 46 ++++----- .../tasks/network_boot_custom_program/task.py | 4 +- kpov_judge/tasks/openvpn_multiple_hops/task.py | 4 +- kpov_judge/tasks/openvpn_simple_smb/task.py | 53 +++++----- kpov_judge/tasks/openwrt/task.py | 4 +- kpov_judge/tasks/public_ip_ssh/task.py | 4 +- kpov_judge/tasks/public_ssh_motd_http/task.py | 4 +- kpov_judge/tasks/radius_multiple_realms/task.py | 4 +- kpov_judge/tasks/radius_mysql_pam/task.py | 65 ++++++------ kpov_judge/tasks/rdate_64bit/task.py | 4 +- kpov_judge/tasks/rename_grep_network/task.py | 4 +- kpov_judge/tasks/set_ip_dhcp_hostname/task.py | 4 +- kpov_judge/tasks/set_ip_static_dhcp/task.py | 48 ++++----- kpov_judge/tasks/set_motd/task.py | 51 +++++----- kpov_judge/tasks/smb_nfs/task.py | 30 +++--- kpov_judge/tasks/snmp_agent_uptime/task.py | 81 ++++++++------- kpov_judge/tasks/snmp_alarms_interfaces/task.py | 4 +- kpov_judge/tasks/vlc_stream_rtp/task.py | 39 ++++--- 29 files changed, 471 insertions(+), 498 deletions(-) (limited to 'kpov_judge/tasks') 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': '''\ +

+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. -Računajte, da se na Student ob zagonu zažene program {net_prog_name}, +

+Računajte, da se na Student 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. +

+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. -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}. +

+Napišite skripto ali program {{P_script} v domačem imeniku uporabnika student, ki +

-Lastnik vseh ustvarjenih datotek mora biti uporabnik student. -Gesla uporabnika student (vaje) ne smete spreminjati.''', +

+Lastnik vseh ustvarjenih datotek mora biti uporabnik student. Gesla uporabnika student (vaje) 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 +

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.
""", 'en': ''' -Create two virtual machines. For the first, use the `simpleArbiterDhcp' image. +
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.
''', } 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..b65161d 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': '''\ +

+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. Pazite, 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 pet sekund 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 spletni strani, 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.py, 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. + +

+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 /home/student/mama_ukaz. + +

+Write a program (which may be a shell script) that will track the contents of /var/log/syslog for five seconds. 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 one-second interval. Store the script in /home/student/syslog_ukaz.sh. + +

+Install the package cowsay and test it. 😊 + +

+Using the curl command 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. +''', } computers = { 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': '''\ +

+Postavite dva navidezna računalnika: SimpleArbiterDhcpRdate in rdateClient. + +

+Nastavite čas na rdateClient tako, da kot rdate strežnik uporabite SimpleArbiterDhcpRdate. + +

+Na rdateClient ustvarite uporabnika test z geslom test. V domačem imeniku uporabnika test ustvarite program z imenom {{PROGRAM_FILENAME}}. 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. big endian). Število naj program izpiše na standardni izhod v obliki niza. +''', + 'en': '''\ +

+Set up two virtual machines: SimpleArbiterDhcpRdate and rdateClient. + +

+Set the time on rdateClient using rdate with SimpleArbiterDhcpRdate as +the server. + +

+On rdateClient create a user with the username test and password test. Then, write a program called {{PROGRAM_FILENAME}} and put it in user test’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}. +

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}.
""" } 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': '''\ +

+Ustvari dva navidezna računalnika: SimpleArbiter SmallStudent. -Na SimpleArbiter se lahko prijaviš z uporabniškim imenom tester in geslom tester. -Na SmallStudent se lahko prijaviš kot root z geslom kaboom. +

+Poskrbi, da bo SmallStudent s SimpleArbiter dostopen na naslovu {{testip}}. -Poskrbi, da bo SmallStudent s SimpleArbiter dostopen na naslovu {testip}. +

+Na SmallStudent ustvari uporabnika {{testuser}} z geslom {{passwd}}. -Na SmallStudent ustvari uporabnika {testuser} z geslom {passwd}. +

+Na SmallStudent je nekje v domačem imeniku uporabnika bilbo skrita datoteka, ki vsebuje niz {{magicstr}}. Skopiraj jo v domači imenik uporabnika {{testuser}} in jo poimenuj {{dstfile}}. Poskrbi, da bo lastnik {{testuser}}, 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". +

+V {{dstfile}} zamenjaj vse vrstice oblike poXYZlz, kjer je XYZ poljubno zaporedje znakov, tako, da bo namesto XYZ niz kaka. -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. +

+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 uporabnika {{testuser}}. +''', + 'en': '''\ +

+Create two virtual machines: SimpleArbiter and SmallStudent. -You can log in as tester on SimpleArbiter with the password tester. -You can log in as root on SimpleStudent with the password kaboom. +

+Make sure that SmallStudent is accessible from SimpleArbiter on IP {{testip}}. -Make sure that SmallStudent is accessible from SimpleArbiter on IP {testip}. +

+Create a user {{testuser}} with the password {{passwd}} on SmallStudent. -Create a user {testuser} with the password {passwd} on SmallStudent. +

+There is a file containing {{magicstr}} hidden somewhere in the home directory of user bilbo. Copy it into {{testuser}}’s home directory and name it {{dstfile}}. Change the owner to {{testuser}} 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". +

+In {{dstfile}}, replace all lines of the form poXYZlz where XYZ are arbitrary characters so that XYZ is replaced by kaka. -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}. +

+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, and ti. If B-th bit is set to 0. Name the program {{progname}} and place it in the home directory of {{testuser}}. ''', } 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': '''\ +

+Postavi štiri navidezne računalnike: simpleArbiter, DHCP_server, BootableClientA in BootableClientB. + +

+Na DHCP_server postavi strežnik DHCP s pomočjo ISC dhcp 3 na naslovu {{IP_DHCP}}. SimpleArbiter naj dobi {{IP_GW}}. DHCP_server naj ga uporabi kot privzeti prehod (angl. 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 in 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. +''', + 'en': '''\ +

+Set up four virtual machines: 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 the 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. +''', } + 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. +

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.
""" } diff --git a/kpov_judge/tasks/ldap_search/task.py b/kpov_judge/tasks/ldap_search/task.py index 92a7223..485a2ae 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': '''\ +

+Ustvari dva navidezna računalnika: SimpleArbiter in LDAPServer. -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 +

+Na LDAPServer 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 +

DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
-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} +

+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}, +

CN={{LDAP_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+ +

+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}}. + +

+Poskrbi, da se bo lahko klient s SimpleArbiter povezal na LDAP strežnik na LDAPServer. +V primeru, da se klient poveže kot {{BIND_USERNAME}} z geslom {{BIND_PASSWORD}}, 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 + +

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
 
 CN = Common Name
 O = Organization
 OU = Organizational Unit
 DC = Domain Component
-""",
-    'en': """
-Create two virtual machines - SimpleArbiter using the disk simpleArbiterDhcp
-and LDAPServer.
+
+''', + 'en': '''\ +

+Create two virtual machines: SimpleArbiter and LDAPServer. -Set up an LDAP server on LDAPServer. Make it responsible for -DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si +

+Set up an LDAP server on LDAPServer. Make it responsible for +

DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+ +

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 +

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
-with the password {LDAP_PASSWORD} . +

+with the password {{LDAP_PASSWORD}} . -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 +

+Make sure that a client from SimpleArbiter 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 -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 +

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
 
 CN = Common Name
 O = Organization
 OU = Organizational Unit
 DC = Domain Component
-
-"""
+
+''', } computers = { diff --git a/kpov_judge/tasks/mock_entrance_exam/task.py b/kpov_judge/tasks/mock_entrance_exam/task.py index 906df97..84dff82 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': '''\ +

+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. -Računajte, da se na Student ob zagonu zažene program {net_prog_name}, -ki vam spreminja nastavitve mrežne kartice. +

+Računajte, da se na Student 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. +

+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. -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}. +

+Napišite skripto ali program {{P_script}} v domačem imeniku uporabnika student, 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}. +

-Keep in mind that a program called {net_prog_name} starts on Student -whenever Student boots. This program may change your network settings. +

+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}}. + +

+Keep in mind that a program called {{net_prog_name}} starts on Student on each boot. This program may change your network settings. + +

+There is a program called {{P_c}} in student’s home directory. 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. -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. +

+Also, write a script or program called {{P_script}} in student’s home directory. The script should: -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}. +

-The owner of all created files should be student. You are not allowed to change student's password (vaje). +

+The owner of all created files should be student. You are not allowed to change student’s password (vaje). ''', } 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 +

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.
""" } 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': '''\ +

+Postavi dva navidezna računalnika: SimpleArbiter in 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 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. +''', } 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. +

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.
""" } 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. +
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.
""" } diff --git a/kpov_judge/tasks/openvpn_simple_smb/task.py b/kpov_judge/tasks/openvpn_simple_smb/task.py index d4bb510..dbc835c 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': '''\ +

+Postavi dva navidezna računalnika: SimpleArbiter in 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). -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} +

+Na strežniku SimpleArbiter že teče 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. Računalniku VPNClient1 na navideznem lokalnem omrežju nastavite naslov +{{IP_VPNClient1}}. -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}. +

+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: SimpleArbiter and 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}}. -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. +

+An OpenVPN server is already running on SimpleArbiter. Use the secret +available on VPNClient1 in the home directory of user student to connect to the VPN server on SimpleArbiter. 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}. -""" +

+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}}. +''' } computers = { 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 +

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.
""" } 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 +
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.
""" } 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. +
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.
""" } 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, +
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.
""" } 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': '''\ +

+Ustvari dva navidezna računalnika: SimpleArbiter in RadiusServer. Na RadiusServer 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. +

+Ustvari podatkovno bazo MySQL z imenom {{MYSQL_DB_NAME}}. Ustvari uporabnika za MySQL 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. -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 +

+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 privzeta. -Dostop do strežnika Radius na RadiusServer s SimpleArbiter naj bo mogoč ob -uporabi skrivnosti {RADIUS_SECRET}. +

+Dostop do strežnika Radius na RadiusServer s SimpleArbiter naj bo mogoč ob uporabi skrivnosti {{RADIUS_SECRET}}. -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}. +

+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}}. -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. +

+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 and RadiusServer. On RadiusServer, 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. +

+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. -Set up FreeRadius so that the data about users and passwords is stored in the -MySQL database. Keep the default schema (table names). +

+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. +

+Make the Radius server on RadiusServer accessible from SimpleArbiter using {{RADIUS_SECRET}} 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}. +

+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}}. -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. -""" +

+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. +''', } #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 +

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.
""" } 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 +
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.
""", '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. +
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.
""" } 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': '''\ +

+Ustvari tri navidezne računalnike. Za prvega uporabi sliko diska simpleArbiterDhcpGW, za drugega sliko diska +maliNetworkManager, za tretjega sliko diska maliBrezNetworkManager. Računalnike 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 naslov IP {{IP_NM}} ter DNS {{DNS_NM}}. + +

+Na maliBrezNetworkManager nastavi naslov IP {{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 and 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}} for DNS. + +

+On maliNetworkManager, set the IP address to {{IP_NM}} and use {{DNS_NM}} 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': '''\ +

+Ustvari dva navidezna računalnika - imenujmo ju SimpleArbiterDhcpGW in Student. +Na računalniku Student ustvarite uporabnika z uporabniškim imenom {{peer_user}}. IP navideznega računalnika Student ter geslo za uporabnika {{peer_user}} nastavite sami. -Na računalniku Student ustvarite uporabnika z uporabniškim imenom {peer_user}. +

+Poskrbite, da se bo v sporočilu, ki se ob prijavi izpiše na računalniku Student, 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. +

{{niz}}
-IP navideznega računalnika Student ter geslo za {peer_user} nastavite sami. +

+Temu sporočilu v angleščini rečemo message of the day oziroma MOTD. 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:~$ . +

username@hostname:~$ 
-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': '''\ +

+Create two virtual machines named SimpleArbiterDhcpGW and Student. On Student, create a user with the username {{peer_user}}. Set the IP of Student and the password for {{peer_user}} yourself. -On Student, create a user with the username {peer_user}. +

+Set the message of the day (MOTD) on Student to -Set the message of the day (MOTD) on Student to "{niz}". This is the message -which is displayed when you log in. +

{{niz}}
-Set the IP of Student and the password for {peer_user} yourself. +

+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. -""" +

username@hostname:~$ 
+ +

+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': '''\ +

+Postavi dva navidezna računalnika: simpleArbiterDhcp in FileServer. -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}. +

+Poskrbi, da bo imenik {{NFS_MOUNT}} na FileServer dostopen prek NFS in prek SMB kot imenik v skupni rabi {{SMB_SHARENAME}}. Ime strežnika SMB nastavite na {{FILESERVER_NAME}}. -SimpleArbiterDhcp naj ima prek NFS pravico pisati po imeniku. -""", -'en':""" -Set up two virtual computers (simpleArbiterDhcp and FileServer). +

+SimpleArbiterDhcp naj ima prek NFS pravico pisati po imeniku. +''', + 'en': '''\ +

+Set up two virtual computers: simpleArbiterDhcp and FileServer. -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}. +

+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}}. -SimpleArbiterDhcp should have write access to {NFS_MOUNT} over NFS. -""" +

+SimpleArbiterDhcp should have write access to {{NFS_MOUNT}} 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': '''\ +

+Postavi tri navidezne računalnike: SimpleArbiter, SNMPServer in SNMPClient. + +

+Napiši program upminutes, ki bo izpisal v minutah, koliko časa je racunalnik vklopljen. Postavi ga na SNMPClient v domači imenik uporabnika test z geslom test. + +

+Poskrbi, da bo strežnik SNMP pod OID + +

{{SNMP_UPTIME_OID}}
+ +

+sporočal, koliko časa 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 SNMPClient, v domači imenik uporabnika test. Poskrbi, da bodo podatki na SNMPServer dostopni za skupino (angl. community) studentje. +''', + 'en': '''\ +

+Set up three virtual computers: SimpleArbiter, 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 its 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 community studentje. +''', } 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 +

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.
""" } 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': '''\ +

+Postavi navidezni računalnik SimpleArbiter in StudentVLC. 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 +

+Na StudentVLC posodobi datoteko /etc/apt/sources.list, preveri posodobitve in naloži VLC. + +

+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 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. +

+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. +''', } computers = { -- cgit v1.2.1 From 481fd30e6cc6fc242e9471ce08f676f4883a3e69 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sat, 13 Oct 2018 19:16:45 +0200 Subject: Call write_default_config for arbiter in all KPOV 2018 tasks --- kpov_judge/tasks/copy_rename_20_files_tail_env/task.py | 7 ++----- kpov_judge/tasks/ldap_search/task.py | 1 - kpov_judge/tasks/mock_entrance_exam/task.py | 3 +++ kpov_judge/tasks/openvpn_simple_smb/task.py | 2 ++ 4 files changed, 7 insertions(+), 6 deletions(-) (limited to 'kpov_judge/tasks') 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 b65161d..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 @@ -290,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 @@ -353,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/ldap_search/task.py b/kpov_judge/tasks/ldap_search/task.py index 485a2ae..29117db 100644 --- a/kpov_judge/tasks/ldap_search/task.py +++ b/kpov_judge/tasks/ldap_search/task.py @@ -208,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 84dff82..01d4fa5 100644 --- a/kpov_judge/tasks/mock_entrance_exam/task.py +++ b/kpov_judge/tasks/mock_entrance_exam/task.py @@ -309,3 +309,6 @@ nohup {} & exit 0 """.format(sh_path, task_params['net_prog_name'])) + +def prepare_disks(templates, task_params, global_params): + write_default_config(templates['simpleArbiter'], global_params) diff --git a/kpov_judge/tasks/openvpn_simple_smb/task.py b/kpov_judge/tasks/openvpn_simple_smb/task.py index dbc835c..5d7c22f 100644 --- a/kpov_judge/tasks/openvpn_simple_smb/task.py +++ b/kpov_judge/tasks/openvpn_simple_smb/task.py @@ -257,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) -- cgit v1.2.1 From fe23a3348098bc62b91c866771bd6585e01e4929 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sat, 13 Oct 2018 20:17:56 +0200 Subject: =?UTF-8?q?Oops,=20don=E2=80=99t=20redefine=20prepare=5Fdisks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kpov_judge/tasks/mock_entrance_exam/task.py | 1 - 1 file changed, 1 deletion(-) (limited to 'kpov_judge/tasks') diff --git a/kpov_judge/tasks/mock_entrance_exam/task.py b/kpov_judge/tasks/mock_entrance_exam/task.py index 01d4fa5..ad51c2a 100644 --- a/kpov_judge/tasks/mock_entrance_exam/task.py +++ b/kpov_judge/tasks/mock_entrance_exam/task.py @@ -310,5 +310,4 @@ nohup {} & exit 0 """.format(sh_path, task_params['net_prog_name'])) -def prepare_disks(templates, task_params, global_params): write_default_config(templates['simpleArbiter'], global_params) -- cgit v1.2.1