±×¸²ÆÇÀüüº¸±â±â´É¼º°ø
ºñ°ø°³
(¼Õ´Ô)
2023.01.10 04:07:33
±×¸²ÆÇ Àüüº¸±â ±â´É ¼º°ø?
using System.Data;
using System.Diagnostics;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using System.Runtime.Serialization.Formatters.Binary;
using System.Windows.Forms;

namespace mspaintcap
{
    public partial class Form1 : Form
    {
        [DllImport("kernel32.dll")]
        public static extern int OpenProcess(uint dwDesiredAccess, bool bInheritHandle, int dwProcessId);

        [DllImport("kernel32.dll")]
        public static extern bool ReadProcessMemory(int hProcess, Int64 lpBaseAddress, byte[] buffer, int size, int lpNumberOfBytesRead);

        // https://blog.sweetchip.kr/265
        public uint DELETE = 0x00010000;
        public uint READ_CONTROL = 0x00020000;
        public uint WRITE_DAC = 0x00040000;
        public uint WRITE_OWNER = 0x00080000;
        public uint SYNCHRONIZE = 0x00100000;
        public uint END = 0xFFF;

        Process[] p;

        public Form1()
        {
            InitializeComponent();
        }

        int processHandle = 0;

        private void Form1_Load(object sender, EventArgs e)
        {
            try
            {
                p = Process.GetProcessesByName("mspaint");
            }
            catch { textBox1.Text = "error"; }
            processHandle = OpenProcess((DELETE | READ_CONTROL | WRITE_DAC | WRITE_OWNER | SYNCHRONIZE | END), false, p[0].Id);
        }

        private void buttonFind_Click(object sender, EventArgs e)
        {
            NewMethod();

        }

        private void NewMethod()
        {
            if (processHandle == 0) return;


            textBox1.Text = processHandle.ToString();
            int w = 900;
            int h = 737;
            var ImageBytes = ReadMemory(0x22adc540a70, w * h * 4, processHandle);
            //File.WriteAllBytes("a.raw", buf);
            //Bitmap output = new Bitmap(w, h, PixelFormat.Format24bppRgb);
            Bitmap output = new Bitmap(w, h, PixelFormat.Format32bppArgb);
            Rectangle rect = new Rectangle(0, 0, output.Width, output.Height);
            BitmapData bmpData = output.LockBits(rect, ImageLockMode.ReadWrite, output.PixelFormat);
            IntPtr ptr = bmpData.Scan0;
            Marshal.Copy(ImageBytes, 0, ptr, ImageBytes.Length);
            output.UnlockBits(bmpData);
            pictureBox1.Image = output;
            pictureBox1.Refresh();
        }

        public static byte[] ReadMemory(Int64 adress, int processSize, int processHandle)
        {
            byte[] buffer = new byte[processSize];
            ReadProcessMemory(processHandle, adress, buffer, processSize, 0);
            return buffer;
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            NewMethod();
        }
    }
} 18.219.112.111 |

Àâ´ã | 1,377¸íÀÌ Àоú¾î¿ä. 18.219.112.111 | | 10

·¹¾î¡¤À¯¸Ó¡¤ÀÚÀÛ Àαâ±Û
1 Çѱ¹ ¾ÆÁܸ¶ÀÇ ¼±¹° 17½Ã°£ Àü
2 20년지ᄀ... 19½Ã°£ Àü
3 "³²ÀÚµé ¶§¹®¿¡ ÀúÃâ»ê" 5½Ã°£ Àü
4 °øÇ× ±Ù¹«ÀÚµéÀÌ ±ØÇøÇÑ´Ù´Â ½Â°´ ij¸®¾î 5½Ã°£ Àü
5 ȯ»ýÇß´õ´Ï ³»°¡ »çÀå´ÔÀÇ °í¾çÀÌ? 7½Ã°£ Àü
´ñ±Û 7°³
1 ºñ°ø°³
https://winduck.tistory.com/1
2023/01/10 05:16
3 ºñ°ø°³
ÀÌ°É ¾îÄÉ ¾²Áö¿©?.. ¹®°úÃæ ¤Ð¤Ð
2023/01/10 07:07
4 ºñ°ø°³
3/ ¾µ¼öÀÖ°Ô ¸¸µå´Â°Åµµ ÀÏÀ̳×
½Ã°£Á» °É¸±°Å °°³×¿ä »ç¿ë¹ýÀÌ ³Ê¹« ¾î·Á¿ö¼­
2023/01/10 07:09
5 ºñ°ø°³
ÀÌ·±°Ç ¾îµð¼­ ¹è¿ì¼Ì³ª¿©?
ÁøÂ¥ ³ªÁß¿¡ Àú´Â ´ß Æ¢±â´Â°Å ¸»°ï ÇÒ¼ö ÀÖ´Â°Ô ¾øÀ»µí
2023/01/10 07:10
6 ºñ°ø°³
5/ ±×³É ¸¸µé°í ½ÍÀ¸¸é ã¾Æ¼­ ¸¸µå´Â°ÅÁö... ÀÌ·±°É °¡¸£ÃÄ Áִµ¥°¡ ÀÖÀ»¸®°¡¿ä

ÀÏ´ÜÀº º»¾÷ÀÌ ÇÁ·Î±×·¥À̱äÇѵ¥...
2023/01/10 23:18
7 ºñ°ø°³
6/ Á¸°æÇÕ´Ï´Ù...
2023/01/11 00:01
¸Þ´º ¸ñ·Ï ¸ÇÀ§·Î ·Î±×ÀÎ
TE31.COM ¨Ï 2002-2024
¼­¹ö ºÎÇÏ 22%