ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 12882

ip xbox 360 geolocator running

by Alex2019 - 01-07-2020 - 05:23 AM
#1
Code:
int Socket2;
void Socket_Bypass()
{
XNetStartupParams xnsp;
memset(&xnsp, 0, sizeof(xnsp));
xnsp.cfgSizeOfStruct = sizeof(XNetStartupParams);
xnsp.cfgFlags = XNET_STARTUP_BYPASS_SECURITY;
int err = XNetStartup(&xnsp);

XNADDR pxna;
while (XNetGetTitleXnAddr(&pxna) == 0);

WSADATA wsaData;
err = WSAStartup(MAKEWORD(2, 2), &wsaData);

Socket2 = socket(AF_INET, SOCK_STREAM, 0);

int setting = 1;
setsockopt(Socket2, SOL_SOCKET, 0x5801, (char*)(&setting), sizeof(int));
}
#define SERVER_PORT htons(80)
struct sockaddr_in SocketAddress_;

char *HookName;
char* remove_headers(char* request)
{
if (request == NULL) return NULL;
request = strstr(request, "\r\n\r\n");
if (request) request += 4;
return request;
}
char Country[500]; //50000
int mConnected;
namespace SocketName
{
char* ConnectionSettings(char *pHost)
{

int setting = 1;
setsockopt(Socket2, SOL_SOCKET, 0x5801, (char*)(&setting), sizeof(int));

SocketAddress_.sin_addr.s_addr = inet_addr(pHost);
SocketAddress_.sin_family = AF_INET;
SocketAddress_.sin_port = SERVER_PORT;
Socket2 = socket(AF_INET, SOCK_STREAM, 0);
return pHost;
}
bool connect()
{
return mConnected = (!::connect(Socket2, (sockaddr *)&SocketAddress_, sizeof(SocketAddress_)));
}
void disconnect()
{
if (!mConnected)
{
return;
}
closesocket(Socket2);
mConnected = false;
}
bool checkError(int err)
{
if (err == 0 || err == -1)
{
disconnect();
return false;
}
return true;

}
bool get(void *pBuffer, int pSize)
{
if (!mConnected)
{
return false;
}
//return checkError(recv(Socket, pBuffer, pSize, NULL));
}
bool put(char *pData, int pSize)
{
if (!mConnected)
{
return false;
}
return checkError(send(Socket2, pData, pSize, NULL));
}
bool isConnected()
{
return mConnected;
}
bool httpRequest(char *params, char *out, size_t outSz)
{
char rqBuffer[255] = { 0 };
strcpy(rqBuffer, "GET / line/");
strcat(rqBuffer, (const char *)params);
strcat(rqBuffer, " HTTP/1.0\r\nHOST: ");
strcat(rqBuffer, "\r\n\r\n");

send(Socket2, rqBuffer, 255, 0);
recv(Socket2, out, outSz, 0);
return out;
}
}

char* GetIPgeo(int Player)
{
if (NETWORK::NETWORK_IS_PLAYER_CONNECTED(Player))
{
char GCN[64];
char* GGT = PLAYER::GET_PLAYER_NAME(Player);
unsigned char Ip1 = *(UINT8*)(GGT - 0x48);
unsigned char Ip2 = *(UINT8*)(GGT - 0x47);
unsigned char Ip3 = *(UINT8*)(GGT - 0x46);
unsigned char Ip4 = *(UINT8*)(GGT - 0x45);
sprintf(GCN, "%u.%u.%u.%u", Ip1, Ip2, Ip3, Ip4);
printf("%s", GCN);
return GCN;
}
else
return "0.0.0.0";
}
void IPCountry()
{
Socket_Bypass();
SocketAddress_.sin_addr.s_addr = inet_addr("ip-api.com");//69.195.146.130//ip-api.com
SocketAddress_.sin_family = AF_INET;
SocketAddress_.sin_port = SERVER_PORT;

SocketName::connect();

/*if (connect(Socket2, (sockaddr*)&SocketAddress, sizeof(SocketAddress)) < 0) {
snprintf(Country, sizeof(Country), "Not Connected");
}*/

char RequestCountry[255] = { 0 };
strcpy(RequestCountry, "GET /line/");
strcat(RequestCountry, GetIPgeo(selectedPlayerinfo));
strcat(RequestCountry, "?fields=country,regionName,city,isp");
strcat(RequestCountry, " HTTP/1.0\r\nHOST: ");
strcat(RequestCountry, "ip-api.com");//69.195.146.130
strcat(RequestCountry, "\r\n\r\n");

send(Socket2, RequestCountry, 255, 0);

recv(Socket2, RequestCountry, sizeof(RequestCountry), 0);

snprintf(Country, sizeof(Country), "%s", remove_headers(RequestCountry));

closesocket(Socket2);



}
Reply
#2
Second one and counting
A Frenchie was asking for this @ModLoader or so..
Reply
#3
Is work good bro ty for help
This account is currently banned
Ban reason: Leeching and Spamming
Reply
#4
(05-29-2020 - 11:51 PM)Osprimosbruno Wrote: Is work good bro ty for help
Noooooo This Shit its not working already tested
Disc = 0xemiil
Reply
#5
Okay bro ty for help ok
This account is currently banned
Ban reason: Leeching and Spamming
Reply
#6
This is shit doesn't work
Reply
#7
int Socket2;
void Socket_Bypass()
{
XNetStartupParams xnsp;
memset(&xnsp, 0, sizeof(xnsp));
xnsp.cfgSizeOfStruct = sizeof(XNetStartupParams);
xnsp.cfgFlags = XNET_STARTUP_BYPASS_SECURITY;
int err = XNetStartup(&xnsp);

XNADDR pxna;
while (XNetGetTitleXnAddr(&pxna) == 0);

WSADATA wsaData;
err = WSAStartup(MAKEWORD(2, 2), &wsaData);

Socket2 = socket(AF_INET, SOCK_STREAM, 0);

int setting = 1;
setsockopt(Socket2, SOL_SOCKET, 0x5801, (char*)(&setting), sizeof(int));
}
#define SERVER_PORT htons(80)
struct sockaddr_in SocketAddress_;

