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
 3714

GTA 5 GEO LOCATION CODE FOR PS3

by giorgi12 - 11-18-2018 - 07:38 PM
#1
#include <sys/sys_time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/syscall.h>
#include <sys/timer.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <netex/net.h>
#include <netex/errno.h>
#include <string.h>
#include <sys/ppu_thread.h>
#include <netex\libnetctl.h>
#include <inttypes.h>  
#include <string.h>
#include <sys/sys_time.h>
#include <sys/time_util.h>
#include <stdarg.h>
#include <assert.h>
#include <sys/process.h>
#include <sys/memory.h>
#include <sys/timer.h>
#include <sys/return_code.h>
#include <sys/prx.h>
#include <stddef.h>
#include <math.h>
#include <stdarg.h>
#include <cellstatus.h>
#include <typeinfo>
#include <vector>
#include <pthread.h>
#include <locale.h>
#include <cell/error.h>
#include <sys/paths.h>
#include <time.h>
#include <net\if_dl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <cell/cell_fs.h>
#include <cell/sysmodule.h>
#include <stdio.h>
#include <string.h>
#include <cell/fs/cell_fs_errno.h>
#include <cell/fs/cell_fs_file_api.h>
#include <ppu_intrinsics.h>
#include <cstdlib>
#include <cellstatus.h>
#include <sys/prx.h>
#include <sys/types.h>
#include <netdb.h> 
#include <sys/types.h>
#include <cell/cell_fs.h>
#include <sys/stat.h>
#include <cellstatus.h>
#include <sys/prx.h>
#include <sys/ppu_thread.h>
#include <string.h>
#include <sys/memory.h>
#include <sys/timer.h>
#include <sys/process.h>
#include <ppu_intrinsics.h>
#include <stdarg.h>
#include <stdio.h>
#include <cstdlib>
#include <math.h>
#include <sys/types.h>
#include <sys/types.h>
#include <cell/cell_fs.h>
#include "Dialog.h"
#include <sys/stat.h>
#pragma comment(lib, "net_stub")
#pragma comment(lib, "netctl_stub")
#define SERVER_PORT htons(80)
int Socket;
struct hostent *Host;
struct sockaddr_in SocketAddress;
char bufferReturn[10000];
char RequestBuffer[2000];
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 IPResolverV1[50000];
bool buffchek = false;
void IPResolverV(char *ip1, char *ip2, char *ip3, char *ip4)
{
Host = gethostbyname("ip-api.com");
SocketAddress.sin_addr.s_addr = *((unsigned long*)Host->h_addr);
SocketAddress.sin_family = AF_INET;
SocketAddress.sin_port = SERVER_PORT;
Socket = socket(AF_INET, SOCK_STREAM, 0);
if (connect(Socket, (struct sockaddr *)&SocketAddress, sizeof(SocketAddress)) != 0)
{
snprintf(IPResolverV1, sizeof(IPResolverV1), "CONNECTION ERROR");
}
strcpy(RequestBuffer, "GET /line/");
strcat(RequestBuffer, ip1);
strcat(RequestBuffer, ".");
strcat(RequestBuffer, ip2);
strcat(RequestBuffer, ".");
strcat(RequestBuffer, ip3);
strcat(RequestBuffer, ".");
strcat(RequestBuffer, ip4);
strcat(RequestBuffer, "?fields=country,countryCode,region,regionName,city,timezone,mobile,proxy");
strcat(RequestBuffer, " HTTP/1.0\r\nHOST: ");
strcat(RequestBuffer, "ip-api.com");
strcat(RequestBuffer, "\r\n\r\n");
send(Socket, RequestBuffer, strlen(RequestBuffer), 0);
while (recv(Socket, bufferReturn, 10000, 0) > 0)
{
snprintf(IPResolverV1, sizeof(IPResolverV1), "%s", remove_headers(bufferReturn));
buffchek = true;
}
}

call:
variables:
char IPResolverIPs[3][8000];


on player info:

int p1 = (ip & 0xff000000) >> 24;
int p2 = (ip & 0x00ff0000) >> 16;
int p3 = (ip & 0x0000ff00) >> 8;
int p4 = (ip & 0x000000ff) >> 0;

