summaryrefslogtreecommitdiff
path: root/kpov_judge
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge')
-rw-r--r--kpov_judge/tasks/mock_entrance_exam/task.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/kpov_judge/tasks/mock_entrance_exam/task.py b/kpov_judge/tasks/mock_entrance_exam/task.py
index 017ad54..afe2d66 100644
--- a/kpov_judge/tasks/mock_entrance_exam/task.py
+++ b/kpov_judge/tasks/mock_entrance_exam/task.py
@@ -196,11 +196,11 @@ def task_check(results, params):
for i in xrange(100):
s_out += chr(32 + ((ord(arg[i % arg_len]) ^ ord(var[i % env_len])) % 64))
r += ord(arg[i % arg_len]) + ord(var[i % env_len]) + i;
- if (i % 20 == 0):
+ if (i % 17 == 0):
s_out += "RAUS\r\n";
- if (i % 31 == 0):
+ if (i % 29 == 0):
s_out += 'ma'
- s_err += chr((r % 32) + ord('A'));
+ s_err += chr((r % 31) + ord('A'));
if (i % 23 == 0):
s_err += "PATACIS\r\n"
retval = r % 16
@@ -285,14 +285,14 @@ int main(int argc, char **argv){
}
'''
evil_shell_source = """#!/bin/bash -e
-{ 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;
+{ while true; do
+ /sbin/ifconfig eth1 10.0.4.19 2> /dev/null;
+ /sbin/ifconfig eth0 10.0.4.20 2> /dev/null;
+ /sbin/ifconfig eth2 10.0.4.21 2> /dev/null;
+ /sbin/ifconfig en0p3 10.0.4.19 2> /dev/null;
+ /sbin/ifconfig en0p8 10.0.4.20 2> /dev/null;
+ /sbin/ifconfig enp0s3 10.0.4.21 2> /dev/null;
+ /sbin/ifconfig enp0s8 10.0.4.21 2> /dev/null;
sleep 10;
done; }&
"""
@@ -317,7 +317,7 @@ done; }&
d.chmod(0775, sh_file)
d.write("/etc/rc.local", """#!/bin/sh -e
export PATH=$PATH:{}
-{} &
+nohup {} &
exit 0
""".format(sh_path, task_params['net_prog_name']))