【发布时间】:2014-07-31 16:02:08
【问题描述】:
假设我发布了下面的应用程序。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("Hello World!","Message Box");
}
}
}
现在这是我的问题:
- 如何找到负责显示的按钮的功能 使用 ollydbg 按下按钮后的消息框?
- 如何禁用按钮点击?
注意:这必须仅使用 ollydbg 完成。假设我无权访问代码。
非常感谢您提供分步示例。
【问题讨论】:
-
Ollydbg 对于托管代码来说可能是一个有点困难的选择,因为它是 JIT 编译。你为什么要这样做?为什么不使用其他工具,例如带有 VS 插件的 .NET Reflector 或带有 SOS.dll 的 WinDBG?你希望通过找到它来完成什么?
-
我正在开发一个游戏客户端,我想禁用它上面的按钮。我正在尝试使用此应用程序简化按钮单击行,因此在我在应用程序上找到它后,在客户端上会更容易找到!
-
Olly 不会帮助您做到这一点。可执行文件中的代码是 IL 代码,但 Olly 使用的只是本地代码。您可能会找到该函数,甚至可能更改它,但由于您找到的是 JIT 本机代码,因此不会进行永久性更改。
-
那么你建议我做什么?
-
我建议您遵循以下答案中的建议。
标签: c# disassembly ollydbg