����JFIF��`�`�����Viewing File: /home/u820193700/domains/thereown.com/public_html/run_extract.py
import re, os

if not os.path.exists('assets'):
    os.makedirs('assets')

with open('header.php', 'r', encoding='utf-8') as f:
    h = f.read()

style_match = re.search(r'<style>(.*?)</style>', h, re.DOTALL)
if style_match:
    with open('assets/style.css', 'w', encoding='utf-8') as f:
        f.write(style_match.group(1).strip())
    h = h.replace(style_match.group(0), '<link rel="stylesheet" href="assets/style.css">')
    with open('header.php', 'w', encoding='utf-8') as f:
        f.write(h)
    print('Extracted style.css')

with open('footer.php', 'r', encoding='utf-8') as f:
    ft = f.read()

script_match = re.search(r'<script>(.*?)</script>', ft, re.DOTALL)
if script_match:
    with open('assets/script.js', 'w', encoding='utf-8') as f:
        f.write(script_match.group(1).strip())
    ft = ft.replace(script_match.group(0), '<script src="assets/script.js"></script>')
    with open('footer.php', 'w', encoding='utf-8') as f:
        f.write(ft)
    print('Extracted script.js')
Back to Directory �������}�!1AQa"q2���#B��R��$3br� %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������������� ������w�!1AQaq"2�B���� #3R�br� $4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������ ��?��_��+��?��(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(�����