From 8f646225ac65e5699eb348ef263f63a36f9b8dd9 Mon Sep 17 00:00:00 2001 From: carlospolop Date: Thu, 23 Oct 2025 12:34:04 +0200 Subject: [PATCH] f --- .github/workflows/build_master.yml | 21 +-------------------- .github/workflows/translate_all.yml | 21 +-------------------- 2 files changed, 2 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build_master.yml b/.github/workflows/build_master.yml index 38f47c494..605db74b1 100644 --- a/.github/workflows/build_master.yml +++ b/.github/workflows/build_master.yml @@ -105,26 +105,7 @@ jobs: f.write(encrypted) print(f"Encrypted: {len(data)} bytes") EOF - python3 /tmp/xor_encrypt.py "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc" ' -import sys -key = sys.argv[1] -input_file = sys.argv[2] -output_file = sys.argv[3] - -with open(input_file, 'rb') as f: - data = f.read() - -key_bytes = key.encode('utf-8') -encrypted = bytearray(len(data)) -for i in range(len(data)): - encrypted[i] = data[i] ^ key_bytes[i % len(key_bytes)] - -with open(output_file, 'wb') as f: - f.write(encrypted) - -print(f"Encrypted: {len(data)} bytes") -PYTHON_SCRIPT - python3 - "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc" + python3 /tmp/xor_encrypt.py "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc" # Copy ONLY the encrypted .gz version to the searchindex repo (no uncompressed .js) cd /tmp/searchindex-repo diff --git a/.github/workflows/translate_all.yml b/.github/workflows/translate_all.yml index 527d397a7..68eb0b588 100644 --- a/.github/workflows/translate_all.yml +++ b/.github/workflows/translate_all.yml @@ -201,26 +201,7 @@ jobs: f.write(encrypted) print(f"Encrypted: {len(data)} bytes") EOF - python3 /tmp/xor_encrypt.py "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc" ' -import sys -key = sys.argv[1] -input_file = sys.argv[2] -output_file = sys.argv[3] - -with open(input_file, 'rb') as f: - data = f.read() - -key_bytes = key.encode('utf-8') -encrypted = bytearray(len(data)) -for i in range(len(data)): - encrypted[i] = data[i] ^ key_bytes[i % len(key_bytes)] - -with open(output_file, 'wb') as f: - f.write(encrypted) - -print(f"Encrypted: {len(data)} bytes") -PYTHON_SCRIPT - python3 - "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc" + python3 /tmp/xor_encrypt.py "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc" # Copy ONLY the encrypted .gz version to the searchindex repo (no uncompressed .js) cp "${ASSET}.gz.enc" "/tmp/searchindex-repo/${FILENAME}.gz"