XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEEDToolBox

【WinUI】XFE精英危险工具箱

公开
关注 0 Fork 0 Star 0
UTF-8
"""Offline pinned PE strings naming galaxy marker sources; no process access."""
import json,re
from pathlib import Path
import pefile

image=Path('artifacts/ship-model-reference/client-copy/EliteDangerous64.exe')
pe=pefile.PE(str(image),fast_load=True)
rows=[]
for section in pe.sections:
    if section.Characteristics&0x20000000:continue
    for match in re.finditer(rb'[\x20-\x7e]{5,256}\0',section.get_data()):
        text=match.group()[:-1].decode('ascii')
        if any(term in text.lower() for term in ('communitygoal','community_goal','fleetcarriermanager','missionmanager','community goal')):
            rows.append(dict(rva=hex(section.VirtualAddress+match.start()),text=text))
out=Path('artifacts/galaxy-query-research/published-markers')
out.mkdir(parents=True,exist_ok=True)
(out/'strings.json').write_text(json.dumps(dict(image=str(image),strings=rows),indent=2)+'\n',encoding='utf-8')
for row in rows:print(row['rva'],row['text'])