Register for your free account! | Forgot your password?

You last visited: Today at 03:43

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Sending Packets

Discussion on Sending Packets within the PW Hacks, Bots, Cheats, Exploits forum part of the Perfect World category.

Reply
 
Old 11/09/2010, 18:57   #91
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
C# code I use for packet sending as follows

PacketSender class:

use as follows:
PHP Code:
//open process
IntPtr pr_processHandle MemFunctions.OpenProcess(pid);
//create new packetSender class for this process
PacketSender sendPacket = new PacketSender(pr_processHandle);

//send packet for toggling flymode for example:
sendPacket.useItem(10xCplayer.values.flyMountId); 
Memfunctions class:

Interest07 is offline  
Thanks
11 Users
Old 11/09/2010, 19:07   #92
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
The packet sender class will store a packet in the process's memory when used for the first time, then at subsequent uses of a specific packet it will just writeMemory the new values into the packet at the correct positions.

The MemFunctions class contains some frequently used memory related functions (and DLL imports) which are used in the PacketSender class (and of course other classes i use :P).

The only addresses used frm the PWI_Offsets class are the base address and sendpacket function address, so you can just insert those as you see fit (for example pass to the class in the constructor).

The comments above the packets in the code aren't as detailed as in the autoIt code, so use that as a reference. Also in the end it says Regular Attack everywhere as I couldn't be bothered to update it anymore , what the packets do should be obvious from their names though hehe.

I personally use a PWprocess class that contains lists of all mobs / npcs / items / players and a packetsender, which would contain a closeHandle function call in the destructor and an openProcess function call in the constructor as in the packet sending example.


Standard disclaimer for my code:
Everything is probably functional and most likely not optimal in the efficiency department. Use at your own risk also :P
Interest07 is offline  
Thanks
2 Users
Old 11/10/2010, 06:23   #93
 
elite*gold: 0
Join Date: Feb 2009
Posts: 71
Received Thanks: 2
Wow, sweet stuff Interest. Started building my SendPacket function today in C++. Not even sure it'd work but I'll start testing soon. I'll have a closer look at your C# classes and try to convert them to C++, althought I have to say I'm more of a beginner/intermediate c++ coder so far. But thank you. I'll keep you posted on my progress.
sweetlady is offline  
Old 11/10/2010, 08:44   #94
 
silkytail's Avatar
 
elite*gold: 0
Join Date: Jun 2008
Posts: 142
Received Thanks: 13
copypasted comments are funny
silkytail is offline  
Old 11/10/2010, 09:56   #95
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
Quote:
Originally Posted by sweetlady View Post
Wow, sweet stuff Interest. Started building my SendPacket function today in C++. Not even sure it'd work but I'll start testing soon. I'll have a closer look at your C# classes and try to convert them to C++, althought I have to say I'm more of a beginner/intermediate c++ coder so far. But thank you. I'll keep you posted on my progress.
Hope it'll help you with that. It's been a long long time since I coded in C++, so I'm not sure if I can help you on that, but feel free to ask any questions

Quote:
Originally Posted by silkytail View Post
copypasted comments are funny
lol yeah they are



edit: fixed the header for one of the split stacks (should be 3C not 3B, as the previous entry was already 3B)

also, 3E0049 = flip while jumping
3E0048 = flip while running
Interest07 is offline  
Thanks
1 User
Old 11/11/2010, 07:09   #96
 
AEBus's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 106
Received Thanks: 52
Interest07, can you give any example of injection asm produce in c#?
AEBus is offline  
Old 11/11/2010, 08:58   #97
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
The C# code on sending packets has inject code in it. I basically just throw the opcode i want to inject into a byte array, write that to the game's memory and run it. This is the part of the code above that handles the inject function. You pass the address of where the packet is loaded into the game's memory to the function with it's size. The sendpacket function then checks if it has already loaded the opcode into memory. If it hasn't it does so, else it writes the new packetAddress to the correct position and runs the opcode.

