body { font-family: 微软雅黑, “Microsoft YaHei”, Georgia, Helvetica, Arial, sans-serif, 宋体, PMingLiU, serif; font-size: 10.5pt; line-height: 1.5 }
html, body { }
h1 { font-size: 1.5em; font-weight: bold }
h2 { font-size: 1.4em; font-weight: bold }
h3 { font-size: 1.3em; font-weight: bold }
h4 { font-size: 1.2em; font-weight: bold }
h5 { font-size: 1.1em; font-weight: bold }
h6 { font-size: 1em; font-weight: bold }
img { border: 0; max-width: 100%; height: auto !important }
blockquote { margin-top: 0; margin-bottom: 0 }
table { border-collapse: collapse; border: 1px solid rgba(187, 187, 187, 1) }
td { border-collapse: collapse; border: 1px solid rgba(187, 187, 187, 1) }
外挂指针

//外挂
//改变一个数据,需要数据的地址,也就是指针,int需要int*
//改变一个指针变量,需要指针的地址,二级指针,int*需要int **
//改变一个二级指针,需要二级指针的地址,三级指针,int**需要int ***
//改变一个指针,指针指向数组,需要指针的地址,数组的首地址
//函数指针,找到地址,进行类型转换,调用函数。

#include<stdio.h>
#include<stdlib.h>

//调用游戏内部函数
_declspec(dllexport ) void go()
{
       void(*p) () = ( void(*) ())0xf610f5;
       p();
}

//调用游戏内部函数
_declspec(dllexport )void go1()
{
       int(*p) ( int, int) = ( int(*) ( int, int))0xf6109b;
       int t = p(100, 200);
       system( “color 0a”);
       printf( “—-t—-:%d\n”, &t);
}

//修改游戏中变量
_declspec(dllexport ) void go2()
{
       int* pa = ( int*)0x2710;
       *pa = 777777;
       int* pb = ( int*)0x4e20;
       *pb = 888888;
}

//修改游戏中一级指针
_declspec(dllexport ) void go3()
{
       int** p1 = ( int**)0x2710;
       *p1 = ( int*)0x2222;
       int** p2 = ( int**)0x4e20;
       *p2 = ( int*)0x22223;
}

//修改游戏中二级指针
_declspec(dllexport ) void go4()
{
        int*** pp = ( int***)0x2710;
       *pp = ( int**)0x3333;
}

//修改游戏中数组
_declspec(dllexport ) void go5()
{
       char** pp = ( char**)0x22;
       *pp = ( char*)0x223 + 0x1;
}












  

版权声明:本文为ZhangJinkun原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/ZhangJinkun/p/4531540.html