Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Nostale
You last visited: Today at 09:01

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

Advertisement



[Problem] Simple sending packets

Discussion on [Problem] Simple sending packets within the Nostale forum part of the MMORPGs category.

Reply
 
Old   #1
 
WalrossGreat's Avatar
 
elite*gold: 0
Join Date: Mar 2015
Posts: 871
Received Thanks: 1,229
[Problem] Simple sending packets

Hi I'm having problem with simple packet sender
That's the "walk call"
Code:
00625D83   A1 C0816700      MOV EAX,DWORD PTR DS:[6781C0]
00625D88   8B00             MOV EAX,DWORD PTR DS:[EAX]
00625D8A   BA E45D6200      MOV EDX,nostalex.00625DE4                ; ASCII "walk"
00625D8F   E8 2C50F0FF      CALL nostalex.0052ADC0
So i tried implement it to code and i got some errors (tried with char and wchar_t)

There are the errors:



Full code:
Code:
#include <windows.h>
#include <iostream>
#include <stdio.h>

class PacketString 
{
public:
	char char_t[256];
	PacketString(char* str)
	{
		char* str2 = str;
		int len = strlen(str2);
		memcpy(char_t, str2, len);
		char_t[len] = 0x0;
	}

	char* _return()
	{
		return char_t;
	}
};

void SendPacket(char* packet)
{
	DWORD adress = 0x0052ADC0;
	__asm
	{
			MOV EAX, DWORD PTR DS : [0x6781C0]
			MOV EAX, DWORD PTR DS : [EAX]
			MOV EDX, packet
			CALL adress
	}
}

void Start()
{
	PacketString example("c_info");

	SendPacket(example._return());
}

BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
{
	switch (dwReason) {
	case DLL_PROCESS_ATTACH:
		DisableThreadLibraryCalls(hModule);
		CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Start, 0, 0, 0);
		break;
	}
	return TRUE;
}
Maybe it's simple question but what's wrong here? I probably do something bad with pointer but actually I don't know what
Thanks for help.
WalrossGreat is offline  
Old 07/26/2015, 23:28   #2

 
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
Probier das mal so:

Code:
#include <windows.h>
#include <iostream>
#include <stdio.h>

class PacketString 
{
public:
	char char_t[256];
	PacketString(char* str)
	{
		char* str2 = str;
		int len = strlen(str2);
		memcpy(char_t, str2, len);
		char_t[len] = 0x0;
	}

	char* _return()
	{
		return char_t;
	}
};

void SendPacket(char* packet)
{
	DWORD adress = 0x0052ADC0;
	__asm
	{
			MOV EAX, DWORD PTR DS : [0x6781C0]
			MOV EAX, DWORD PTR DS : [EAX]
                        MOV EAX, DWORD PTR DS : [EAX]
			MOV EDX, packet
			CALL adress
	}
}

void Start()
{
	PacketString example("c_info");

	SendPacket(example._return());
}

BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
{
	switch (dwReason) {
	case DLL_PROCESS_ATTACH:
		DisableThreadLibraryCalls(hModule);
		CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Start, 0, 0, 0);
		break;
	case DLL_PROCESS_DETACH:
		break;
	case DLL_THREAD_ATTACH:
		break;
	case DLL_THREAD_DETACH:
		break;
	}
	return TRUE;
}
So viel ich weiß musst du nochmals den Wert auslesen von EAX.
(Also 2x MOV EAX, DWORD PTR DS : [EAX])
BladeTiger12 is offline  
Thanks
1 User
Old 07/26/2015, 23:35   #3
 
WalrossGreat's Avatar
 
elite*gold: 0
Join Date: Mar 2015
Posts: 871
Received Thanks: 1,229
@BladeTiger12
Thanks for answer, anyway it's still crash NosTale (now without errors).

Anyway i saw some source and in a few of them were 2x MOV EAX, DWORD PTR DS : [EAX]
instead of 1x, but i still don't know why. In the "walk call" it's called only one time. :/
WalrossGreat is offline  
Old 07/26/2015, 23:56   #4

 
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
Try release mode.

Edit:
You got the wrong call. Here: 0x0052AD74
Impossible that 0x0052ADC0 is the call, because in walk function will is edx just "walk".(No params)
BladeTiger12 is offline  
Thanks
1 User
Old 07/27/2015, 00:32   #5
 
WalrossGreat's Avatar
 
elite*gold: 0
Join Date: Mar 2015
Posts: 871
Received Thanks: 1,229
@BladeTiger12
Thanks, i will try it.
Anyway from what you got this 0x0052AD74?
WalrossGreat is offline  
Old 07/27/2015, 00:43   #6

 
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
Check out other packets. (e.g: In say packet)
Or reverse walk function.
Then you will find this address.
BladeTiger12 is offline  
Thanks
1 User
Old 07/27/2015, 01:00   #7
 
WalrossGreat's Avatar
 
elite*gold: 0
Join Date: Mar 2015
Posts: 871
Received Thanks: 1,229
You are talking about this say or something others?

