Files
mikhmon-fix/fix-container.py
T
2026-08-15 00:28:08 +07:00

16 lines
545 B
Python

import sys
for f in ['/tmp/aup.php', '/tmp/upbn.php']:
with open(f, 'r') as fh:
content = fh.read()
original = content
content = content.replace(':pick', '\x00PG\x00')
content = content.replace(':pic', ':pick')
content = content.replace('\x00PG\x00', ':pick')
if content != original:
with open(f, 'w') as fh:
fh.write(content)
n = content.count(':pick') - original.count(':pick')
print('FIXED: ' + f + ' (' + str(n) + ' occurrences)')
else:
print('NOCHANGE: ' + f)