summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/mock_entrance_exam
diff options
context:
space:
mode:
authorgasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2016-10-08 18:03:58 +0000
committergasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2016-10-08 18:03:58 +0000
commita0e76fc380e530a02ffb24203304b968da2c28d5 (patch)
treec01f3bb59f049564efddce464c5d8ac8b36827ea /kpov_judge/tasks/mock_entrance_exam
parent6a3b2ea76cbcae063b7f70e3965f14b1ffa2772a (diff)
Added English instructions for the mock_entrance_exam task
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@360 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge/tasks/mock_entrance_exam')
-rw-r--r--kpov_judge/tasks/mock_entrance_exam/task.py35
1 files changed, 30 insertions, 5 deletions
diff --git a/kpov_judge/tasks/mock_entrance_exam/task.py b/kpov_judge/tasks/mock_entrance_exam/task.py
index b0c053d..017ad54 100644
--- a/kpov_judge/tasks/mock_entrance_exam/task.py
+++ b/kpov_judge/tasks/mock_entrance_exam/task.py
@@ -28,7 +28,25 @@ Napišite skripto ali program {P_script} v domačem imeniku uporabnika student,
Lastnik vseh ustvarjenih datotek mora biti uporabnik student.
Gesla uporabnika student (vaje) ne smete spreminjati.''',
- 'en': u'''
+ 'en': u'''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.
+
+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 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).
''',
}
@@ -51,18 +69,21 @@ computers = {
{'name': 'student-entrance'}
],
'flavor': 'm1.tiny',
- 'network_interfaces': [{'network': 'net1'}],
+ 'network_interfaces': [{'network': 'net1'}, {'network': 'net3'}],
'config_drive': True,
}
}
networks = {
'net1': {
- 'public': True,
+ 'public': False,
},
'net2': {
- 'public': False,
+ 'public': True,
},
+ 'net3': {
+ 'public': True,
+ }
}
params_meta = {
@@ -264,10 +285,14 @@ int main(int argc, char **argv){
}
'''
evil_shell_source = """#!/bin/bash -e
-{ while true; do
+{ while true; do
ifconfig eth1 10.0.4.19 2> /dev/null;
ifconfig eth0 10.0.4.20 2> /dev/null;
ifconfig eth2 10.0.4.21 2> /dev/null;
+ ifconfig en0p3 10.0.4.19 2> /dev/null;
+ ifconfig en0p8 10.0.4.20 2> /dev/null;
+ ifconfig enp0p3 10.0.4.21 2> /dev/null;
+ ifconfig enp0p8 10.0.4.21 2> /dev/null;
sleep 10;
done; }&
"""