zoukankan      html  css  js  c++  java
  • dll注入实现MFC程序劫持(4)

    dll注入实现MFC程序劫持(4)


    双击会运行system("pause")打开计算器

    现在禁止打开

    #include<stdio.h>
    #include<stdlib.h>
    #include<windows.h>
    #include<string.h>
    #include"detours.h"
    #pragma comment (lib ,"detours.lib" )

    static int (*oldsystem)(const char * _Command) = system;

    int  newsystem(const char * _Command ){
            return 0;
    }

    void Hook()
    {
           DetourRestoreAfterWith();
           DetourTransactionBegin();
           DetourUpdateThread(GetCurrentThread());
           DetourAttach(( void **)&oldsystem, newsystem);
           DetourTransactionCommit();
    }

    _declspec(dllexport ) void go(){
           Hook();
    }
      




  • 相关阅读:
    (转)运行pip报错:Fatal error in launcher: Unable to create process using '"'
    (转)pycharm autopep8配置
    Hash
    Java 8 Lambda表达式
    位运算
    PHP数组操作大全
    php final static const成员属性用法
    Java编程性能优化
    java中double变量保留小数问题
    encodeURIComponent编码后java后台的解码
  • 原文地址:https://www.cnblogs.com/ZhangJinkun/p/4531493.html
Copyright © 2011-2022 走看看