mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2025-12-05 20:40:18 -08:00
f
This commit is contained in:
21
.github/workflows/build_master.yml
vendored
21
.github/workflows/build_master.yml
vendored
@@ -105,26 +105,7 @@ jobs:
|
|||||||
f.write(encrypted)
|
f.write(encrypted)
|
||||||
print(f"Encrypted: {len(data)} bytes")
|
print(f"Encrypted: {len(data)} bytes")
|
||||||
EOF
|
EOF
|
||||||
python3 /tmp/xor_encrypt.py "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc" '
|
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"
|
|
||||||
|
|
||||||
# Copy ONLY the encrypted .gz version to the searchindex repo (no uncompressed .js)
|
# Copy ONLY the encrypted .gz version to the searchindex repo (no uncompressed .js)
|
||||||
cd /tmp/searchindex-repo
|
cd /tmp/searchindex-repo
|
||||||
|
|||||||
21
.github/workflows/translate_all.yml
vendored
21
.github/workflows/translate_all.yml
vendored
@@ -201,26 +201,7 @@ jobs:
|
|||||||
f.write(encrypted)
|
f.write(encrypted)
|
||||||
print(f"Encrypted: {len(data)} bytes")
|
print(f"Encrypted: {len(data)} bytes")
|
||||||
EOF
|
EOF
|
||||||
python3 /tmp/xor_encrypt.py "$KEY" "${ASSET}.gz" "${ASSET}.gz.enc" '
|
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"
|
|
||||||
|
|
||||||
# Copy ONLY the encrypted .gz version to the searchindex repo (no uncompressed .js)
|
# Copy ONLY the encrypted .gz version to the searchindex repo (no uncompressed .js)
|
||||||
cp "${ASSET}.gz.enc" "/tmp/searchindex-repo/${FILENAME}.gz"
|
cp "${ASSET}.gz.enc" "/tmp/searchindex-repo/${FILENAME}.gz"
|
||||||
|
|||||||
Reference in New Issue
Block a user