| View previous topic :: View next topic |
| Author |
Message |
odiogalliani How do I cheat?
Reputation: 0
Joined: 18 Sep 2014 Posts: 6
|
Posted: Thu Sep 18, 2014 8:01 pm Post subject: Unable to access 64bit process with C# |
|
|
Hi all, i have a probelm.
I want to create something like a gameplay tool for Fifa15. I already found all the static adrs i need with CE.
Now i want to write a simple program in C# that read the values in a specific adrs....and change em if needed.
I tried to use some helper classes i found here...unfortunately seems like no one works with 64bit process. At the moment my tool has only few lines of code....it checks whether fifa15 demo is running or not....it tries to read a value stored in a static adrs....and, well, it should display it....but when it tries to, it crashes.
message is " A 32 bit processes cannot access modules of a 64 bit process".
I tried with AnyCPU and x64 with no luck.....
Just want to know if what i want to do is possible at the moment....and if that's the case maybe you can point me in the right direction...
Thanks in advance
|
|
| Back to top |
|
 |
Matze500 Expert Cheater
Reputation: 8
Joined: 25 Jan 2012 Posts: 241 Location: Germany
|
Posted: Fri Sep 19, 2014 6:07 am Post subject: |
|
|
Have you compiled your programm as 64 bit or 32 bit?
You have to select 64bit then it should work.
_________________
|
|
| Back to top |
|
 |
