我會評論,但我不能。
無論如何,我會做一些內存黑客: http://www.codeproject.com/Articles/670373/Csharp-Read-Write-another-Process-Memory
訪問使用記事本的內存(RAM)。你可以看到明文。
內存黑客通常被忽視,並沒有給予太多的信貸。每個人都有鍵盤鍵或其他東西,但這是不必要的。只是這樣做:
這裏是CodePlex上:
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
public class MemoryRead
{
const int PROCESS_WM_READ = 0x0010;
[DllImport("kernel32.dll")]
public static extern IntPtr OpenProcess(int dwDesiredAccess, bool bInheritHandle, int dwProcessId);
[DllImport("kernel32.dll")]
public static extern bool ReadProcessMemory(int hProcess,
int lpBaseAddress, byte[] lpBuffer, int dwSize, ref int lpNumberOfBytesRead);
public static void Main()
{
Process process = Process.GetProcessesByName("notepad")[0];
IntPtr processHandle = OpenProcess(PROCESS_WM_READ, false, process.Id);
int bytesRead = 0;
byte[] buffer = new byte[24]; //'Hello World!' takes 12*2 bytes because of Unicode
// 0x0046A3B8 is the address where I found the string, replace it with what you found
ReadProcessMemory((int)processHandle, 0x0046A3B8, buffer, buffer.Length, ref bytesRead);
Console.WriteLine(Encoding.Unicode.GetString(buffer) +
" (" + bytesRead.ToString() + "bytes)");
Console.ReadLine();
}
}
UPDATE複製並粘貼錯誤的代碼。以上是新的
你製作的本質上是一個鍵盤記錄器。查找如何在C#中構建一個# – Martheen