Results 1 to 5 of 5

Hybrid View

  1. #1
    raghavsharma301's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    37
    Reputation
    10
    Thanks
    2
    My Mood
    Psychedelic

    IW5m xuid changer unable to find process

    please help in this code as the tittle says

    Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Diagnostics;
    using System.Runtime.InteropServices;
    
    
    namespace IW5M_Xuid_Changer
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
            #region Basic Stuff
            [DllImport("kernel32.dll")]
            private static extern Int32 ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] byte[] buffer, UInt32 size, out IntPtr lpNumberOfBytesWritten);
            [DllImport("kernel32.dll")]
            private static extern Int32 WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] byte[] buffer, UInt32 size, out IntPtr lpNumberOfBytesWritten);
            [DllImport("User32.dll")]
            private static extern short GetAsyncKeyState(System.Windows.Forms.Keys key);
    
            IntPtr pHandel;
            public bool Process_Handle(string ProcessName)
            {
                try
                {
                    Process[] ProcList = Process.GetProcessesByName(ProcessName);
                    if (ProcList.Length == 0)
                        return false;
                    else
                    {
                        pHandel = ProcList[0].Handle;
                        return true;
                    }
                }
                catch (Exception ex)
                { Console.Beep(); Console.WriteLine("Process_Handle - " + ex.Message); return false; }
            }
            private byte[] Read(int Address, int Length)
            {
                byte[] Buffer = new byte[Length];
                IntPtr Zero = IntPtr.Zero;
                ReadProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
                return Buffer;
            }
            private void Write(int Address, int Value)
            {
                byte[] Buffer = BitConverter.GetBytes(Value);
                IntPtr Zero = IntPtr.Zero;
                WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
            }
            #endregion
    
            //This is the part you want to edit
            #region Write Functions (Integer & String)
            public void WriteInteger(int Address, int Value)
            {
                Write(Address, Value);
            }
            public void WriteString(int Address, string Text)
            {
                byte[] Buffer = new ASCIIEncoding().GetBytes(Text);
                IntPtr Zero = IntPtr.Zero;
                WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
            }
            public void WriteBytes(int Address, byte[] Bytes)
            {
                IntPtr Zero = IntPtr.Zero;
                WriteProcessMemory(pHandel, (IntPtr)Address, Bytes, (uint)Bytes.Length, out Zero);
            }
            public void WriteNOP(int Address)
            {
                byte[] Buffer = new byte[] { 0x90, 0x90, 0x90, 0x90, 0x90 };
                IntPtr Zero = IntPtr.Zero;
                WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
            }
    
    
            #endregion
            #region Read Functions (Integer & String)
            public int ReadInteger(int Address, int Length = 4)
            {
                return BitConverter.ToInt32(Read(Address, Length), 0);
            }
            public string ReadString(int Address, int Length = 4)
            {
                return new ASCIIEncoding().GetString(Read(Address, Length));
            }
            public byte[] ReadBytes(int Address, int Length)
            {
                return Read(Address, Length);
            }
            #endregion
            private void textBox1_TextChanged(object sender, EventArgs e)
            {
    
            }
    
            private void button1_Click_1(object sender, EventArgs e)
            {
                if (Process_Handle("iw5mp.exe"))
                {
                    var show = ReadInteger(0x05A7B1D8, 4);
                    textBox1.Text = show.ToString();
                }
    
                else
                {
                    MessageBox.Show("Process not found");
                }
            }
    
            private void DrawString()
            {
                System.Drawing.Graphics formGraphics = this.CreateGraphics();
                string drawString = "Current Xuid";
                System.Drawing.Font drawFont = new System.Drawing.Font("Arial", 16);
                System.Drawing.SolidBrush drawBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black);
                float x = 150.0f;
                float y = 50.0f;
                formGraphics.DrawString(drawString, drawFont, drawBrush, x, y);
                drawFont.Dispose();
                drawBrush.Dispose();
                formGraphics.Dispose();
            }
        }
    }

  2. #2
    mwxplayer's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    hax
    Posts
    584
    Reputation
    10
    Thanks
    2,928
    My Mood
    Doh
    wut?
    C&P fail...
    PS : LOl the code look simularly to mine..
    Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Diagnostics;
    using System.Runtime.InteropServices;
    using System****;
    
    namespace IW5M_Xuid_Changer
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
            #region Basic Stuff
            [DllImport("kernel32.dll")]
            private static extern Int32 ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] byte[] buffer, UInt32 size, out IntPtr lpNumberOfBytesWritten);
            [DllImport("kernel32.dll")]
            private static extern Int32 WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] byte[] buffer, UInt32 size, out IntPtr lpNumberOfBytesWritten);
            [DllImport("User32.dll")]
            private static extern short GetAsyncKeyState(System.Windows.Forms.Keys key);
          
            IntPtr pHandel;
            public bool Process_Handle(string ProcessName)
            {
                try
                {
                    Process[] ProcList = Process.GetProcessesByName(ProcessName);
                    if (ProcList.Length == 0)
                        return false;
                    else
                    {
                        pHandel = ProcList[0].Handle;
                        return true;
                    }
                }
                catch (Exception ex)
                { Console.Beep(); Console.WriteLine("Process_Handle - " + ex.Message); return false; }
            }
            private byte[] Read(int Address, int Length)
            {
                byte[] Buffer = new byte[Length];
                IntPtr Zero = IntPtr.Zero;
                ReadProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
                return Buffer;
            }
            private void Write(int Address, int Value)
            {
                byte[] Buffer = BitConverter.GetBytes(Value);
                IntPtr Zero = IntPtr.Zero;
                WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
            }
            #endregion
    
            //This is the part you want to edit
            #region Write Functions (Integer & String)
            public void WriteInteger(int Address, int Value)
            {
                Write(Address, Value);
            }
            public void WriteString(int Address, string Text)
            {
                byte[] Buffer = new ASCIIEncoding().GetBytes(Text);
                IntPtr Zero = IntPtr.Zero;
                WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
            }
            public void WriteBytes(int Address, byte[] Bytes)
            {
                IntPtr Zero = IntPtr.Zero;
                WriteProcessMemory(pHandel, (IntPtr)Address, Bytes, (uint)Bytes.Length, out Zero);
            }
            public void WriteNOP(int Address)
            {
                byte[] Buffer = new byte[] { 0x90, 0x90, 0x90, 0x90, 0x90 };
                IntPtr Zero = IntPtr.Zero;
                WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
            }
    
    
            #endregion
            #region Read Functions (Integer & String)
            public int ReadInteger(int Address, int Length = 4)
            {
                return BitConverter.ToInt32(Read(Address, Length), 0);
            }
            public string ReadString(int Address, int Length = 4)
            {
                return new ASCIIEncoding().GetString(Read(Address, Length));
            }
            public byte[] ReadBytes(int Address, int Length)
            {
                return Read(Address, Length);
            }
            #endregion
            private void textBox1_TextChanged(object sender, EventArgs e)
            {
    
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                if (Process_Handle("iw5mp"))
                {
                    
                    WriteInteger(0x05A7B1D8, int.Parse(textBox2.Text));
                    button3.PerformClick();
    
    
                    if (System****.File.Exists("xuid.dat"))
                    {
                        StreamWriter sw = new StreamWriter("xuid.dat");
                        sw.WriteLine(textBox2.Text);
                        sw.Close();
                    }
                    else
                    {
                        MessageBox.Show("Create a File Called 'xuid.dat' to save previous xuid");
                    }
                }
    
                else
                {
                    MessageBox.Show("IW5M not found");
                }
            }
    
            private void Form1_Load(object sender, EventArgs e)
            {
                textBox1.Enabled = false;
                
               
    
                if (Process_Handle("iw5mp"))
                {
                    var show = ReadInteger(0x05A7B1D8, 4);
                    textBox1.Text = show.ToString();
    
                    if (System****.File.Exists("currxuid.dat"))
                    {
                        StreamWriter sw = new StreamWriter("currxuid.dat");
                        sw.WriteLine(textBox1.Text);
                        sw.Close();
    
                        StreamReader sr = new StreamReader("currxuid.dat");
                        label7.Text = sr.ReadLine();
                        sr.Close();
                        
    
                    }
    
    
    
                }
                else
                {
                    MessageBox.Show("IW5M not found");
                    textBox1.Text = "IW5M Game not found";
                }
                if (Process_Handle("iw5mp"))
                {
                    var ID = ReadInteger(0x05CCB272, 4);
                   
    
    
                }
                else
                    
                {
                   // MessageBox.Show("IW5M not found");
                }
    
               if(System****.File.Exists("xuid.dat"))
                {
                    StreamReader sr = new StreamReader("xuid.dat");
                    var read = sr.ReadLine();
                    textBox2.Text = read.ToString();
                    sr.Close();
    
                }
            }
    
            private void button2_Click(object sender, EventArgs e)
            {
                
            }
    
            private void button3_Click(object sender, EventArgs e)
            {
                if (Process_Handle("iw5mp"))
                {
                    var show = ReadInteger(0x05A7B1D8, 4);
                    textBox1.Text = show.ToString();
    
                    if (System****.File.Exists("currxuid.dat"))
                    {
                        StreamReader sr = new StreamReader("currxuid.dat");
                        label7.Text = sr.ReadLine();
                        sr.Close();
                    }
                }
                else
                {
                    MessageBox.Show("IW5M not found");
    
                }
            }
    
            private void button4_Click(object sender, EventArgs e)
            {
                if (Process_Handle("iw5mp"))
                {
                    WriteInteger(0x05A7B1D8, int.Parse(label7.Text));
                    button3.PerformClick();
                }
                else
                {
                    MessageBox.Show("IW5M not found");
                }
            }
    
            private void textBox3_TextChanged(object sender, EventArgs e)
            {
    
            }
    
            private void button5_Click(object sender, EventArgs e)
            {
                if (Process_Handle("iw5mp"))
                {
                  var ID =  ReadInteger(0x05CCB272, 4);
                 
    
    
                }
                else
                {
                   MessageBox.Show("IW5M not found");
                }
            }
    
            private void button6_Click(object sender, EventArgs e)
    
            {
                if (Process_Handle("iw5mp"))
                {
                    WriteInteger(0x5F9690C, 4);
    
                }
                else
                {
                    MessageBox.Show("IW5M not found");
                }
            }
    
            private void button7_Click(object sender, EventArgs e)
            {
                if (Process_Handle("iw5mp"))
                {
                    var name = ReadInteger(0x00A042D4, 4);
                    MessageBox.Show("Weapon Name :" + name.ToString());
                }
                else
                {
                    MessageBox.Show("IW5M not found");
                }
            }
    
            private void button2_Click_1(object sender, EventArgs e)
            {
                Random random = new Random();
                int num = random.Next(100000);
                textBox2.Text = Convert.ToString(num);
               
            }
    
            private void button5_Click_1(object sender, EventArgs e)
            {
                if (Process_Handle("iw5mp"))
                {
                    WriteInteger(0x00A042D4, 9844);
                }
                else
                {
                    MessageBox.Show("IW5M not Found");
                }
            }
        }
    }

  3. #3
    raghavsharma301's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    37
    Reputation
    10
    Thanks
    2
    My Mood
    Psychedelic
    Quote Originally Posted by mwxplayer View Post
    wut?
    C&P fail...
    PS : LOl the code look simularly to mine..
    Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Diagnostics;
    using System.Runtime.InteropServices;
    using System****;
    
    namespace IW5M_Xuid_Changer
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
            #region Basic Stuff
            [DllImport("kernel32.dll")]
            private static extern Int32 ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] byte[] buffer, UInt32 size, out IntPtr lpNumberOfBytesWritten);
            [DllImport("kernel32.dll")]
            private static extern Int32 WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] byte[] buffer, UInt32 size, out IntPtr lpNumberOfBytesWritten);
            [DllImport("User32.dll")]
            private static extern short GetAsyncKeyState(System.Windows.Forms.Keys key);
          
            IntPtr pHandel;
            public bool Process_Handle(string ProcessName)
            {
                try
                {
                    Process[] ProcList = Process.GetProcessesByName(ProcessName);
                    if (ProcList.Length == 0)
                        return false;
                    else
                    {
                        pHandel = ProcList[0].Handle;
                        return true;
                    }
                }
                catch (Exception ex)
                { Console.Beep(); Console.WriteLine("Process_Handle - " + ex.Message); return false; }
            }
            private byte[] Read(int Address, int Length)
            {
                byte[] Buffer = new byte[Length];
                IntPtr Zero = IntPtr.Zero;
                ReadProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
                return Buffer;
            }
            private void Write(int Address, int Value)
            {
                byte[] Buffer = BitConverter.GetBytes(Value);
                IntPtr Zero = IntPtr.Zero;
                WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
            }
            #endregion
    
            //This is the part you want to edit
            #region Write Functions (Integer & String)
            public void WriteInteger(int Address, int Value)
            {
                Write(Address, Value);
            }
            public void WriteString(int Address, string Text)
            {
                byte[] Buffer = new ASCIIEncoding().GetBytes(Text);
                IntPtr Zero = IntPtr.Zero;
                WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
            }
            public void WriteBytes(int Address, byte[] Bytes)
            {
                IntPtr Zero = IntPtr.Zero;
                WriteProcessMemory(pHandel, (IntPtr)Address, Bytes, (uint)Bytes.Length, out Zero);
            }
            public void WriteNOP(int Address)
            {
                byte[] Buffer = new byte[] { 0x90, 0x90, 0x90, 0x90, 0x90 };
                IntPtr Zero = IntPtr.Zero;
                WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
            }
    
    
            #endregion
            #region Read Functions (Integer & String)
            public int ReadInteger(int Address, int Length = 4)
            {
                return BitConverter.ToInt32(Read(Address, Length), 0);
            }
            public string ReadString(int Address, int Length = 4)
            {
                return new ASCIIEncoding().GetString(Read(Address, Length));
            }
            public byte[] ReadBytes(int Address, int Length)
            {
                return Read(Address, Length);
            }
            #endregion
            private void textBox1_TextChanged(object sender, EventArgs e)
            {
    
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                if (Process_Handle("iw5mp"))
                {
                    
                    WriteInteger(0x05A7B1D8, int.Parse(textBox2.Text));
                    button3.PerformClick();
    
    
                    if (System****.File.Exists("xuid.dat"))
                    {
                        StreamWriter sw = new StreamWriter("xuid.dat");
                        sw.WriteLine(textBox2.Text);
                        sw.Close();
                    }
                    else
                    {
                        MessageBox.Show("Create a File Called 'xuid.dat' to save previous xuid");
                    }
                }
    
                else
                {
                    MessageBox.Show("IW5M not found");
                }
            }
    
            private void Form1_Load(object sender, EventArgs e)
            {
                textBox1.Enabled = false;
                
               
    
                if (Process_Handle("iw5mp"))
                {
                    var show = ReadInteger(0x05A7B1D8, 4);
                    textBox1.Text = show.ToString();
    
                    if (System****.File.Exists("currxuid.dat"))
                    {
                        StreamWriter sw = new StreamWriter("currxuid.dat");
                        sw.WriteLine(textBox1.Text);
                        sw.Close();
    
                        StreamReader sr = new StreamReader("currxuid.dat");
                        label7.Text = sr.ReadLine();
                        sr.Close();
                        
    
                    }
    
    
    
                }
                else
                {
                    MessageBox.Show("IW5M not found");
                    textBox1.Text = "IW5M Game not found";
                }
                if (Process_Handle("iw5mp"))
                {
                    var ID = ReadInteger(0x05CCB272, 4);
                   
    
    
                }
                else
                    
                {
                   // MessageBox.Show("IW5M not found");
                }
    
               if(System****.File.Exists("xuid.dat"))
                {
                    StreamReader sr = new StreamReader("xuid.dat");
                    var read = sr.ReadLine();
                    textBox2.Text = read.ToString();
                    sr.Close();
    
                }
            }
    
            private void button2_Click(object sender, EventArgs e)
            {
                
            }
    
            private void button3_Click(object sender, EventArgs e)
            {
                if (Process_Handle("iw5mp"))
                {
                    var show = ReadInteger(0x05A7B1D8, 4);
                    textBox1.Text = show.ToString();
    
                    if (System****.File.Exists("currxuid.dat"))
                    {
                        StreamReader sr = new StreamReader("currxuid.dat");
                        label7.Text = sr.ReadLine();
                        sr.Close();
                    }
                }
                else
                {
                    MessageBox.Show("IW5M not found");
    
                }
            }
    
            private void button4_Click(object sender, EventArgs e)
            {
                if (Process_Handle("iw5mp"))
                {
                    WriteInteger(0x05A7B1D8, int.Parse(label7.Text));
                    button3.PerformClick();
                }
                else
                {
                    MessageBox.Show("IW5M not found");
                }
            }
    
            private void textBox3_TextChanged(object sender, EventArgs e)
            {
    
            }
    
            private void button5_Click(object sender, EventArgs e)
            {
                if (Process_Handle("iw5mp"))
                {
                  var ID =  ReadInteger(0x05CCB272, 4);
                 
    
    
                }
                else
                {
                   MessageBox.Show("IW5M not found");
                }
            }
    
            private void button6_Click(object sender, EventArgs e)
    
            {
                if (Process_Handle("iw5mp"))
                {
                    WriteInteger(0x5F9690C, 4);
    
                }
                else
                {
                    MessageBox.Show("IW5M not found");
                }
            }
    
            private void button7_Click(object sender, EventArgs e)
            {
                if (Process_Handle("iw5mp"))
                {
                    var name = ReadInteger(0x00A042D4, 4);
                    MessageBox.Show("Weapon Name :" + name.ToString());
                }
                else
                {
                    MessageBox.Show("IW5M not found");
                }
            }
    
            private void button2_Click_1(object sender, EventArgs e)
            {
                Random random = new Random();
                int num = random.Next(100000);
                textBox2.Text = Convert.ToString(num);
               
            }
    
            private void button5_Click_1(object sender, EventArgs e)
            {
                if (Process_Handle("iw5mp"))
                {
                    WriteInteger(0x00A042D4, 9844);
                }
                else
                {
                    MessageBox.Show("IW5M not Found");
                }
            }
        }
    }
    from where do i get ur code bro and i hv tried it doesn't work
    Last edited by raghavsharma301; 03-05-2013 at 11:55 PM.

  4. #4
    mwxplayer's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    hax
    Posts
    584
    Reputation
    10
    Thanks
    2,928
    My Mood
    Doh
    it's because you used iw5mp.exe instant of iw5mp.

  5. #5
    raghavsharma301's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    37
    Reputation
    10
    Thanks
    2
    My Mood
    Psychedelic
    Quote Originally Posted by mwxplayer View Post
    it's because you used iw5mp.exe instant of iw5mp.
    using system****; is invalid or i think i need to add reference but how ?

Similar Threads

  1. unable to find game in memory finder processes
    By Sceleratus in forum General Game Hacking
    Replies: 2
    Last Post: 08-24-2011, 04:18 PM
  2. msvcr100.dll unable to find?
    By gobblemonst in forum Combat Arms Help
    Replies: 3
    Last Post: 07-30-2010, 10:47 AM
  3. [Discussion] MHS- Cant find process for blackshot
    By xbsbug in forum Blackshot Hacks & Cheats
    Replies: 1
    Last Post: 09-12-2009, 06:46 AM
  4. find process by filename
    By qsc in forum C++/C Programming
    Replies: 3
    Last Post: 06-14-2009, 03:00 PM
  5. Unable to Open process (Engine.exe)
    By xTwilightD in forum Combat Arms Hacks & Cheats
    Replies: 12
    Last Post: 10-26-2008, 11:55 AM