HEX
Server: nginx/1.18.0
System: Linux vps-9dcdb12e 5.15.0-176-generic #186-Ubuntu SMP Fri Mar 13 11:01:42 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.24
Disabled: exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source
Upload Files
File: //tmp/fix_aqua.py
import json, re, sys
raw = open('/tmp/aq_orig.json', encoding='utf-8').read().strip()
fixed = re.sub(r'\\u([0-9a-fA-F]{4})', lambda m: chr(int(m.group(1),16)), raw)
try:
    data = json.loads(fixed)
except Exception as e:
    sys.stderr.write("parse fixed failed: %s\n" % e)
    data = json.loads(raw)
cnt=0
def walk(els):
    global cnt
    for e in els:
        if isinstance(e,dict):
            if e.get('widgetType','').startswith('tpg'):
                e.setdefault('settings',{})['order']='DESC'
                e['settings']['orderby']='date'
                cnt+=1
            walk(e.get('elements',[]))
walk(data)
out = json.dumps(data, ensure_ascii=True, separators=(',',':'))
open('/tmp/aq_clean.json','w').write(out)
bs_u = chr(92)+'u'
print("widgetow z order=DESC:", cnt)
print("rozmiar wyniku:", len(out))
print("liczba escape sekwencji:", out.count(bs_u))
print("zawiera Atrakcje:", "Atrakcje" in out)