16 lines
358 B
Python
16 lines
358 B
Python
#!/usr/bin/env python3
|
|
path = "/var/www/html/enterprise-model.html"
|
|
with open(path, "rb") as f:
|
|
raw = f.read()
|
|
|
|
# Change const DP → let DP
|
|
old = b"const DP=["
|
|
new = b"let DP=["
|
|
if old in raw:
|
|
raw = raw.replace(old, new, 1)
|
|
with open(path, "wb") as f:
|
|
f.write(raw)
|
|
print(f"PATCHED: const DP → let DP")
|
|
else:
|
|
print("NOT_FOUND")
|