Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Nostale
You last visited: Today at 17:16

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

Advertisement



Packet Senden crash?

Discussion on Packet Senden crash? within the Nostale forum part of the MMORPGs category.

Reply
 
Old 02/21/2016, 19:22   #16
 
forsatus's Avatar
 
elite*gold: 0
Join Date: Jul 2013
Posts: 479
Received Thanks: 234
Quote:
Originally Posted by WalrossGreat View Post
@forsatus
Why he should take care about this? Since he set the char* i don't see any profits from know the char size

@blackout617
Please post fully code on pastebin, with the DLLMain and the CreateThread if you can.

EDIT:
@forsatus
It's not about this, there isn't only one function that you have to call if you want send packet.
sorry i forgot to post the second part, so, full code :

Code:
DWORD sendpacketfunc = 0x052BC0C

void Send(CHAR* packet)
{
	DWORD _i32_SendPacketFunc = 0x0052BBC0;

	__asm
	{
		MOV EAX, DWORD PTR DS : [0x0068120C]
		MOV EAX, DWORD PTR DS : [EAX]
		MOV EDX, packet
		CALL sendpacketfunc
	}
}

class NostaleString
{
	private:
		CHAR* _i8_string;
		DWORD _i32_length;

	public:
		NostaleString(CHAR* _i8_string)
		{
			this->_i32_length = strlen(_i8_string);

			this->_i8_string = (CHAR*)malloc(this->_i32_length + 8 + 1);

			*(DWORD*)(this->_i8_string + 0x00) = 1;
			*(DWORD*)(this->_i8_string + 0x04) = this->_i32_length;

			memcpy(this->_i8_string + 0x08, _i8_string, this->_i32_length);

			*(this->_i8_string + this->_i32_length + 8) = '\0';
		}

		CHAR* get()
		{
			return this->_i8_string + 0x08;
		}

		DWORD length()
		{
			return this->_i32_length;
		}
};

char packettosend[50] = "say hello";
NostaleString str = packettosend;

Send(str.get());
and it work.
forsatus is offline  
Thanks
1 User
Old 02/21/2016, 19:42   #17
 
blackout617's Avatar
 
elite*gold: 68
Join Date: Feb 2011
Posts: 401
Received Thanks: 96
Quote:
Originally Posted by forsatus View Post
sorry i forgot to post the second part, so, full code :

Code:
DWORD sendpacketfunc = 0x052BC0C

void Send(CHAR* packet)
{
	DWORD _i32_SendPacketFunc = 0x0052BBC0;

	__asm
	{
		MOV EAX, DWORD PTR DS : [0x0068120C]
		MOV EAX, DWORD PTR DS : [EAX]
		MOV EDX, packet
		CALL sendpacketfunc
	}
}

class NostaleString
{
	private:
		CHAR* _i8_string;
		DWORD _i32_length;

	public:
		NostaleString(CHAR* _i8_string)
		{
			this->_i32_length = strlen(_i8_string);

			this->_i8_string = (CHAR*)malloc(this->_i32_length + 8 + 1);

			*(DWORD*)(this->_i8_string + 0x00) = 1;
			*(DWORD*)(this->_i8_string + 0x04) = this->_i32_length;

			memcpy(this->_i8_string + 0x08, _i8_string, this->_i32_length);

			*(this->_i8_string + this->_i32_length + 8) = '\0';
		}

		CHAR* get()
		{
			return this->_i8_string + 0x08;
		}

		DWORD length()
		{
			return this->_i32_length;
		}
};

char packettosend[50] = "say hello";
NostaleString str = packettosend;

Send(str.get());
and it work.
Yeah thanks this works now with 0x0052BBC0, but i dont understand why the other method not worked to terminate the string correctly, and i dont understand much from that class that you have posted i think its creating a char* and putting 1 and then the length and then the packet strin. Its a bit confusing and i think it will be like a little weird using a class that i dont understand what it exactly does but ok for now it works thanks
Should i put any credits ?
blackout617 is offline  
Old 02/21/2016, 19:49   #18
 
forsatus's Avatar
 
elite*gold: 0
Join Date: Jul 2013
Posts: 479
Received Thanks: 234
Quote:
Originally Posted by blackout617 View Post
Should i put any credits ?
i'm happy for you, the send function is from me, and the NostaleString is from OMG
(you can use thanks button )
forsatus is offline  
Old 02/21/2016, 20:43   #19
 
WalrossGreat's Avatar
 
elite*gold: 0
Join Date: Mar 2015
Posts: 871
Received Thanks: 1,229
You can write your own simple class that using only memcpy and terminate the string with '/0', for me it works.
WalrossGreat is offline  
Reply


Similar Threads Similar Threads
Packet senden[ASM / C++]
02/21/2015 - Nostale - 8 Replies
0061E918 8B4D F8 MOV ECX,DWORD PTR SS: 0061E91B A1 30016700 MOV EAX,DWORD PTR DS: 0061E920 8B00 MOV EAX,DWORD PTR DS: 0061E922 BA 7CE96100 MOV EDX,multicli.0061E97C ; ASCII "walk" 0061E927 E8 648AF0FF CALL multicli.00527390 void SendPacket(DWORD Calladr,char *packet) { DWORD adPtr = 0x670130; printf("Ich werde es versuchen: %s das packet zu senden.\n", packet);
Packet mit AutoIt senden!?
07/22/2013 - Nostale - 11 Replies
Hallo, folgendes: ich würde gerne ein Packet an NosTale senden (in AutoIt ohne den Packetlogger), bspw. dieses: mg 3 2 3126 20150 20150 Wie stelle ich das dann an? Muss ich das Packet an den NosTale Server schicken (ich weiß nicht wo das Packet hingesendet werden muss, ob Server oder Client??) und wenn ja, wie mache ich das richtig? Als Ansatz würde mir nur folgendes einfallen: $packet= "mg 3 2 3126 20150 20150" $g_IP = "127.0.0.1" ; kA was sonst
Autoit 1 Packet Senden ?
06/09/2013 - AutoIt - 5 Replies
Hallo ich habe wieder eine kleine frage bei packets und so bin ich nicht sehr gut :) Ich habe wincap instaliert,,und jetzt ich habe mit wpe ein packet das ich senden möchte gefunden das packet ist: "57 49 4e 7c 31 38 38 38" in decoded text ist das =" WIN|1888" Und Ich will bei auto it es simple machen es soll in Process name.exe dieses packet immer wider senden und der socket endert sich immer wider also beim jedem relog endert er sich ,kan mir jemand helfen ? :) While 1 .... WEnd
WPE Packet senden
06/30/2011 - General Coding - 2 Replies
hey, bin mir nicht ganz sicher wohin damit, deswegen kommt es einfach mal nach Gamehacking... ich wollte mal die Packetsenden-Funktion von WPE Pro testen. Leider kann ich keine Verbindung aufbauen, bekomme immer das hier: http://img848.imageshack.us/img848/3057/180620112 .png hoffe, dass mir jmd helfen kann... ging bei dem Versuch um das liken bei einem YT-Video
[C++] TCP Packet senden
05/28/2011 - C/C++ - 1 Replies
Kann mit jemand erklären, wie ich in C++ TCP Packets senden kann? Ich will damit einfach nur meine FritzBox zum reconnecten bringen...



All times are GMT +1. The time now is 17:20.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.