Remove HMAC salt from public release

This commit is contained in:
Leeksov
2026-04-06 10:35:33 +03:00
parent bfa8e76fa6
commit f919b5adcc
3 changed files with 18 additions and 2 deletions
+12
View File
@@ -26,8 +26,20 @@ if grep -rq "F8A8NWPL78" . --include="*.swift" --include="*.json" --include="*.b
FOUND=1
fi
# HMAC salt
if grep -rq "glegram-hmac-v1" . --include="*.swift" 2>/dev/null; then
echo "FAIL: HMAC salt found!"
FOUND=1
fi
# SSL pinning hashes
if grep -rq "brDmHiqwkhgPrFDmkcD2IsDUdKLZlyGjGkn0SOGNKFI" . --include="*.swift" --include="*.json" 2>/dev/null; then
# HMAC salt
if grep -rq "glegram-hmac-v1" . --include="*.swift" 2>/dev/null; then
echo "FAIL: HMAC salt found!"
FOUND=1
fi
echo "FAIL: SSL pinning hashes found!"
FOUND=1
fi
+4
View File
@@ -47,6 +47,10 @@ public let SG_API_WEBAPP_URL_PARSED = URL(string: SG_CONFIG.webappUrl)!
SWIFT
echo " Stripped: SGConfig"
# 1.5 SupportersCrypto — remove HMAC salt
sed -i '' 's/private let HMAC_SALT = .*/private let HMAC_SALT = "YOUR_HMAC_SALT"/' GLEGram/SGSupporters/Sources/SupportersCrypto.swift 2>/dev/null
echo " Stripped: HMAC salt"
# 2. Build configs — replace with templates
for cfg in build-system/ipa-build-configuration.json build-system/glegram-appstore-configuration.json; do
cat > "$cfg" << 'JSON'