# Lưu đoạn này vào file find_str.py và chạy: python find_str.py
import sys

file_path = r"vn.gsm.md_6473405044_3.15.0_DecryptIPA_by_TTJB\Payload\Driver.app\Frameworks\App.framework\App"
targets = [b'b.xanhsm.com', b'xanhsm.com', b'app_type', b'deviceId', b'bshield']

print("Đang đọc file, vui lòng đợi...")
with open(file_path, 'rb') as f:
    data = f.read()

print(f"Kích thước file: {len(data)} bytes")
for target in targets:
    pos = 0
    found_positions = []
    while True:
        pos = data.find(target, pos)
        if pos == -1:
            break
        found_positions.append(hex(pos))
        pos += 1
        if len(found_positions) >= 5: # Chỉ in ra 5 vị trí đầu tiên
            break
    
    if found_positions:
        print(f"Tìm thấy '{target.decode()}' tại các vị trí (offset): {', '.join(found_positions)}")
    else:
        print(f"Không tìm thấy '{target.decode()}'")
