Coding -> C#

08/12/2010 20:00 kptoo#1
Heii ich hätte mal ne frage -> wer schreibt seine hacks alles mit C#?
Ich hab nen quellcode aber es gibt noch ein paar probleme die ich nicht selbst lösen kann da ich nicht weiß was falsch ist ...

Wer sich gut mit C# auskennt -> skype:matze_casjopeija

danke ( :
08/12/2010 20:37 KDeluxe#2
Falsche Sektion, aber C&P bewährt sich nie.
08/13/2010 13:24 schnewin#3
Quote:
Originally Posted by kptoo View Post
Heii ich hätte mal ne frage -> wer schreibt seine hacks alles mit C#?
Ich hab nen quellcode aber es gibt noch ein paar probleme die ich nicht selbst lösen kann da ich nicht weiß was falsch ist ...

Wer sich gut mit C# auskennt -> skype:matze_casjopeija

danke ( :
Dann schrieb doch einfach deinen Code hier auf.
Naja, ich habe hier mal ein Beispiel, wie man mithilfe von ReadProcessMemory einen Wert aus einem Pointer ausliest und diesen in einem Label speichert.
Have Fun.
PHP Code:
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Diagnostics;

namespace 
GameHackingFinish
{
    public 
partial class Form1 : Form
    
{
        [
DllImport("kernel32.dll")]
        static 
extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAdress, byte[] lpBuffer, UIntPtr nSize, ref uint lpNumberOfWritten);
        [
DllImport("kernel32.dll")]
        static 
extern IntPtr OpenProcess(UInt32 dwDesireAcces, Boolean bIntheritHandle, UInt32 dwProcessId);
        [
DllImport("kernel32.dll")]
        static 
extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAdress, byte[] Buffer, UIntPtr nSize, ref uint lpNumberOfWritten);

        
Process[] Solitär_Process = Process.GetProcessesByName("Sol");
        
byte[] bytes = new byte[24];
        
uint size = sizeof(int);
        
uint rw = 0;
        
uint baseAdress = 0x01007170;
        
uint baseOffset = 0x30;

        public 
Form1()
        {
            
InitializeComponent();
        }

        private 
void Form1_Load(object sender, EventArgs e)
        {
            
timer1.Start();
        }

        private 
void timer1_Tick(object sender, EventArgs e)
        {
            
Process Solitär = Solitär_Process[0];
            
IntPtr readHandle = OpenProcess(0x10, false, (uint)Solitär.Id);
            if (
Solitär_Process.Length == 0)
            {
                
MessageBox.Show("Solitär konnte nicht gefunden werden", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                
timer1.Stop();
                
Application.Exit();
            }

            
//Lesen der Adressen;
            
ReadProcessMemory(readHandle, (IntPtr)baseAdress, bytes, (UIntPtr)size, ref rw);
            
uint baseContent = BitConverter.ToUInt32(bytes, 0);
            
uint baseAdress_2 = baseContent + baseOffset;
            
ReadProcessMemory(readHandle, (IntPtr)baseAdress_2, bytes, (UIntPtr)size, ref rw);
            
int baseContent_2 = BitConverter.ToInt32(bytes, 0);
            
string baseTest = Convert.ToString(baseContent_2);
            
lblPunkte.Text = baseTest;
        }

    }
}