char *HookName;
char* remove_headers(char* request)
{
if (request == NULL) return NULL;
request = strstr(request, "\r\n\r\n");
if (request) request += 4;
return request;
}
char Country[500]; //50000
int mConnected;
namespace SocketName
{
char* ConnectionSettings(char *pHost)
{

int setting = 1;
setsockopt(Socket2, SOL_SOCKET, 0x5801, (char*)(&setting), sizeof(int));

SocketAddress_.sin_addr.s_addr = inet_addr(pHost);
SocketAddress_.sin_family = AF_INET;
SocketAddress_.sin_port = SERVER_PORT;
Socket2 = socket(AF_INET, SOCK_STREAM, 0);
return pHost;
}
bool connect()
{
return mConnected = (!::connect(Socket2, (sockaddr *)&SocketAddress_, sizeof(SocketAddress_)));
}
void disconnect()
{
if (!mConnected)
{
return;
}
closesocket(Socket2);
mConnected = false;
}
bool checkError(int err)
{
if (err == 0 || err == -1)
{
disconnect();
return false;
}
return true;

}
bool get(void *pBuffer, int pSize)
{
if (!mConnected)
{
return false;
}
//return checkError(recv(Socket, pBuffer, pSize, NULL));
}
bool put(char *pData, int pSize)
{
if (!mConnected)
{
return false;
}
return checkError(send(Socket2, pData, pSize, NULL));
}
bool isConnected()
{
return mConnected;
}
bool httpRequest(char *params, char *out, size_t outSz)
{
char rqBuffer[255] = { 0 };
strcpy(rqBuffer, "GET / line/");
strcat(rqBuffer, (const char *)params);
strcat(rqBuffer, " HTTP/1.0\r\nHOST: ");
strcat(rqBuffer, "\r\n\r\n");

send(Socket2, rqBuffer, 255, 0);
recv(Socket2, out, outSz, 0);
return out;
}
}

char* GetIPgeo(int Player)
{
if (NETWORK::NETWORK_IS_PLAYER_CONNECTED(Player))
{
char GCN[64];
char* GGT = PLAYER::GET_PLAYER_NAME(Player);
unsigned char Ip1 = *(UINT8*)(GGT - 0x48);
unsigned char Ip2 = *(UINT8*)(GGT - 0x47);
unsigned char Ip3 = *(UINT8*)(GGT - 0x46);
unsigned char Ip4 = *(UINT8*)(GGT - 0x45);
sprintf(GCN, "%u.%u.%u.%u", Ip1, Ip2, Ip3, Ip4);
printf("%s", GCN);
return GCN;
}
else
return "0.0.0.0";
}
void IPCountry()
{
Socket_Bypass();
SocketAddress_.sin_addr.s_addr = inet_addr("ip-api.com");//69.195.146.130//ip-api.com
SocketAddress_.sin_family = AF_INET;
SocketAddress_.sin_port = SERVER_PORT;

SocketName::connect();

/*if (connect(Socket2, (sockaddr*)&SocketAddress, sizeof(SocketAddress)) < 0) {
snprintf(Country, sizeof(Country), "Not Connected");
}*/

char RequestCountry[255] = { 0 };
strcpy(RequestCountry, "GET /line/");
strcat(RequestCountry, GetIPgeo(selectedPlayerinfo));
strcat(RequestCountry, "?fields=country,regionName,city,isp");
strcat(RequestCountry, " HTTP/1.0\r\nHOST: ");
strcat(RequestCountry, "ip-api.com");//69.195.146.130
strcat(RequestCountry, "\r\n\r\n");

send(Socket2, RequestCountry, 255, 0);

recv(Socket2, RequestCountry, sizeof(RequestCountry), 0);

snprintf(Country, sizeof(Country), "%s", remove_headers(RequestCountry));

closesocket(Socket2);



}
This account is currently banned
Ban reason: Leeching and Spamming
Reply
#8
(01-07-2020 - 05:23 AM)Alex2019 Wrote:
Code:
int Socket2;
void Socket_Bypass()
{
XNetStartupParams xnsp;
memset(&xnsp, 0, sizeof(xnsp));
xnsp.cfgSizeOfStruct = sizeof(XNetStartupParams);
xnsp.cfgFlags = XNET_STARTUP_BYPASS_SECURITY;
int err = XNetStartup(&xnsp);

XNADDR pxna;
while (XNetGetTitleXnAddr(&pxna) == 0);

WSADATA wsaData;
err = WSAStartup(MAKEWORD(2, 2), &wsaData);

Socket2 = socket(AF_INET, SOCK_STREAM, 0);

int setting = 1;
setsockopt(Socket2, SOL_SOCKET, 0x5801, (char*)(&setting), sizeof(int));
}
#define SERVER_PORT htons(80)
struct sockaddr_in SocketAddress_;

