C Language Simple target plug

Source: Internet
Author: User

1, the preparation of target procedures

1#include <stdio.h>2#include <windows.h>3 4 voidMain () {5     intA =Ten;6printf"%x\n",&a);7      while(1) {8printf"%d\n", a);9a++;TenSleep ( +); One     } A GetChar (); -}

2, write the target plug

#include <stdio.h>#include<stdlib.h>/*     an EXE can not read another EXE memory */        void Main () {int *p = (int *) 0x34f99c;       10000;}

3. Right-click the target---Properties--Configuration Properties--general--Right item Default--configuration type changed to Dynamic library (. dll)

4, open the target program, will display the memory address assigned to the target plug in the *p

5, compile the target plug-in to generate DLL files

6. Using the Dllinject tool to inject the DLL file, you will see the number on the screen becomes 10000

C Language Simple target plug

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.