Manaweaver
11-19-2002, 12:01 PM
Well, I've seen another post that shares my same problem. I figure those of you having this problem can post here and we may be able to compare what we've got. I've been using Hoihoi's sniffer and I think the first sniffer posted here....Neither have been able to lock onto eqgame.exe at any point in the startup of EQ. Anyone have any ideas of the possible cause?
maggotboy
11-19-2002, 12:18 PM
In order to assist, we'd need to know several things ...
1. The OS you're running on
2. The development tool you used to compile the sniffer
3. Which sniffer you're using exactly, and which revision of it.
4. If you made any changes to the code to get it compiled, what those changes were exactly.
Maggotboy
eqtryin
11-19-2002, 12:25 PM
windowsxp
zert's mingw2.0
using the code in the first post ..was workin until today ofcourse
only change was to the ip address and to the port
i modified the hh.conf file session key line to reflect the new offset but it closes which means its not binding to eqgame i believe, thanks for any help
edit just ran it in eqwindows been using sleep cause i dont like eqwindows error is open process failed
Manaweaver
11-19-2002, 12:31 PM
All right, we'll go with the most recent one...and i'll directly paste the exact source for you...
// $Header: /usr/local/cvsroot/senseheading/senseheading.c,v 1.4 2002/11/05 23:36:03 hoihoi Exp $
#include <stdio.h>
#include <string.h>
#include <winsock2.h>
#include <tlhelp32.h>
#include <time.h>
#define CONF_FILE "C:/windows.ini"
#define CONF_SIZE 16
struct CONFIG
{
unsigned long long SessionKeyLocation;
unsigned int SendInterval;
char seq_ip[16];
int seq_port;
} config;
int SendSessionKey(unsigned long long SessionKey);
void readkey (HANDLE hProcess, int useConfig)
{
while (1)
{
unsigned long addr;
unsigned long long key = 0xffffffffffffffff;
char keypressing;
if (useConfig == 0)
{
printf ("\nenter offset (ie: 0x0078AAD0): ");
if (scanf ("%08x", &addr) == 1)
{
printf ("offset:\t0x%08x\n", addr);
}
}
else
addr = config.SessionKeyLocation;
if (ReadProcessMemory (hProcess, (void *)addr, &key, 8, NULL) == 0)
{
printf ("ReadProcessMemory on 8 bytes at 0x%08x failed: %u\n", addr, GetLastError());
}
else
{
printf ("Session key:\t0x%016I64x\n", (unsigned long long) key);
if ( useConfig == 1)
{
if (SendSessionKey(key) != SOCKET_ERROR)
printf("Sent the session key to %s:%d\n", config.seq_ip, config.seq_port);
else
printf("Failed to send the session key to %s:%d\n", config.seq_ip, config.seq_port);
}
if (config.SendInterval != 0)
sleep(config.SendInterval*1000);
else
{
printf("\nPress some key to continue");
scanf("%s", &keypressing);
}
}
}
fflush (stdin);
}
int scanproclist ( int useConfig )
{
HANDLE hProcessSnap = NULL;
PROCESSENTRY32 pe32 = {0};
// Take a snapshot of all processes in the system.
hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if (hProcessSnap == INVALID_HANDLE_VALUE)
return 0;
// Fill in the size of the structure before using it.
pe32.dwSize = sizeof(PROCESSENTRY32);
if (Process32First(hProcessSnap, &pe32))
{
HANDLE hProcess;
do
{
LPSTR pCurChar;
char pName[512];
// strip path and leave exe filename
for (pCurChar = (pe32.szExeFile + strlen (pe32.szExeFile));
*pCurChar != '\\' && pCurChar != pe32.szExeFile - 1;
--pCurChar)
strcpy(pName, pCurChar);
strlwr(pName);
if ( (strncmp (pName, "testeqgame", 10) == 0) || (strncmp (pName, "eqgame", 6) == 0) )
{
printf ("found eqgame - pid = %u\n\n", pe32.th32ProcessID);
hProcess = OpenProcess (PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID);
if (hProcess == NULL)
{
DWORD dw;
dw = GetLastError();
printf ("OpenProcess failed, error: %u\n", dw);
return 0;
}
readkey (hProcess, useConfig);
}
}
while (Process32Next(hProcessSnap, &pe32));
}
CloseHandle (hProcessSnap);
return 0;
}
int ReadConfig (void)
{
int useConfig = 0;
char conf_buffer[CONF_SIZE];
GetPrivateProfileString("Client", "SessionKeyLocation", "0", conf_buffer, CONF_SIZE, CONF_FILE);
config.SessionKeyLocation = strtol(conf_buffer,NULL,16);
GetPrivateProfileString("Client", "SendInterval", "0", conf_buffer, CONF_SIZE, CONF_FILE);
config.SendInterval = atoi(conf_buffer);
GetPrivateProfileString("ShowEQ", "IP", "0", conf_buffer, CONF_SIZE, CONF_FILE);
strcpy(config.seq_ip, conf_buffer);
GetPrivateProfileString("ShowEQ", "Port", "0", conf_buffer, CONF_SIZE, CONF_FILE);
config.seq_port = atoi(conf_buffer);
if (config.SessionKeyLocation > 0)
useConfig = 1;
return useConfig;
}
int SendSessionKey(unsigned long long SessionKey)
{
int ret;
WSADATA wsd;
SOCKET ssocket;
SOCKADDR_IN seq;
if (WSAStartup(MAKEWORD(2, 2), &wsd) != 0)
{
printf("WSAStartup failed!\n");
return SOCKET_ERROR;
}
ssocket = socket(AF_INET, SOCK_DGRAM, 0);
if (ssocket == INVALID_SOCKET)
{
printf("socket() failed; %d\n", WSAGetLastError());
return SOCKET_ERROR;
}
seq.sin_family = AF_INET;
seq.sin_port = htons((short)config.seq_port);
seq.sin_addr.s_addr = inet_addr(config.seq_ip);
ret = sendto(ssocket, (char *) &SessionKey, sizeof(unsigned long long), 0, (SOCKADDR *)&seq, sizeof(seq));
if (ret == SOCKET_ERROR)
return SOCKET_ERROR;
closesocket(ssocket);
WSACleanup();
return 0;
}
int main(void)
{
printf ("scanning for eqgame.exe\n");
if (ReadConfig() == 1)
scanproclist(1);
else
scanproclist(0);
return 0;
}
My OS is winXP pro... I used MinGW V2 to compile it. May just have to restart or something...but http://seq.sourceforge.net/showthread.php?s=&threadid=2453&perpage=15&pagenumber=1 works wonderfully...did all of the compiling while in game...ran it and actually got it to decode. Had to zone first though...had some weird spawn errors. I highly suggest trying that code. Hats off to maggotboy there.
cbreaker
11-19-2002, 09:44 PM
Manaweaver,
This code does not compile in MinGW, I get errors that I believe are caused by the fact that it was pasted into the message instead of a CODE tag. Could you repost in a code tag?
Manaweaver
11-21-2002, 06:22 AM
I believe this is the thread used for that source http://seq.sourceforge.net/showthread.php?s=&threadid=2373 I apologize for not puting it in code, figured that no one would use my source to compile =)
Powered by vBulletin® Version 4.1.9 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.