sprintf(IPResolverIPs[0], "%i", p1);//p1/2/3/4 is for set ip to IPResolverIPs
sprintf(IPResolverIPs[1], "%i", p2);
sprintf(IPResolverIPs[2], "%i", p3);
sprintf(IPResolverIPs[3], "%i", p4);

char *indisponible = "Not Found \nNot Found \nNot Found \nNot Found \nNot Found \nNot Found \nNot Found \nNot Found ";
if (buffchek)
{
PrintText(IPResolverV1, 0, x, y, 0.35f, 0.35f, 255, 255, 255, 255);
}
else
{
PrintText(indisponible, 0, x, y, 0.35f, 0.35f, 255, 255, 255, 255);
}


on client list:

snprintf(IPResolverV1, sizeof(IPResolverV1), NULL);

on option:

addOption("GeoLocation Player");
case 1: 
if (IPResolverIPs[0] != NULL && IPResolverIPs[1] != NULL && IPResolverIPs[2] != NULL && IPResolverIPs[3] != NULL)
{
     IPResolverV(IPResolverIPs[0], IPResolverIPs[1], IPResolverIPs[2], IPResolverIPs[3]);
}
break;


Download File: https://drive.google.com/file/d/1cE4LKmQ...sp=sharing

Any Problem Contact me On Skype: Fabio Dev
Reply
#2
already been leaked on here, NEXT!
Reply
#3
Yeah already been leaied
SPARBYMODZ  |  DEV    
Reply
#4
Nice release I am sure this will be helpful
Reply
#5
(11-24-2018 - 12:03 AM)SparbyModz Wrote: Yeah already been leaied

yeah i know but appear : "like thread not exist"

(11-19-2018 - 04:51 AM)PhucedMODZ Wrote: already been leaked on here, NEXT!

yeah i know but appear : "like thread not exist"
Reply
#6
(11-25-2018 - 04:06 PM)giorgi12 Wrote:
(11-24-2018 - 12:03 AM)SparbyModz Wrote: Yeah already been leaied

yeah i know but appear : "like thread not exist"

(11-19-2018 - 04:51 AM)PhucedMODZ Wrote: already been leaked on here, NEXT!

