吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 1037|回复: 0
收起左侧

[求助] 求坛友指点一下问题代码

[复制链接]
8600 发表于 2021-4-25 19:47
一个搜索数组字符串的函数,如下:
int Function()
{
        char date[100] = {
                0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x07,0x09,
                0x00,0x20,0x10,0x03,0x03,0x0C,0x00,0x00,0x44,0x00,
                0x00,0x33,0x00,0x47,0x0C,0x0E,0x00,0x0D,0x00,0x11,
                0x00,0x00,0x00,0x02,0x64,0x00,0x00,0x00,0xAA,0x00,
                0x00,0x00,0x64,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
                0x00,0x00,0x02,0x00,0x74,0x0F,0x41,0x00,0x00,0x00,
                0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x0A,0x00,
                0x00,0x02,0x57,0x4F,0x57,0x00,0x06,0x08,0x00,0x00,
                0x00,0x00,0x00,0x64,0x00,0x0F,0x00,0x00,0x0D,0x00,
                0x00,0x00,0x23,0x00,0x00,0x64,0x00,0x00,0x64,0x00
        };
        char* p = date;
        const char* z = "WOW";
        int* x;
        int* y;
        for (int i = 0; i < 96; i++)
        {
                x = (int*)p + i;
                y = (int*)z;
                if (*x==*y)
                {
                        return 1;
                }
        }
        return 0;
}这一个Function()是可以找出来的。


下面这个我就不会弄
char Data[100] =
{
        0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x07,0x09,
        0x00,0x20,0x10,0x03,0x03,0x0C,0x00,0x00,0x44,0x00,
        0x00,0x33,0x00,0x47,0x0C,0x0E,0x00,0x0D,0x00,0x11,
        0x00,0x00,0x00,0x02,0x64,0x00,0x00,0x00,0xAA,0x00,
        0x00,0x00,0x64,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x02,0x00,0x74,0x0F,0x41,0x00,0x00,0x00,
        0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x0A,0x00,
        0x00,0x02,0x57,0x4F,0x57,0x00,0x06,0x08,0x00,0x00,
        0x00,0x00,0x00,0x64,0x00,0x0F,0x00,0x00,0x0D,0x00,
        0x00,0x00,0x23,0x00,0x00,0x64,0x00,0x00,0x64,0x00
};
char* FindRoleNameAddr(char* Data, const char* pRoleName)
{
        char* ret = Data;
        const char* fund = pRoleName;
        int* x;
        int* y;
        for (int i = 0; i < 96; i++)
        {
                x = (int*)ret;
                y = (int*)fund;
                if (*(x+i)==*y)
                {
                        printf("%x", x);
                }
        }
        return ret;

}
定义了一个全局的数组,然后下面这个函数指针不知道怎么写,也找不到 wow 这串字符串。main()函数里是这样的  FindRoleNameAddr(Data,"wow");
求各位坛友大佬路过帮忙看看指点一下是哪里不对,谢谢。

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

您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止回复与主题无关非技术内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

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

GMT+8, 2024-5-17 06:34

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

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