odiogalliani How do I cheat?
Reputation: 0
Joined: 18 Sep 2014 Posts: 6
|
Posted: Fri Sep 19, 2014 9:50 am Post subject: |
|
|
| Matze500 wrote: | Have you compiled your programm as 64 bit or 32 bit?
You have to select 64bit then it should work. |
Yesterday I tried 64bit and 32 bit as well.....with 32 bit i get " A 32 bit processes cannot access modules of a 64 bit process"....
with 64bit it doesn't even start debugging....
Today i compiled it in x64... and the tool starts (still can't debug it in visual studio)....but when i press the button to read the value... it throws me an error "Arithmetic Overflow".....
the class helper for the memory i'm using is this one:
matejtomcik dot com/Download/?n=CheatEngineCSharpHelpers
(sorry, can't post direct link yet)....
the relevant code:
| Code: |
Process[] processes = Process.GetProcessesByName("fifa15_demo");
if (processes.Length > 0)
{
label1.Text = "Fifa is running!";
using (Memory.Memory mem = new Memory.Memory(processes[0]))
{
IntPtr addresses = mem.GetAddress("fifa15_demo.exe", (IntPtr)0x02663C08, new int[]
{
0x280,
0x188,
0x118,
0x60
});
}
} |
|
|
| Back to top |
|
 |
Matze500 Expert Cheater
Reputation: 8
Joined: 25 Jan 2012 Posts: 241 Location: Germany
|
Posted: Fri Sep 19, 2014 10:17 am Post subject: |
|
|
I don't know but i would try this cause my function for it needs a 0 in front of the other offsets:
| Code: | Process[] processes = Process.GetProcessesByName("fifa15_demo");
if (processes.Length > 0)
{
label1.Text = "Fifa is running!";
using (Memory.Memory mem = new Memory.Memory(processes[0]))
{
IntPtr addresses = mem.GetAddress("fifa15_demo.exe", (IntPtr)0x02663C08, new int[]
{
0x0,
0x280,
0x188,
0x118,
0x60
});
}
} |
But thats not the part where you read the value. You read it with the call of:
int x = mem.ReadInt32(addresses)
_________________
|
|
| Back to top |
|
 |
odiogalliani How do I cheat?
Reputation: 0
Joined: 18 Sep 2014 Posts: 6
|
Posted: Fri Sep 19, 2014 11:09 am Post subject: |
|
|
| Matze500 wrote: | I don't know but i would try this cause my function for it needs a 0 in front of the other offsets:
But thats not the part where you read the value. You read it with the call of:
int x = mem.ReadInt32(addresses) |
yeah sorry my bad. I deleted that part (basically the same you wrote here)...because it crashes at the inptr line.....just when it tries to access the address....not read it....
When i'm using 32bit instead it crashes when it tries to read the value....
that's the error with the 64bit compiled one:
| Code: |
System.OverflowException: Overflow di un'operazione aritmetica.
in System.IntPtr.ToInt32()
in FifaHelper.Form1.button1_Click(Object sender, EventArgs e)
in System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
in System.Windows.Forms.Control.WndProc(Message& m)
in System.Windows.Forms.ButtonBase.WndProc(Message& m)
in System.Windows.Forms.Button.WndProc(Message& m)
in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Assembly caricati **************
mscorlib
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.18444 built by: FX451RTMGDR
Base di codice: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
FifaHelper
Versione assembly: 1.0.0.0
Versione Win32: 1.0.0.0
Base di codice: file:///C:/Users/andrea/Desktop/FifaHelper.exe
----------------------------------------
System.Windows.Forms
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.18408 built by: FX451RTMGREL
Base di codice: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.18408 built by: FX451RTMGREL
Base di codice: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.18408 built by: FX451RTMGREL
Base di codice: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
mscorlib.resources
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.18408 built by: FX451RTMGREL
Base di codice: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_it_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
System.Windows.Forms.resources
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.18408 built by: FX451RTMGREL
Base di codice: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_it_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
************** Debug JIT **************
Per abilitare il debug JIT, è necessario impostare il valore
jitDebugging nella sezione system.windows.forms del file di configurazione
dell'applicazione o del computer (machine.config).
L'applicazione inoltre deve essere compilata con il debug
abilitato.
Ad esempio:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
|
|
|
| Back to top |
|
 |
Matze500 Expert Cheater
Reputation: 8
Joined: 25 Jan 2012 Posts: 241 Location: Germany
|
Posted: Sat Sep 20, 2014 10:45 am Post subject: |
|
|
Ok I'll give you mine memory class when I am back home. That would be sunday evening.
Greets Matze
_________________
|
|
| Back to top |
|
 |
odiogalliani How do I cheat?
Reputation: 0
Joined: 18 Sep 2014 Posts: 6
|
Posted: Sat Sep 20, 2014 1:39 pm Post subject: |
|
|
| Matze500 wrote: | Ok I'll give you mine memory class when I am back home. That would be sunday evening.
Greets Matze |
That would be great mate.
In the meantime today i tried another memory class i found ...this one:
unknowncheats (dot) me/forum/c/104162-64-bit-processmemoryreader-class-you (dot) html#post878104
seems like could be a good one....it doesn't crash but i can't get it to work....i'm such a noob
i tried with
| Code: |
public partial class Form1 : Form
{
Int64 ClientGameContext = 0xFFFFFFFFFFF;
Int64 PosOffset = 0x02663C08;
Int64 posOffset1 = 0x280;
Int64 posOffset2 = 0x188;
Int64 posOffset3 = 0x118;
Int64 posOffset4 = 0x60;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
BlackMemory mem = new BlackMemory();
IntPtr BaseModule = mem.BaseModule;
mem.AttackProcess("fifa15_demo");
if (mem.IsOpen())
{
label1.Text = "attached";
// YES ATTACKED
Int64 ptrClientGameContext = mem.ReadInt64(ClientGameContext);
Int64 ptrClientPos = mem.ReadInt64(ptrClientGameContext + PosOffset);
Int64 ptrClientFinalPos = mem.ReadInt64(ptrClientPos + posOffset1 + posOffset2 + posOffset3 + posOffset4);
label1.Text = ptrClientFinalPos.ToString();
}
}
} |
but it always returns a value of 0. i'm sure i'm doing something wrong with the starting offset....usually i just use "whatever.exe" as a base.... here it's different...
Probably also the adding offset method it's wrong....
anyway.....waiting for your class.....and thanks!
|
|
| Back to top |
|
 |
Matze500 Expert Cheater
Reputation: 8
Joined: 25 Jan 2012 Posts: 241 Location: Germany
|
|
| Back to top |
|
 |
odiogalliani How do I cheat?
Reputation: 0
Joined: 18 Sep 2014 Posts: 6
|
Posted: Sun Sep 21, 2014 5:00 pm Post subject: |
|
|
| Matze500 wrote: | So here is it with an example how to use it hope that will work for you.
...
Greets Matze |
Thanks mate. Unfortunately it gives me an Overflow Exception just like the first class i used.
| Code: |
System.OverflowException: Overflow di un'operazione aritmetica.
in FifaHelper.Form1.button1_Click(Object sender, EventArgs e)
in System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
in System.Windows.Forms.Control.WndProc(Message& m)
in System.Windows.Forms.ButtonBase.WndProc(Message& m)
in System.Windows.Forms.Button.WndProc(Message& m)
in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
|
Don't know what to think.....probably the game itself have some sort of protection....
Anyway...i'd like to give you a +1 rep ..... i really appreciate your help. But i think i can't because of the few msgs i have.
|
|
| Back to top |
|
 |
Matze500 Expert Cheater
Reputation: 8
Joined: 25 Jan 2012 Posts: 241 Location: Germany
|
Posted: Sun Sep 21, 2014 5:42 pm Post subject: |
|
|
can you upload your code and the cheattable so that i can have a look at this?
_________________
|
|
| Back to top |
|
 |
odiogalliani How do I cheat?
Reputation: 0
Joined: 18 Sep 2014 Posts: 6
|
Posted: Sun Sep 21, 2014 8:35 pm Post subject: |
|
|
| Matze500 wrote: | | can you upload your code and the cheattable so that i can have a look at this? |
sure mate.
Code is pretty much what you gave me.....i just changed ReadProcessPointerMemory() in ReadProcessPionterMemory() because you misspelled it in the memory class....
About cheattable i included the only one i'm using right now.....it returns 1 if CPU has ball possession....0 for human.
www72 (dot) zippyshare (dot) com/v/43446600/file (dot) html
|
|
| Back to top |
|
 |
|