aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcassio <cassiopc@gmail.com>2018-08-27 12:11:09 +0000
committercassio <cassiopc@gmail.com>2018-08-27 12:11:09 +0000
commit8f3d351b689a0988a906c10ae003528b5980f9bd (patch)
tree258f898558dcb37a6f739d46ecefb94bd74d2c08
parentaa9b235580570fbceb61ca828789c3379d813834 (diff)
downloadboca-8f3d351b689a0988a906c10ae003528b5980f9bd.tar.gz
boca-8f3d351b689a0988a906c10ae003528b5980f9bd.zip
pass len iv
-rw-r--r--src/getcode.php2
-rwxr-xr-xtools/boca-auth-runs1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/getcode.php b/src/getcode.php
index 677aeeb..687379f 100644
--- a/src/getcode.php
+++ b/src/getcode.php
@@ -52,7 +52,7 @@ if(isset($_GET["name"]) && $_GET["name"] != "" ) {
"chmod 600 /root/submissions/code\n";
if(($str = @file_get_contents("/var/www/boca/src/private/run-past.code")) !== false) $txt .= $str;
- echo $iv . ":\n" . openssl_encrypt($txt, "aes-256-cbc", substr($secret[1],0,32), OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING, $iv); //OPENSSL_RAW_DATA, $iv); //php 5.4.0
+ echo $iv . ":" . $clen . ":\n" . openssl_encrypt($txt, "aes-256-cbc", substr($secret[1],0,32), OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING, $iv); //OPENSSL_RAW_DATA, $iv); //php 5.4.0
@file_put_contents("/var/www/boca/src/private/run-past.log", $name . "|" . $cc . "|" . date(DATE_RFC2822) . "\n", LOCK_EX | FILE_APPEND);
exit;
}
diff --git a/tools/boca-auth-runs b/tools/boca-auth-runs
index 111d285..0f8c630 100755
--- a/tools/boca-auth-runs
+++ b/tools/boca-auth-runs
@@ -58,6 +58,7 @@ if [ "$?" == "0" ]; then
a=""
ivv=""
iv=$(head -n1 "$temp" | cut -d':' -f1)
+ clen=$(head -n1 "$temp" | cut -d':' -f2)
tail -n +2 "$temp" > "${temp}.0"
rm -f "$temp"
for ((i=0;i<32;i++));do a="$a`printf %02X \'${ress:$i:1}`"; done