|
You last visited: Today at 12:49
Advertisement
Perfect World Bot PWI-Prophet Bot Recoded
Discussion on Perfect World Bot PWI-Prophet Bot Recoded within the PW Hacks, Bots, Cheats, Exploits forum part of the Perfect World category.
10/12/2010, 12:26
|
#616
|
elite*gold: 0
Join Date: Apr 2008
Posts: 1
Received Thanks: 0
|
Is it work on the Malaysia Chinese Version?
|
|
|
10/12/2010, 13:13
|
#617
|
elite*gold: 0
Join Date: Oct 2009
Posts: 13
Received Thanks: 0
|
guys i need help with the offsets idk what to do and if you can help do it in english PLEASE
|
|
|
10/13/2010, 12:23
|
#618
|
elite*gold: 0
Join Date: Sep 2010
Posts: 17
Received Thanks: 0
|
anyone got the new offsets after this last update?
|
|
|
10/13/2010, 16:31
|
#619
|
elite*gold: 0
Join Date: May 2010
Posts: 281
Received Thanks: 553
|
Quote:
Originally Posted by irishsailor84
anyone got the new offsets after this last update?
|
I just checked seems all offsets are fine.
|
|
|
10/13/2010, 19:08
|
#620
|
elite*gold: 0
Join Date: Sep 2010
Posts: 17
Received Thanks: 0
|
Yup works again, had to reset my offsets, seems like every update they wipe them out somehow and i copy over the 3.1 offsets and that does it. Ty very much Prophet for keeping this up!
|
|
|
10/14/2010, 09:13
|
#621
|
elite*gold: 0
Join Date: Sep 2008
Posts: 35
Received Thanks: 0
|
Hello everyone, I am just switching from using C++ dll to inline C# code for injection code, but the client just crash al the time 
Please take a look at the code and help me
Code:
public void testInjectNormalAtk(int pID)
{
string opcode = "";
// asm
// pushad;
// mov eax, commonAtkAddress;
// call eax;
// popad;
// ret;
opcode += "60";
opcode += "B8" + "5F51A0";
opcode += "FFD0";
opcode += "61";
opcode += "C3";
byte[] baOpcode = CalcBytes(opcode);
IntPtr hProcess = openProcess(pID);
IntPtr allocatedAddress = VirtualAllocEX(hProcess, IntPtr.Zero, (IntPtr)baOpcode.Length );
bool success = WriteMemory(hProcess, intPtr2UIntPtr(allocatedAddress), baOpcode, (uint)baOpcode.Length);
IntPtr threadid = CreateRemoteThread(hProcess, allocatedAddress, IntPtr.Zero);
WaitForSingleObject(hProcess);
// clean up
CloseHandle(threadid);
VirtualAllocFree(hProcess, allocatedAddress, baOpcode.Length);
CloseHandle(hProcess);
}
Is there any thing wrong with the opcode ?
thank all ^^
|
|
|
10/14/2010, 09:28
|
#622
|
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
|
First of all, when calling virtualAllocFree, you should give 0 as length, instead of your code length. I don't know whether the addressis correct though, as I don't use this inject function, but you might want to make sure the address is 4 bytes long (pad with 00).
Also don't know about the way CalcBytes works, but why don't you put the opcode into a byteArray directly?
|
|
|
10/17/2010, 04:35
|
#623
|
elite*gold: 0
Join Date: Nov 2009
Posts: 1
Received Thanks: 0
|
does this work on private servers?? if yes please tell me if the offsets coz i tried it and hp mp doesnt work and it says targetting failed.
|
|
|
10/17/2010, 05:08
|
#624
|
elite*gold: 0
Join Date: Jan 2009
Posts: 33
Received Thanks: 4
|
The noob offset finder will provide you with most of them. Also, targeting fails if your in town when you start it, you have to be within targeting distance of a mob.
|
|
|
10/17/2010, 08:24
|
#625
|
elite*gold: 0
Join Date: Sep 2008
Posts: 35
Received Thanks: 0
|
Quote:
Originally Posted by Interest07
First of all, when calling virtualAllocFree, you should give 0 as length, instead of your code length. I don't know whether the addressis correct though, as I don't use this inject function, but you might want to make sure the address is 4 bytes long (pad with 00).
Also don't know about the way CalcBytes works, but why don't you put the opcode into a byteArray directly?
|
Thank for your advice, Interest07  . I made it works and there were 2 problems with my code.
1. the address that I added to opcode were not converted to hex
2. create byte[] in C# is a little tricky when you want to build the same structure as Autoit code
All the Alloc and thread things are fine  The reason I did not put the opcode directly to byte[] is that you need to extend your byte[] when you need to add more opcode, string is still a good choice
|
|
|
10/17/2010, 09:23
|
#626
|
elite*gold: 0
Join Date: Mar 2009
Posts: 112
Received Thanks: 123
|
Quote:
Originally Posted by SunB
... there were 2 problems with my code.
1. the address that I added to opcode were not converted to hex
|
Why would anything need to be converted?
Hex or decimal, it's just presented to you in that way, in memory it's the same value. Unless you are storing it in a string ...
Quote:
Originally Posted by SunB
2. create byte[] in C# is a little tricky when you want to build the same structure as Autoit code 
|
Why would you even bother building same structure as AutoIt code in C#?
Defeats the purpose of using C# if you are going to code with same approach as AutoIt. You are better of using AutoIt then, are you not?
Quote:
Originally Posted by SunB
...The reason I did not put the opcode directly to byte[] is that you need to extend your byte[] when you need to add more opcode, string is still a good choice 
|
Dynamic byte[] array you need to resize manually, string resizes automatically.
In both cases same thing happens, useless memory copying. Memory copying is one of the biggest resource drains you can put on a computer, so smart money is on avoiding that if and when possible.
How about static byte[] array?
Check what approximate maximum size sent packet can be and set it to that length from start.
Largest packet by far, I can think of (check player trade too, to be sure), is trading with NPC. Selling maximum amount of items (12) and buying maximum amount of items (12) at the same time.
Each item's structure is made up of 12 bytes, that brings you to 288 bytes. Adding to this preceding data in sell/buy packet, 18 bytes I think, and you've got max size = 306 bytes. Round it up to 512, just to be on the safe side if you are prone to panic and bob's your uncle.
Surely 512 bytes of memory is a better price to pay than constant load on CPU to reallocate and copy array data on every resize, which is what you have now.
Well ok, 512 + 4 bytes, you will need that to track current size of it, but still.
And don't allocate that array every time you need to sent a packet or you again gained nothing.
Do it once and reuse it when needed. Don't bother clearing it, you are overwriting bytes you use, keep separate variable for count and you only read count number of bytes. What the rest of array holds from previous uses is not important.
Be sure to clean it up however, like when terminating bot.
|
|
|
10/17/2010, 13:31
|
#627
|
elite*gold: 0
Join Date: Sep 2008
Posts: 35
Received Thanks: 0
|
Thank for your suggestion  The code above is for testing the usage of opcode because I have done it before.
using one (static or not) byte[], of course is the better solution ^ ^.
I have a question:
Whenever I want to update the UI for a character, there are about 6 attributes and the application can handle more than character, I return to view a array of string that contain all the information for it to update. Then every tick, I create a string and pass around, it's not efficient, isn't it ?
|
|
|
10/17/2010, 18:21
|
#628
|
elite*gold: 0
Join Date: Mar 2009
Posts: 112
Received Thanks: 123
|
Quote:
Originally Posted by SunB
...I have a question:
Whenever I want to update the UI for a character, there are about 6 attributes and the application can handle more than character, I return to view a array of string that contain all the information for it to update. Then every tick, I create a string and pass around, it's not efficient, isn't it ?
|
I don't understand most of what you are trying to ask here.
Passing strings to, some function I think you are asking, is no less efficient than passing any other variable type. In the end, it's only pointers that get sent anyhow.
Where it does matter, is if you are changing passed string inside a function, since then a copy of it needs to be created and that means allocation again.
That's Delphi anyhow, I've no experience in C#, but I imagine it's not that different.
In general, passing string as a parameter and/or using strings as return value is not the best approach. This becomes even more apparent if you use it often, like you stated "Then every tick, I create a string and pass around".
If it's not the string you want, meaning you are only using it as a transport mechanizem for other types of data, then you should take a look at structures.
|
|
|
10/18/2010, 06:40
|
#629
|
elite*gold: 0
Join Date: Sep 2008
Posts: 35
Received Thanks: 0
|
Yep, your right, I just want to use them as a transport mechanizem. I should check it again. Thank you ^ ^
|
|
|
10/18/2010, 07:33
|
#630
|
elite*gold: 0
Join Date: Mar 2008
Posts: 109
Received Thanks: 64
|
Any reason why you are switching from DLL to CreateRemoteThread? The function is not cheap ya know. You are wasting a lot of CPU cycles everytime you call it (along with its helper functions VirtualAlloc, WriteProcessMemory, etc)
Avoid static byte[] arrays if you are making a multi-threaded bot (ie: support many game clients at the same time).
The preferred way to build your byte[] structure is to use MemoryStream as follow:
MemoryStream stream = new MemoryStream();
stream.WriteByte(byte); // or stream.Write(byte[] ...)
...
byte[] data = stream.ToArray();
It is a lot simpler and more efficient to use DLL + IPC with C# than your current approach.
|
|
|
All times are GMT +1. The time now is 12:50.
|
|