Code:
0052E815   8B06             MOV EAX,DWORD PTR DS:[ESI]
0052E817   50               PUSH EAX
0052E818   68 F0126100      PUSH nostalex.006112F0
0052E81D   BA 7CFC5200      MOV EDX,nostalex.0052FC7C                ; ASCII "say"
0052E822   8BC3             MOV EAX,EBX
0052E824   E8 EB73FFFF      CALL nostalex.00525C14
Anyway I should reserve it more too, shouldn't I? (Because there aren't the 0x0052AD74)
WalrossGreat is offline  
Old 07/27/2015, 01:07   #8

 
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
Yep you should more reverse.
I think you're on the wrong place.
Address is: 0x626F85.

It gives say as receive packet and as send packet.
BladeTiger12 is offline  
Thanks
1 User
Old 07/27/2015, 01:16   #9
 
WalrossGreat's Avatar
 
elite*gold: 0
Join Date: Mar 2015
Posts: 871
Received Thanks: 1,229
@BladeTiger12
Ok, thank you, I got this place but it still crash NosTale and I don't know why. :/
Yes, i tried bulid it in relase mode, same result. I probably did something wrong with constructor of PacketString but i don't see any errors :/

(Actually it bulid and inject without errors but still crash)
WalrossGreat is offline  
Old 07/27/2015, 01:25   #10

 
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
Can I see currently code?
BladeTiger12 is offline  
Thanks
1 User
Old 07/27/2015, 01:36   #11
 
WalrossGreat's Avatar
 
elite*gold: 0
Join Date: Mar 2015
Posts: 871
Received Thanks: 1,229
Ofc.
Code:
#include <windows.h>
#include <iostream>
#include <stdio.h>

class PacketString 
{
public:
	char char_t[256];
	PacketString(char* str)
	{
		char* str2 = str;
		int len = strlen(str2);
		memcpy(char_t, str2, len);
		char_t[len] = 0x0;
	}

	char* _return()
	{
		return char_t;
	}
};

void SendPacket(char* packet)
{
	DWORD adress = 0x0052AD74;
	__asm
	{
			MOV EAX, DWORD PTR DS : [0x6781C0]
			MOV EAX, DWORD PTR DS : [EAX]
			MOV EAX, DWORD PTR DS : [EAX]
			MOV EDX, packet
			CALL adress
	}
}

void Start()
{
	PacketString example("c_info");

	SendPacket(example._return());
}

BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
{
	switch (dwReason) {
	case DLL_PROCESS_ATTACH:
		DisableThreadLibraryCalls(hModule);
		CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Start, 0, 0, 0);
		break;
                //specially for you

	}
	return TRUE;
}
WalrossGreat is offline  
Old 07/27/2015, 01:55   #12
 
elite*gold: 0
Join Date: Aug 2013
Posts: 127
Received Thanks: 46
Delete one MOV EAX, DWORD PTR DS : [EAX] :v

If you use variable write 2x MOV EAX, DWORD PTR DS : [EAX] if not write one.
iArtrix is offline  
Thanks
2 Users
Old 07/27/2015, 02:02   #13

 
elite*gold: 64
Join Date: May 2011
Posts: 1,229
Received Thanks: 854
Don't work.
Hmm... I dunno why, that's strange.

Edit: It crashes if you call ASM Code in seperate Thread(CreateThread).
BladeTiger12 is offline  
Thanks
1 User
Old 07/27/2015, 12:53   #14
 
elite*gold: 0
Join Date: Feb 2012
Posts: 28
Received Thanks: 9
1. Your send function is ok.
2. Use patterns
Code:
addrPtr = Memory::Scan("\xDC\x2F\x80\x00\x68\x69\x52", "xxxxxxx", 0x400000, 0x443000);
addrSend = Memory::Scan("\x53\x56\x8B\xF2\x8B\xD8\xEB\x04", "xxxxxxxx", 0x400000, 0x442000);
3. Try to use NTString -
k4r3r is offline  
Thanks
2 Users
Old 07/27/2015, 13:00   #15
 
Bejine's Avatar
 
elite*gold: 0
Join Date: Jul 2014
Posts: 283
Received Thanks: 317
As iArtrix said, if you don't have variable there:
Code:
MOV EAX, DWORD PTR DS : [0x6781C0]
then you write this once:
Code:
MOV EAX, DWORD PTR DS : [EAX]
If you've got variable, write it twice.
Your adresses are OK.
Bejine is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
sending packets problem
10/07/2014 - SRO Coding Corner - 0 Replies
#fixed done #request to remove thread or close it
Help sending packets
06/27/2012 - SRO Coding Corner - 2 Replies
well i knew that i need to put the packet in a byte array so i defined it BYTE pack = { 0x01, 0x00, 0x4F, 0x70, 0x20, 0x00, 0x04 }; and when i send it using the send through a socket like this
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
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 +2. The time now is 09:01.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

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