Can MQ pull decode keys for Showeq?

A forum for the general posts relating to MacroQuest. *DEPRECATED: This forum is no longer in public use, but remains here for your reading pleasure. Enjoy

Moderator: MacroQuest Developers

AlphaBeta
a ghoul
a ghoul
Posts: 126
Joined: Sat Nov 09, 2002 12:35 am

Can MQ pull decode keys for Showeq?

Post by AlphaBeta » Thu Nov 14, 2002 10:30 am

Not being a programer and with the nurfing of Showeq I was wondering if MQ would pull keys for how ShowEQ is now set up for manual key entry :?:

If so could someone PM me with the info?

Thanks

-AlphaBeta

morannon
a lesser mummy
a lesser mummy
Posts: 57
Joined: Sun Nov 03, 2002 3:50 pm

Post by morannon » Thu Nov 14, 2002 10:57 am

This is something im working on, but Im having trouble inplementing a new /command - ive posted in the dev forum for help -- will post a patch or something when its working =)

Macromancer
orc pawn
orc pawn
Posts: 11
Joined: Thu Oct 31, 2002 8:34 pm

Just use one..

Post by Macromancer » Thu Nov 14, 2002 1:26 pm

of the many ShowEQ keysniffers in the forums.

morannon
a lesser mummy
a lesser mummy
Posts: 57
Joined: Sun Nov 03, 2002 3:50 pm

Post by morannon » Thu Nov 14, 2002 2:08 pm

Ive not yet managed to run an EQ sniffer AND MQ at the same time, so the functionality needs to be incorporated as far as im concerned.

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Fri Nov 15, 2002 5:26 am

can it be done? yes.
will it ever be included in a public release of mq? no.

seq and mq are different projects ; mq is already too easy to use and wed rather not bring more attention to us by quickly becoming a simple and easy to use key grabber too..
#macroquest op
Macroquest Official Documentarion
Macroquest Board Moderator
All around cool guy

[img]http://medicomuerte.users.btopenworld.com/images/fairy_bounce08.gif[/img]

AlphaBeta
a ghoul
a ghoul
Posts: 126
Joined: Sat Nov 09, 2002 12:35 am

Post by AlphaBeta » Fri Nov 15, 2002 11:48 am

ok who is going to teach me how to code then? :twisted:

Lead me and I shall follow.

-AlphaBeta

Wishbringer
Contributing Member
Contributing Member
Posts: 230
Joined: Thu Nov 14, 2002 7:00 am

Post by Wishbringer » Sat Nov 16, 2002 5:55 pm

Simple code a Pearl script that starts sniffer.

For example start it as an event "you have entered...."

morannon
a lesser mummy
a lesser mummy
Posts: 57
Joined: Sun Nov 03, 2002 3:50 pm

Post by morannon » Sat Nov 16, 2002 10:19 pm

Given it wont be incorporated into a public release of MQ, would it be OK to post here a diff of the EQLib.cpp file that achieves this ?

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Sun Nov 17, 2002 12:14 am

post here? I'd say no... sending a private message with it? perhaps.

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Sun Nov 17, 2002 4:45 am

To my current thinking... go ahead and post it.

a) I want to verify it before you distribute it
b) I dont want people that cant compile it to use it, but if you can manage to insert in the code and compile it, why not.

However, NO executables.

I reserve the right to change my mind :)
rk
#macroquest op
Macroquest Official Documentarion
Macroquest Board Moderator
All around cool guy

[img]http://medicomuerte.users.btopenworld.com/images/fairy_bounce08.gif[/img]

morannon
a lesser mummy
a lesser mummy
Posts: 57
Joined: Sun Nov 03, 2002 3:50 pm

Post by morannon » Sun Nov 17, 2002 7:31 am

Add the following to EQLib.h

Code: Select all

DWORD DECODE_KEY_ADDR=0;
char SHOWEQ_HOST[MAX_STRING];
DWORD SHOWEQ_PORT;
Add the following to MQ.h

Code: Select all

extern "C" EQLIB_API VOID  ShowEQ         (PSPAWNINFO, PCHAR);
And in EQLib.cpp