It will then remove the opcode again in the destructor of the class (so when you're done botting :P)

Code:
        private int sendPacketOpcodeAddress;
        private int packetAddressLocation;
        private int packetSizeAddress;

        //opcode for sending a packet
        private byte[] sendPacketOpcode = new byte[] 
        { 
            0x60,                                   //PUSHAD
            0xB8, 0x00, 0x00, 0x00, 0x00,           //MOV EAX, SendPacketAddress
            0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00,     //MOV ECX, DWORD PTR [realBaseAddress]
            0x8B, 0x49, 0x20,                       //MOV ECX, DWORD PTR [ECX+20]
            0xBF, 0x00, 0x00, 0x00, 0x00,           //MOV EDI, packetAddress
            0x6A, 0x00,                             //PUSH packetSize
            0x57,                                   //PUSH EDI
            0xFF, 0xD0,                             //CALL EAX
            0x61,                                   //POPAD
            0xC3                                    //RET
        };


        private void loadSendPacketOpcode()
        {
            //Allocate memory for the opcode to call the sendPacket function
            sendPacketOpcodeAddress = MemFunctions.AllocateMemory(pr_processHandle, sendPacketOpcode.Length);

            //Write the opcode to memory
            MemFunctions.MemWriteBytes(pr_processHandle, sendPacketOpcodeAddress, sendPacketOpcode);

            //Insert the reverse baseAddress and sendPacketFunctionAddress in opcode
            byte[] functionAddress = BitConverter.GetBytes(SEND_PACKET_ADDRESS);
            functionAddress.Reverse();
            byte[] realBaseAddress = BitConverter.GetBytes(REAL_BASE_ADDRESS);
            realBaseAddress.Reverse();
            MemFunctions.MemWriteBytes(pr_processHandle, sendPacketOpcodeAddress + 2, functionAddress);
            MemFunctions.MemWriteBytes(pr_processHandle, sendPacketOpcodeAddress + 8, realBaseAddress);
            packetAddressLocation = sendPacketOpcodeAddress + 16;
            packetSizeAddress = sendPacketOpcodeAddress + 21;
        }

        public void sendPacket(byte[] packetLocation, int packetSize)
        {
            if (sendPacketOpcodeAddress == 0)
            {
                loadSendPacketOpcode();
            }

            MemFunctions.MemWriteBytes(pr_processHandle, packetAddressLocation, packetLocation);
            MemFunctions.MemWriteByte(pr_processHandle, packetSizeAddress, (byte)packetSize);

            //Run the opcode
            IntPtr threadHandle = MemFunctions.CreateRemoteThread(pr_processHandle, sendPacketOpcodeAddress);

            //Wait for opcode to be done
            MemFunctions.WaitForSingleObject(threadHandle);

            //Close the thread
            MemFunctions.CloseProcess(threadHandle);

        }
Interest07 is offline  
Old 11/11/2010, 09:45   #98
 
AEBus's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 106
Received Thanks: 52
For example I need inject installation
and removal of certain navigation point
coordinates in the game, it can be
implemented through the send packets
function? and tell me how to do is
inject this?
AEBus is offline  
Old 11/11/2010, 10:07   #99
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
As far as I know the navigation points are pure client based, so no, not with packets. I was simply giving an example on how to inject a function/asm.

Why would you want to insert navigation points though?
Interest07 is offline  
Old 11/11/2010, 10:37   #100
 
AEBus's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 106
Received Thanks: 52
I want to make a kind of GPS navigator in the game, that at a certain point, this point was removed and was put out a new list of coordinates driven into a
text file
AEBus is offline  
Old 11/14/2010, 03:40   #101
 
elite*gold: 0
Join Date: Nov 2010
Posts: 8
Received Thanks: 0
Can you show complete the source code send packet gold in PW indo plese
khansa is offline  
Old 11/14/2010, 03:45   #102
 
elite*gold: 0
Join Date: Nov 2010
Posts: 8
Received Thanks: 0
Post Plesss help me

Quote:
Originally Posted by Smurfin View Post
tks, done changing and now it works, tried using it to drop 1 gold per x millisecond and it leaves gold trails when walk

is SkillId the same for every server ? do you have the list for cleric ?
Can you show complete the source code send packet gold in server PW indo? ( in autoit)
khansa is offline  
Old 11/14/2010, 08:40   #103
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
Look at the first post of this thread, it shows you exactly how to drop gold.
Interest07 is offline  
Old 11/15/2010, 04:55   #104
 
elite*gold: 0
Join Date: Nov 2010
Posts: 8
Received Thanks: 0
>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "D:\My Documents\Downloads\Compressed\Test\test1.au3"
D:\My Documents\Downloads\Compressed\Test\test1.au3 (8) : ==> Error opening the file.:
#include <NomadMemory.au3>

>Exit code: 1 Time: 0.225

what wrong in this program???????????
khansa is offline  
Old 11/15/2010, 08:48   #105
 
Interest07's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 576
you are missing the nomadMemory file in your autoIt Include folder.

I'll attach it for you (not sure if it's the most up to date one though, but it seems to work)
Attached Files
File Type: rar NomadMemory.rar (2.7 KB, 75 views)
Interest07 is offline  
Reply


Similar Threads Similar Threads
Help with sending packets in autoit
08/16/2010 - AutoIt - 1 Replies
ive been lookin around different sites for ways to send packets to the game server. the only examples i see is to create a server and a client which i dont need, i think. well to the point now, can someone lead me in a direction or tell me how to send packets to a game? also if i send packets then that means i dont need the game to be active, correct? Because in autoit when u use keys u need to have the game active, and control send does not work. ty
Sending Packets !!!
09/07/2008 - Kal Online - 14 Replies
now i know how to sniff / analyse packets ... but what then ? :) how can i send packets ?? to pimp or mix weapon for example i just need the way to send , and then i can depend on myself :D
Sending Packets (need advice)
03/20/2008 - Conquer Online 2 - 7 Replies
OK well im finaly trying to stop leaching off of everybodys work its been great n all download n play :D But im tired of being a begger n the past couple months ive been learning as much as i can about macros memery add blah blah you know ... After playing around with ce and ahk the past couple months i stumbled across wpe pro, theres not alot of tuturals and its hard to find good help. Well heres what ive been doing so far, open my CO then i attach it to my sniffer. I change my...
Scamming by sending packets???
04/15/2006 - Conquer Online 2 - 1 Replies
Well my friend and i came up with the idea to send packets to the server to show a certain item in the trade window. We want to use this as a type of scam. I didnt see this in any other threads and was wondering if anyone knew if this is possible and if they could point use in the right direction. My friend was pretty good with packets in CO 1.0 but we arent really sure to go about doing it. If anyone one could please lend a helping hand? P.S.- Before I get flamed for this because i know i...
Sending packets
10/12/2005 - Conquer Online 2 - 10 Replies
I've a question. Is it possible to send 1 packet multiple times at the exact same time?



All times are GMT +1. The time now is 03:44.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.