qq-win-db-key
qq-win-db-key copied to clipboard
linux gdb法IndexError: list index out of range
Traceback (most recent call last): File "gkd.py", line 50, in <module> rodata_info = program_header[int(idx)] IndexError: list index out of range
我刚在 Arch 拿 QQ 3.2.18-36497, GNU readelf (GNU Binutils) 2.44.0试了,无法复现。
请你补充以下信息:
- QQ 版本,最好把
/opt/QQ/resources/app/wrapper.node也传上来 - readelf 版本,通过
readelf -v获得 readelf -lW /opt/QQ/resources/app/wrapper.node输出locale输出
作为对照,我的readelf -lW /opt/QQ/resources/app/wrapper.node输出是:
readelf -lW /opt/QQ/resources/app/wrapper.node
Elf file type is DYN (Shared object file)
Entry point 0x0
There are 11 program headers, starting at offset 64
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
PHDR 0x000040 0x0000000000000040 0x0000000000000040 0x000268 0x000268 R 0x8
LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x1e65a3c 0x1e65a3c R 0x1000
LOAD 0x1e65a40 0x0000000001e66a40 0x0000000001e66a40 0x49a37d0 0x49a37d0 R E 0x1000
LOAD 0x6809240 0x000000000680b240 0x000000000680b240 0x26a280 0x26a280 RW 0x1000
LOAD 0x6a734c0 0x0000000006a764c0 0x0000000006a764c0 0x00c2f8 0x033d90 RW 0x1000
TLS 0x6809240 0x000000000680b240 0x000000000680b240 0x000048 0x000118 R 0x40
DYNAMIC 0x6a72cd0 0x0000000006a74cd0 0x0000000006a74cd0 0x000270 0x000270 RW 0x8
GNU_RELRO 0x6809240 0x000000000680b240 0x000000000680b240 0x26a280 0x26adc0 R 0x1
GNU_EH_FRAME 0x118ac80 0x000000000118ac80 0x000000000118ac80 0x1cff64 0x1cff64 R 0x4
GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0
NOTE 0x0002a8 0x00000000000002a8 0x00000000000002a8 0x000018 0x000018 R 0x4
Section to Segment mapping:
Segment Sections...
00
01 .note.gnu.build-id .dynsym .gnu.version .gnu.version_r .gnu.hash .hash .dynstr .rela.dyn .rela.plt .gcc_except_table .rodata .eh_frame_hdr .eh_frame
02 .text .init .fini malloc_hook .plt
03 .tdata .fini_array .init_array .data.rel.ro .dynamic .got
04 .data .tm_clone_table .got.plt .bss
05 .tdata .tbss
06 .dynamic
07 .tdata .fini_array .init_array .data.rel.ro .dynamic .got
08 .eh_frame_hdr
09
10 .note.gnu.build-id
我遇到了相同的问题,不过似乎是locale设置的问题,(使用export LANGUAGE="en_US.UTF-8"可解决问题)
软件版本:
- readelf:
GNU readelf (GNU Binutils) 2.45.0 - linuxqq(AUR):
5:3.2.18_37475-1 - 脚本来源: https://docs.aaqwq.top/files/linux_qq_get_key.py (2025.08.7下载)
部分命令输出:
- locale
LANG=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=zh_CN.UTF-8
- readelf ....
$ readelf -lW /opt/QQ/resources/app/wrapper.node
Elf 文件类型为 DYN (共享目标文件)
Entry point 0x0
There are 11 program headers, starting at offset 64
程序头:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
PHDR 0x000040 0x0000000000000040 0x0000000000000040 0x000268 0x000268 R 0x8
LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x1ea7c44 0x1ea7c44 R 0x1000
LOAD 0x1ea7c80 0x0000000001ea8c80 0x0000000001ea8c80 0x4a47860 0x4a47860 R E 0x1000
LOAD 0x68ef500 0x00000000068f1500 0x00000000068f1500 0x26e540 0x26e540 RW 0x1000
LOAD 0x6b5da40 0x0000000006b60a40 0x0000000006b60a40 0x00c338 0x034150 RW 0x1000
TLS 0x68ef500 0x00000000068f1500 0x00000000068f1500 0x000048 0x000118 R 0x40
DYNAMIC 0x6b5d250 0x0000000006b5f250 0x0000000006b5f250 0x000270 0x000270 RW 0x8
GNU_RELRO 0x68ef500 0x00000000068f1500 0x00000000068f1500 0x26e540 0x26eb00 R 0x1
GNU_EH_FRAME 0x11adc80 0x00000000011adc80 0x00000000011adc80 0x1d4014 0x1d4014 R 0x4
GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0
NOTE 0x0002a8 0x00000000000002a8 0x00000000000002a8 0x000018 0x000018 R 0x4
Section to Segment mapping:
段节...
00
01 .note.gnu.build-id .dynsym .gnu.version .gnu.version_r .gnu.hash .hash .dynstr .rela.dyn .rela.plt .gcc_except_table .rodata .eh_frame_hdr .eh_frame
02 .text .init .fini malloc_hook .plt
03 .tdata .fini_array .init_array .data.rel.ro .dynamic .got
04 .data .tm_clone_table .got.plt .bss
05 .tdata .tbss
06 .dynamic
07 .tdata .fini_array .init_array .data.rel.ro .dynamic .got
08 .eh_frame_hdr
09
10 .note.gnu.build-id
收到 回去试试