处理字符串扫描 [英] Process scan for strings

查看:104
本文介绍了处理字符串扫描的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,这是我已经找到的代码:

Hey, this is the code i already found:

using System;
using System.Diagnostics;
using System.ComponentModel;

namespace MyProcessSample
{
    class MyProcess
    {
        void BindToRunningProcesses()
        {

            Process myProcess = Process.GetCurrentProcess();

        }

        static void Main()
        {
            MyProcess myProcess = new MyProcess();
            myProcess.BindToRunningProcesses();
        }
    }
}




我如何扫描这个程序中的字符串,它在内存中?

How do i scan this program for string, which are in the memory of it?

亲切的问候!

Kind Regards!

推荐答案

你好neoparadise1,

Hello neoparadise1,

>>如何扫描此程序中的字符串,它们在内存中?

你是什么意思"扫描"含义?你想达到什么目的?您提供的代码是创建一个MyProcess实例,然后调用" BindToRunningProcesses"方法。如果你想找到开始
和进程内存的结束地址,你可以尝试以下。

What do you mean the "scan" meaning? what purpose do you want to achieve? The code you provided is to create a MyProcess instance and then invoke "BindToRunningProcesses" method of which. If you want to find start and end address of process memory, you could try the below.

 Process myProcess = Process.GetCurrentProcess();

 IntPtr startOffset = myProcess.MainModule.BaseAddress;
 IntPtr endOffset = IntPtr.Add(startOffset, myProcess.MainModule.ModuleMemorySize);

如果你给我更详细的信息,那就太好了。

It would be nice if you give me more detailed info about you issues.

祝你好运,

Neil Hu


这篇关于处理字符串扫描的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