/*
Super Simple Login - Version 1.0
Created By
- FTProtocol
*/
#include <iostream>
#include "connect.h"
using namespace std;
char* cookies;
int exec_gunz()
{
char* buffer = (char*)malloc(120000);
char *path = (char*)malloc(256);
initialize_winsock();
memset(path,0,256);
strcpy(path,"/common/prelaunch.nhn?gameId=u_gunz&subId=");
connection conn = connect_to_server("gunz.ijji.com",80);
http_get(conn,"gunz.ijji.com",path,NULL,NULL);
memset(buffer,0,120000);
rrecv(conn,buffer,120000);
cookies = http_getcookies(buffer);
endconnection(conn);
free(buffer);
return 0;
}
int login()
{
char username[256]={0};
char password[256]={0};
int game;
char *login = (char*)malloc(256);
char* buffer = (char*)malloc(120000);
printf("\n Enter your username: ");
gets(username);
printf("\n Enter your password: ");
gets(password);
initialize_winsock();
memset(login,0,256);
strcpy(login,"/login.nhn?m=login");
strcat(login,"&memberid=");
strcat(login,username);
strcat(login,"&password=");
strcat(login,password);
connection conn = connect_to_server("login.ijji.com",80);
http_get(conn,"login.ijji.com",login,NULL,NULL);
memset(buffer,0,120000);
rrecv(conn,buffer,120000);
cookies = http_getcookies(buffer);
endconnection(conn);
free(login);
free(buffer);
system("cls");
printf("\n Please select your game");
printf("\n -------------------------");
printf("\n Games:");
printf("\n\n 1. Gunz");
printf("\n\n Select a game: ");
scanf("%i",&game);
switch(game)
{
case 1 :
exec_gunz();
break;
default :
printf("\n Invalid Game!");
break;
}
return 0;
}
int main()
{
printf("\n NOTATROJAN - Version 1.0");
printf("\n - By FTProtocol");
system("cls");
login();
return 0;
}
ok after speaking to a friend who is very advanced in c++ he gave me his own socket file and im currently using that ( just improved version of winsock )
Now the problem is, it wont launch the game if the cookie from the login doesnt match the cookie from the launch game request. And i think thats whats doing on so please help!