写了一个内存地址特征码搜索工具

博主分享了一款自己开发的内存搜索工具,该工具能够搜索汇编上的地址,匹配特征码的内存地址,并支持使用正则表达式进行通配符搜索。虽然目前功能还有待完善,如未实现读取内存指针,但已具备多线程搜索能力。作者期待社区的优化建议和反馈,并计划后续发布源码和DEMO。

实现了

1.搜索汇编上的地址

2.搜索匹配特征的内存地址

3.搜索到的地址再做+法计算,还没做读取内存指针,是直接16进制加法

4.支持通配符(就是用正则表达式来做的)

现在还不是很完善,因为一边学一边做,总觉得欠缺了啥,一些地方还得优化,先上图,过几天放源码


搜索界面:



搜索结果图:搜索运用了线程同时处理,用时单位是毫秒


生成规则界面:




这一版本的操作类:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Threading;
using System.Diagnostics;
using System.Text.RegularExpressions;
using System.ComponentModel;
using System.Globalization;
using System.Reflection;

    public class Scan
    {
        /// <summary>
        /// 所有需要扫描的列表
        /// </summary>
        private List<ScanCode> _scode;
        public List<ScanCode> scode
        {
            get { return this._scode; }
            set { this._scode = value; }
        }
        /// <summary>
        /// 打开文件的byte[]数组
        /// </summary>
        private byte[] _fileBytes;
        public byte[] fileBytes
        {
            get { return this._fileBytes; }
        }
        /// <summary>
        /// 打开文件的16进制全字符串
        /// </summary>
        private string _fileHex;
        public string fileHex
        {
            get { return this._fileHex; }
        }
        /// <summary>
        /// 文件流的起始十六进制
        /// </summary>
        private int _beginHex;
        public int beginHex
        {
            get { return this._beginHex; }
            set { this._beginHex = value; }
        }
        /// <summary>
        /// 文件缓冲区大小
        /// </summary>
        private int _bufferSize;
        public int bufferSize
        {
            get { return this._beginHex; }
            set { this._beginHex = value; }
        }
        /// <summary>
        /// 当前扫描线程数
        /// </summary>
        private int _threadCount;
        public int threadCount
        {
            get { return this._threadCount; }
            set { this._threadCount = value; }
        }
        /// <summary>
        /// 初始化
        /// </summary>
        /// <param name="filePath">打开应用程序文件</param>
        /// <param name="beginHex">应用程序起始地址</param>
        public Scan(string filePath, int beginHex)
        {
            this._beginHex = beginHex;
            this._scode = new List<ScanCode>();
            //打开文件
            using (FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read))
            {
                int fsLength = (int)fs.Length;
                //读取文件的byte[] 耗时约 1000ms 内
                fs.Seek(0, SeekOrigin.Begin);
                this._fileBytes = new byte[fsLength];
                fs.Read(this._fileBytes, 0, fsLength);
                //通过byte[]转成string
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值