char *HookName;
char* remove_headers(char* request)
{
if (request == NULL) return NULL;
request = strstr(request, "\r\n\r\n");
if (request) request += 4;
return request;
}
char Country[500]; //50000
int mConnected;
namespace SocketName
{
char* ConnectionSettings(char *pHost)
{

int setting = 1;
setsockopt(Socket2, SOL_SOCKET, 0x5801, (char*)(&setting), sizeof(int));

SocketAddress_.sin_addr.s_addr = inet_addr(pHost);
SocketAddress_.sin_family = AF_INET;
SocketAddress_.sin_port = SERVER_PORT;
Socket2 = socket(AF_INET, SOCK_STREAM, 0);
return pHost;
}
bool connect()
{
return mConnected = (!::connect(Socket2, (sockaddr *)&SocketAddress_, sizeof(SocketAddress_)));
}
void disconnect()
{
if (!mConnected)
{
return;
}
closesocket(Socket2);
mConnected = false;
}
bool checkError(int err)
{
if (err == 0 || err == -1)
{
disconnect();
return false;
}
return true;

}
bool get(void *pBuffer, int pSize)
{
if (!mConnected)
{
return false;
}
//return checkError(recv(Socket, pBuffer, pSize, NULL));
}
bool put(char *pData, int pSize)
{
if (!mConnected)
{
return false;
}
return checkError(send(Socket2, pData, pSize, NULL));
}
bool isConnected()
{
return mConnected;
}
bool httpRequest(char *params, char *out, size_t outSz)
{
char rqBuffer[255] = { 0 };
strcpy(rqBuffer, "GET / line/");
strcat(rqBuffer, (const char *)params);
strcat(rqBuffer, " HTTP/1.0\r\nHOST: ");
strcat(rqBuffer, "\r\n\r\n");

send(Socket2, rqBuffer, 255, 0);
recv(Socket2, out, outSz, 0);
return out;
}
}

char* GetIPgeo(int Player)
{
if (NETWORK::NETWORK_IS_PLAYER_CONNECTED(Player))
{
char GCN[64];
char* GGT = PLAYER::GET_PLAYER_NAME(Player);
unsigned char Ip1 = *(UINT8*)(GGT - 0x48);
unsigned char Ip2 = *(UINT8*)(GGT - 0x47);
unsigned char Ip3 = *(UINT8*)(GGT - 0x46);
unsigned char Ip4 = *(UINT8*)(GGT - 0x45);
sprintf(GCN, "%u.%u.%u.%u", Ip1, Ip2, Ip3, Ip4);
printf("%s", GCN);
return GCN;
}
else
return "0.0.0.0";
}
void IPCountry()
{
Socket_Bypass();
SocketAddress_.sin_addr.s_addr = inet_addr("ip-api.com");//69.195.146.130//ip-api.com
SocketAddress_.sin_family = AF_INET;
SocketAddress_.sin_port = SERVER_PORT;

SocketName::connect();

/*if (connect(Socket2, (sockaddr*)&SocketAddress, sizeof(SocketAddress)) < 0) {
snprintf(Country, sizeof(Country), "Not Connected");
}*/

char RequestCountry[255] = { 0 };
strcpy(RequestCountry, "GET /line/");
strcat(RequestCountry, GetIPgeo(selectedPlayerinfo));
strcat(RequestCountry, "?fields=country,regionName,city,isp");
strcat(RequestCountry, " HTTP/1.0\r\nHOST: ");
strcat(RequestCountry, "ip-api.com");//69.195.146.130
strcat(RequestCountry, "\r\n\r\n");

send(Socket2, RequestCountry, 255, 0);

recv(Socket2, RequestCountry, sizeof(RequestCountry), 0);

snprintf(Country, sizeof(Country), "%s", remove_headers(RequestCountry));

closesocket(Socket2);



}
good man
This account is currently banned
Ban reason: Leeching and Spamming
Reply
#9
Thanks for share bro?
Reply
#10
this is just copy paste from simplicity source, useless, u need to update the ip tracker method to get it working
Reply

Users browsing: 3 Guest(s)