Add the following to CommandsReplaced[] in DetermineWhoFirst()

Code: Select all

		{ "/showeq",	CMD_MQ },
Add the following to szNewCommands[] in TakeControlOfCommandList()

Code: Select all

		{"/showeq",		"ShowEQ"},
Add the following to ParseINIFile()

Code: Select all

    GetPrivateProfileString("ShowEQ","ShowEQKey","0",szBuffer,MAX_STRING,ClientINI);
	DECODE_KEY_ADDR = (DWORD)strtoul(szBuffer,NULL,16);

	GetPrivateProfileString("ShowEQ","Host","0",szBuffer,MAX_STRING,ClientINI);
	strncpy(SHOWEQ_HOST, szBuffer, MAX_STRING);

	GetPrivateProfileString("ShowEQ","Port","0",szBuffer,MAX_STRING,ClientINI);
	SHOWEQ_PORT = atoi(szBuffer);
And then add the following somewhere:

Code: Select all

VOID ShowEQ(PSPAWNINFO pChar, PCHAR szLine)
{

	typedef struct {
		unsigned long p1;
		unsigned long p2;
	} KEYCODE;

	SOCKET s;
	SOCKADDR_IN seq;
	int n;

	CHAR keybuffer[MAX_STRING] = {0};

	KEYCODE *decodedkey = (KEYCODE *)DECODE_KEY_ADDR;

	sprintf(keybuffer, "Decode key at 0x%08x -- %08X%08X", DECODE_KEY_ADDR, decodedkey->p2, decodedkey->p1);
	WriteChatBuffer(keybuffer, USERCOLOR_DEFAULT);
	
	sprintf(keybuffer,"Host : %s, Port: %d", SHOWEQ_HOST, SHOWEQ_PORT);	
	WriteChatBuffer(keybuffer, USERCOLOR_DEFAULT);
	
	s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
	if (s == SOCKET_ERROR) {
		WriteChatBuffer("[MacroQuest] ShowEQ decode unable to open socket", USERCOLOR_DEFAULT);
		return;
	}
	seq.sin_family = AF_INET;
	seq.sin_port = htons((short)SHOWEQ_PORT);
	seq.sin_addr.s_addr = inet_addr(SHOWEQ_HOST);
	n = sendto(s, (char *)decodedkey, sizeof(KEYCODE), 0, (SOCKADDR *)&seq, sizeof(seq));
	if (n == SOCKET_ERROR) {
		WriteChatBuffer("[MacroQuest] ShowEQ decode unable to send decode key", USERCOLOR_DEFAULT);
		return;
	}
	closesocket(s);
	return;

}

Finally, edit the eqgame.ini, and add the following section - editing as needed

Code: Select all

[ShowEQ]
ShowEQKey=00773b90
Host=1.2.3.4
Port=12345
Then, in game just do a /showeq and watch as your SEQ client decodes.
Last edited by morannon on Mon Nov 18, 2002 6:32 am, edited 1 time in total.

Ariain
a ghoul
a ghoul
Posts: 88
Joined: Fri Oct 11, 2002 10:35 am

Post by Ariain » Mon Nov 18, 2002 12:36 am

Wow

lullimarka
orc pawn
orc pawn
Posts: 21
Joined: Mon Nov 18, 2002 8:48 am

Post by lullimarka » Sat Nov 23, 2002 10:12 am

im crashing to desktop from /showeq .. all otehr commands working fine tho .. .also using the new offset from showeq forums .... any ideas ?

78AAD0 is the offset im using

morannon
a lesser mummy
a lesser mummy
Posts: 57
Joined: Sun Nov 03, 2002 3:50 pm

Post by morannon » Sat Nov 23, 2002 1:17 pm

Shouldnt be anything in there to make you crash - youre using the right offset.

lullimarka
orc pawn
orc pawn
Posts: 21
Joined: Mon Nov 18, 2002 8:48 am

Post by lullimarka » Sun Nov 24, 2002 7:30 am

double checked all the inserted code, no problems ..... still crashing :?