| View previous topic :: View next topic |
| Author |
Message |
stefanACM Newbie cheater
Reputation: 0
Joined: 01 Oct 2009 Posts: 14
|
Posted: Mon Oct 12, 2009 2:38 pm Post subject: vC# or VB for my trainer |
|
|
I again
Look guys, i want to made TRAINER for one game now. Look i am good in VB.net but but C# i beggin learning.
So, when i use cheat engine i use HEX, Aray of byte, ASROM and VALUE :
0F 00 00 00 07 00 01 00 05 00
than cheat engine find only one value for that game and i change it manualy to:
0F 00 00 00 07 00 01 00 09 00
Ok, can i do it with VB.net programing and how (any example with aray of byte), if i cant do it in VB than how to do it in C# ???
I need to auto select process, than scan for that value and when click button change it.
How pls help!!!
Thanks
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Mon Oct 12, 2009 4:56 pm Post subject: |
|
|
VB is useless outside of taking care of a legacy code base
I can't think of another way outside of just looping through the characters in the string. The convert class lets you specify the base, so you can just use base 16 as you go along.
|
|
| Back to top |
|
 |
stefanACM Newbie cheater
Reputation: 0
Joined: 01 Oct 2009 Posts: 14
|
Posted: Mon Oct 12, 2009 6:47 pm Post subject: |
|
|
| Example pls
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Mon Oct 12, 2009 7:59 pm Post subject: |
|
|
You can handle the byte array conversions like this if you're trying to mimic CE. When it's done, temp will have the bytes to entered as a string in actual byte array format. You can use it to read / write / do whatever with then.
It doesn't handle spaces though.
| Code: | byte[] temp = new byte[string.Length / 2]; //since we're working in chunks of 2 chars.
for(int i = 0; i < string.Length; i += 2)
{
temp[i / 2] = Convert.ToByte(string.Substring(i, 2), 16); //convert each chunk to hex
} |
|
|
| Back to top |
|
 |
stefanACM Newbie cheater
Reputation: 0
Joined: 01 Oct 2009 Posts: 14
|
Posted: Tue Oct 13, 2009 8:05 pm Post subject: |
|
|
Thank you very much
Can you convert it to VB.net if it can work in VB?
PS. 'string.Length' dont work in my VC# 2008
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Oct 13, 2009 8:39 pm Post subject: |
|
|
post the error.
and just use an online converter.
|
|
| Back to top |
|
 |
stefanACM Newbie cheater
Reputation: 0
Joined: 01 Oct 2009 Posts: 14
|
Posted: Tue Oct 13, 2009 8:49 pm Post subject: |
|
|
I try online converter but again in my VB not decect command string.Length
ERROR LIST:
| Code: | Error 1 An object reference is required for the non-static field, method, or property 'string.Length.get' C:\Users\stefanACM\Documents\Visual Studio 2008\Projects\WindowsFormsApplication4\WindowsFormsApplication4\Form1.cs 21 36 WindowsFormsApplication4
Error 2 An object reference is required for the non-static field, method, or property 'string.Length.get' C:\Users\stefanACM\Documents\Visual Studio 2008\Projects\WindowsFormsApplication4\WindowsFormsApplication4\Form1.cs 22 33 WindowsFormsApplication4
Error 3 An object reference is required for the non-static field, method, or property 'string.Substring(int, int)' C:\Users\stefanACM\Documents\Visual Studio 2008\Projects\WindowsFormsApplication4\WindowsFormsApplication4\Form1.cs 24 46 WindowsFormsApplication4
|
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Oct 13, 2009 10:40 pm Post subject: |
|
|
Because you just copy / pasted it without thinking, you have to get the string from somewhere
make a function:
| Code: | public static byte[] awesome_function(string s)
{
byte[] temp = new byte[s.Length / 2]; //since we're working in chunks of 2 chars.
for (int i = 0; i < s.Length; i += 2)
{
temp[i / 2] = Convert.ToByte(s.Substring(i, 2), 16); //convert each chunk to hex
}
return temp;
} |
|
|
| Back to top |
|
 |
stefanACM Newbie cheater
Reputation: 0
Joined: 01 Oct 2009 Posts: 14
|
Posted: Wed Oct 14, 2009 7:32 am Post subject: |
|
|
O great now work with VB.net
Ok, now how scan memory with this number, and how select process by window title. I never work with memory edit in VB, but i want to learn it
Thank you very much
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
|
| Back to top |
|
 |
stefanACM Newbie cheater
Reputation: 0
Joined: 01 Oct 2009 Posts: 14
|
Posted: Wed Oct 14, 2009 12:54 pm Post subject: |
|
|
I am really confused now. I can read and write to process memory..... but when i try to call function for converting array of byte dont work. Pls can you type how call that function for TextBox1 value and result to TextBox2. I am try 100 000 time but every time dont work :S
Thanks
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Wed Oct 14, 2009 1:51 pm Post subject: |
|
|
| stefanACM wrote: | I am really confused now. I can read and write to process memory..... but when i try to call function for converting array of byte dont work. Pls can you type how call that function for TextBox1 value and result to TextBox2. I am try 100 000 time but every time dont work :S
Thanks |
the BitConverter class has a method for converting a byte array to a string
|
|
| Back to top |
|
 |
stefanACM Newbie cheater
Reputation: 0
Joined: 01 Oct 2009 Posts: 14
|
Posted: Wed Oct 14, 2009 2:45 pm Post subject: |
|
|
Can you write example for Button1, textbox1,textbox2 (textbox1 with array byte convert to textbox2 for your function in VB.net )
Thanks
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Wed Oct 14, 2009 3:38 pm Post subject: |
|
|
| Code: |
byte[] text = awesome_function(textBox1.Text);
textBox2.Text = System.BitConverter.ToString(text); |
|
|
| Back to top |
|
 |
stefanACM Newbie cheater
Reputation: 0
Joined: 01 Oct 2009 Posts: 14
|
Posted: Wed Oct 14, 2009 3:53 pm Post subject: |
|
|
Thank you very much now work.
I trying with it befor i made your code ass function
|
|
| Back to top |
|
 |
|