aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruno Ribas <brunoribas@gmail.com>2020-11-05 17:20:44 +0000
committerBruno Ribas <brunoribas@gmail.com>2020-11-05 17:20:44 +0000
commit344f0371dad49b6726f10426e3aca3cbb31652bb (patch)
tree624f81ddf9eecc451bf5e9e2f914f1e2a38b238e /src
parent09deabd4a1026b0e4b495f890b1b6ea63e093947 (diff)
downloadboca-344f0371dad49b6726f10426e3aca3cbb31652bb.tar.gz
boca-344f0371dad49b6726f10426e3aca3cbb31652bb.zip
getcode.php: Define a SITE variable in the script
This modification makes things easier to check in which site the remote machine was registered. This modification was made in 2018 and merged now. Signed-off-by: Bruno Ribas <brunoribas@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/getcode.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/getcode.php b/src/getcode.php
index fcc45cd..2ad8c0c 100644
--- a/src/getcode.php
+++ b/src/getcode.php
@@ -51,7 +51,8 @@ if(isset($_GET["name"]) && $_GET["name"] != "" ) {
"echo -n \"" . $cc . "\" >/root/submissions/comp\n" .
"chmod 600 /root/submissions/comp\n" .
"echo -n \"" . trim($secret[2]) . "\" > /root/submissions/code\n" .
- "chmod 600 /root/submissions/code\n";
+ "chmod 600 /root/submissions/code\n" .
+ "SITEUSER=".$name."\n";
if(($str = @file_get_contents("/var/www/boca/src/private/run-past.code")) !== false) $txt .= $str;
echo $iv . ":" . $clen . ":\n" . openssl_encrypt($txt, "aes-256-cbc", substr($secret[1],0,32), OPENSSL_RAW_DATA, $iv);