1
0
mirror of https://github.com/djhackersdev/bemanitools.git synced 2024-11-24 06:40:11 +01:00

iidxhook-util: Add domain check to my_gethostbyname func

This commit is contained in:
garbage 2024-03-04 10:08:53 +09:00 committed by icex2
parent f7142df84d
commit ca42257fa2

View File

@ -76,11 +76,13 @@ my_connect(SOCKET s, const struct sockaddr *addr, int addrlen)
static struct hostent FAR *STDCALL my_gethostbyname(const char *name)
{
// IIDX 9-13 use the `services` domain (not `services.eamuse.konami.fun`).
if (strcmp(name, "services") != 0) {
return real_gethostbyname(name);
}
char *tmp;
/* bugfix win10: don't just catch services.konami... because
win10 is doing some weird stuff and this call also contains
various IP addresses. Always return the server address */
tmp = net_addr_to_str(&eamuse_server_addr_resolved);
log_misc("my_gethostbyname: '%s' to ip %s", name, tmp);
free(tmp);