diff options
| author | cassio <cassiopc@gmail.com> | 2018-08-27 12:11:09 +0000 |
|---|---|---|
| committer | cassio <cassiopc@gmail.com> | 2018-08-27 12:11:09 +0000 |
| commit | 8f3d351b689a0988a906c10ae003528b5980f9bd (patch) | |
| tree | 258f898558dcb37a6f739d46ecefb94bd74d2c08 | |
| parent | aa9b235580570fbceb61ca828789c3379d813834 (diff) | |
| download | boca-8f3d351b689a0988a906c10ae003528b5980f9bd.tar.gz boca-8f3d351b689a0988a906c10ae003528b5980f9bd.zip | |
pass len iv
| -rw-r--r-- | src/getcode.php | 2 | ||||
| -rwxr-xr-x | tools/boca-auth-runs | 1 |
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 |