吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 1079|回复: 24
上一主题 下一主题
收起左侧

[新手问题] IDA8.3 shift+F12可以搜到中文字符串,9.0的为什么搜不到?

[复制链接]
跳转到指定楼层
楼主
ldwz 发表于 2026-5-6 10:22 回帖奖励
我用的8.3可以正常搜到  中文


但是这个IDA 是英文的,我看不习惯。所以就升级到新的9.0或者9.3都实验了。都是 shift+F12 都不到中文。这个是哪里问题。?

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

推荐
qq465881818 发表于 2026-5-6 19:25
ldwz 发表于 2026-5-6 19:12
我放进去也搜不到 中文。。是不是还需要设置那里?

插件菜单点击运行

免费评分

参与人数 1吾爱币 +2 热心值 +1 收起 理由
联盟少侠 + 2 + 1 谢谢@Thanks!

查看全部评分

推荐
qq465881818 发表于 2026-5-6 17:10
[Python] 纯文本查看 复制代码
import ida_idaapi
import idaapi
import idautils
import idc


def set_comment():
    for segment in idautils.Segments():
        seg_name = idc.get_segm_name(segment)
        segments = ['.data', '.idata', '.rdata']
        if seg_name in segments:
            print('add comment for segment ', seg_name)
            set_segment_cmt(segment)


def set_segment_cmt(segment):
    start_ea = segment
    end_ea = idc.get_segm_end(segment)
    temp_ea = start_ea
    comment_ea = start_ea
    comment = ''
    comment_gbk = ''
    comment_utf8 = ''
    comment_utf16 = ''

    byte_data = []
    while temp_ea < end_ea:
        byte_d = idc.get_db_byte(temp_ea)
        if byte_d != 0:
            if comment_ea == 0:
                comment_ea = temp_ea
            byte_data.append(byte_d)
        else:
            if len(byte_data) > 2:
                # 首先使用gbk解析
                try:
                    comment_gbk = bytes(byte_data).decode("GBK")
                    comment = comment_gbk
                except Exception:
                    pass
                # 再使用utf-8解析
                try:
                    comment_utf8 = bytes(byte_data).decode("utf-8")
                    if comment_utf8 != comment_gbk:
                        comment = comment + "\n" + comment_utf8
                except Exception:
                    pass
                # 再使用utf-16le 解析
                try:
                    comment_utf16 = bytes(byte_data).decode("utf-16le")
                    if comment_utf16 != comment_gbk and comment_utf16 != comment_utf8:
                        comment = comment + "\n" + comment_utf16
                except Exception:
                    pass
                idaapi.set_cmt(comment_ea, comment, True)
                print(hex(comment_ea), comment)
            byte_data = []
            comment_ea = 0
        temp_ea = idc.next_addr(temp_ea)


def PLUGIN_ENTRY():
    """
    Required plugin entry point for IDAPython plugins.
    """
    return SetChineseComment()


class SetChineseComment(ida_idaapi.plugin_t):
    """
    The IDA Patching plugin stub.
    """
    flags = ida_idaapi.PLUGIN_PROC | ida_idaapi.PLUGIN_UNL
    comment = "A plugin of ida of setting chinese comment"
    help = ""
    wanted_name = "Set Chinese Comment"
    wanted_hotkey = "alt+9"

    # --------------------------------------------------------------------------
    # IDA Plugin Overloads
    # --------------------------------------------------------------------------

    def __init__(self):
        pass

    def init(self):
        print('*' * 10, self.wanted_name, ' init...')
        return ida_idaapi.PLUGIN_KEEP

    def run(self, arg):
        print('*' * 10, self.wanted_name, ' runing...')
        set_comment()
        print('*' * 10, self.wanted_name, ' run finished...')

    def term(self):
        print('*' * 10, self.wanted_name, ' term...')



保存为set_chinese_comment.py 放到plugins文件夹下 就可以在 反汇编窗口显示中文了
沙发
冥界3大法王 发表于 2026-5-6 12:20
配置改了吗?
光显示中文名有啥意思。。。
函数重命名 也能取中文名 补丁 也得打啊。
3#
shdbxb123 发表于 2026-5-6 14:36
同问,我用9.3也搜索不到中文字符串,是需要改什么设置吗?
4#
 楼主| ldwz 发表于 2026-5-6 14:58 |楼主
冥界3大法王 发表于 2026-5-6 12:20
配置改了吗?
光显示中文名有啥意思。。。
函数重命名 也能取中文名 补丁 也得打啊。

指点一下大姥。啥补丁?怎么配置?
5#
situhaonan 发表于 2026-5-6 16:05
同问,我也不知道。把补丁分享下呗,谢谢
7#
联盟少侠 发表于 2026-5-6 18:56
qq465881818 发表于 2026-5-6 17:10
[mw_shl_code=python,true]import ida_idaapi
import idaapi
import idautils

大佬 好像没有生效,是不是直接放进去不行还有什么前提条件?
8#
 楼主| ldwz 发表于 2026-5-6 19:12 |楼主
qq465881818 发表于 2026-5-6 17:10
[mw_shl_code=python,true]import ida_idaapi
import idaapi
import idautils

我放进去也搜不到 中文。。是不是还需要设置那里?
9#
qq465881818 发表于 2026-5-6 19:23
联盟少侠 发表于 2026-5-6 18:56
大佬 好像没有生效,是不是直接放进去不行还有什么前提条件?

在插件菜单里运行
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - 52pojie.cn ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2026-8-7 03:13

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表