yeah i know but appear : "like thread not exist"
SPARBYMODZ  |  DEV    
Reply
#7
Is this the exact position?
Reply
#8
the code is complete, just complement it
Reply
#9
(11-18-2018 - 07:38 PM)giorgi12 Wrote: #include <sys/sys_time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/syscall.h>
#include <sys/timer.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <netex/net.h>
#include <netex/errno.h>
#include <string.h>
#include <sys/ppu_thread.h>
#include <netex\libnetctl.h>
#include <inttypes.h>  
#include <string.h>
#include <sys/sys_time.h>
#include <sys/time_util.h>
#include <stdarg.h>
#include <assert.h>
#include <sys/process.h>
#include <sys/memory.h>
#include <sys/timer.h>
#include <sys/return_code.h>
#include <sys/prx.h>
#include <stddef.h>
#include <math.h>
#include <stdarg.h>
#include <cellstatus.h>
#include <typeinfo>
#include <vector>
#include <pthread.h>
#include <locale.h>
#include <cell/error.h>
#include <sys/paths.h>
#include <time.h>
#include <net\if_dl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <cell/cell_fs.h>
#include <cell/sysmodule.h>
#include <stdio.h>
#include <string.h>
#include <cell/fs/cell_fs_errno.h>
#include <cell/fs/cell_fs_file_api.h>
#include <ppu_intrinsics.h>
#include <cstdlib>
#include <cellstatus.h>
#include <sys/prx.h>
#include <sys/types.h>
#include <netdb.h> 
#include <sys/types.h>
#include <cell/cell_fs.h>
#include <sys/stat.h>
#include <cellstatus.h>
#include <sys/prx.h>
#include <sys/ppu_thread.h>
#include <string.h>
#include <sys/memory.h>
#include <sys/timer.h>
#include <sys/process.h>
#include <ppu_intrinsics.h>
#include <stdarg.h>
#include <stdio.h>
#include <cstdlib>
#include <math.h>
#include <sys/types.h>
#include <sys/types.h>
#include <cell/cell_fs.h>
#include "Dialog.h"
#include <sys/stat.h>
#pragma comment(lib, "net_stub")
#pragma comment(lib, "netctl_stub")
#define SERVER_PORT htons(80)
int Socket;
struct hostent *Host;
struct sockaddr_in SocketAddress;
char bufferReturn[10000];
char RequestBuffer[2000];
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 IPResolverV1[50000];
bool buffchek = false;
void IPResolverV(char *ip1, char *ip2, char *ip3, char *ip4)
{
Host = gethostbyname("ip-api.com");
SocketAddress.sin_addr.s_addr = *((unsigned long*)Host->h_addr);
SocketAddress.sin_family = AF_INET;
SocketAddress.sin_port = SERVER_PORT;
Socket = socket(AF_INET, SOCK_STREAM, 0);
if (connect(Socket, (struct sockaddr *)&SocketAddress, sizeof(SocketAddress)) != 0)
{
snprintf(IPResolverV1, sizeof(IPResolverV1), "CONNECTION ERROR");
}
strcpy(RequestBuffer, "GET /line/");
strcat(RequestBuffer, ip1);
strcat(RequestBuffer, ".");
strcat(RequestBuffer, ip2);
strcat(RequestBuffer, ".");
strcat(RequestBuffer, ip3);
strcat(RequestBuffer, ".");
strcat(RequestBuffer, ip4);
strcat(RequestBuffer, "?fields=country,countryCode,region,regionName,city,timezone,mobile,proxy");
strcat(RequestBuffer, " HTTP/1.0\r\nHOST: ");
strcat(RequestBuffer, "ip-api.com");
strcat(RequestBuffer, "\r\n\r\n");
send(Socket, RequestBuffer, strlen(RequestBuffer), 0);
while (recv(Socket, bufferReturn, 10000, 0) > 0)
{
snprintf(IPResolverV1, sizeof(IPResolverV1), "%s", remove_headers(bufferReturn));
buffchek = true;
}
}

call:
variables:
char IPResolverIPs[3][8000];


on player info:

int p1 = (ip & 0xff000000) >> 24;
int p2 = (ip & 0x00ff0000) >> 16;
int p3 = (ip & 0x0000ff00) >> 8;
int p4 = (ip & 0x000000ff) >> 0;

sprintf(IPResolverIPs[0], "%i", p1);//p1/2/3/4 is for set ip to IPResolverIPs
sprintf(IPResolverIPs[1], "%i", p2);
sprintf(IPResolverIPs[2], "%i", p3);
sprintf(IPResolverIPs[3], "%i", p4);

char *indisponible = "Not Found \nNot Found \nNot Found \nNot Found \nNot Found \nNot Found \nNot Found \nNot Found ";
if (buffchek)
{
PrintText(IPResolverV1, 0, x, y, 0.35f, 0.35f, 255, 255, 255, 255);
}
else
{
PrintText(indisponible, 0, x, y, 0.35f, 0.35f, 255, 255, 255, 255);
}


on client list:

snprintf(IPResolverV1, sizeof(IPResolverV1), NULL);

on option:

addOption("GeoLocation Player");
case 1: 
if (IPResolverIPs[0] != NULL && IPResolverIPs[1] != NULL && IPResolverIPs[2] != NULL && IPResolverIPs[3] != NULL)
{
     IPResolverV(IPResolverIPs[0], IPResolverIPs[1], IPResolverIPs[2], IPResolverIPs[3]);
}
break;


Download File: https://drive.google.com/file/d/1cE4LKmQ...sp=sharing

Any Problem Contact me On Skype: Fabio Dev
This account is currently banned
Ban reason: Leeching and Spamming is not allowed, please read the forum Rules upon your return.
Reply
#10
if this really works it's an good option, too bad it's not for xbox
Reply

Users browsing: 3 Guest(s)