ThunderMS - Because fun is a part of your life

Our users have posted a total of 4568 messages in 677 topics!
We have 8884 registered users, the newest registered user is hehenemt.

  • Post new topic
  • Reply to topic

[Fix] Login Hack

Share

Danny

Number of posts: 8
Warning:
0 / 1000 / 100

Registration date: 2008-04-25

[Fix] Login Hack

Post by Danny on Sat Apr 26, 2008 10:46 pm

How to fix


Open up your MySQLM.cpp and add this function:

Code:

int MySQL::checkChar(int charid){

  MYSQL_RES *mres;

  MYSQL_ROW mrow;

  char query[255];

    sprintf_s(query, 255, "select userid from characters where ID='%d';", charid);

  mysql_real_query(&maple_db, query, strlen(query));

  printf(mysql_error(&maple_db));

  mres = mysql_store_result(&MySQL::maple_db);

  mrow = mysql_fetch_row(mres);

  printf(mysql_error(&maple_db));

  int ret = 0;

  printf(mysql_error(&maple_db));

  if(mysql_num_fields(mres) > 0){

      string mr = string((char*)mrow[0]);

      istringstream buffer(mr);

      buffer >> ret;

  }

  return ret;

}




Now open MySQLM.h and add this line:
Code:

static int checkChar(int charid);




Now open Characters.cpp and replace your "Characters::connectGame" function with mine:
Code:

void Characters::connectGame(PlayerLogin* player, unsigned char *packet){

  int charid = getInt(packet);

  if(MySQL::checkChar(charid) != player->getUserid())

      return; 

  bool check=false;

  int ids[3];

  int num = player->getIDs(ids);

  for(int i=0; i<num; i++){

      if(ids[i] == charid){

        check=true;

        break;

      }

  }

  if(!check){

      // hacking

      return;

  }

  LoginPacket::connectIP(player, charid);

}


Thats all.

Credits to
rEakW0n

This will stop all the Login Hackers (That thing of login in other Character and it isnt yours)

GMDanny (i Wish... xD) jk..

Sincerity,
Danny


Srry for my english i cant talk 100% english Razz

SLAYBELZ

Number of posts: 7
Warning:
0 / 1000 / 100

Registration date: 2008-04-27

Re: [Fix] Login Hack

Post by SLAYBELZ on Sat Apr 26, 2008 11:36 pm

Sweeeeeeet! Now we can REALLY cut down on hackers!

Mystery

Number of posts: 484
Age: 16
Location: London Hightbury
Warning:
0 / 1000 / 100

Character Name: Mystery
Registration date: 2008-04-24

Re: [Fix] Login Hack

Post by Mystery on Sun Apr 27, 2008 7:24 pm

Hope, there will be a hack, which deactivate PE Very Happy
That would be so damn cute.

Salazar

Number of posts: 38
Location: Sandiego.
Warning:
0 / 1000 / 100

Registration date: 2008-04-28

Re: [Fix] Login Hack

Post by Salazar on Mon Apr 28, 2008 4:50 am

hahaha this is a goog idea. i been waiting for something like that. MS was full of HACKERS.! but anyways. i ll have time to forget those times HERE! haha tHX guys

CokeJob

Number of posts: 18
Warning:
0 / 1000 / 100

Registration date: 2008-04-27

Re: [Fix] Login Hack

Post by CokeJob on Mon Apr 28, 2008 8:13 am

fack the person who released that hack....

fabian

Number of posts: 12
Warning:
0 / 1000 / 100

Registration date: 2008-04-26

Re: [Fix] Login Hack

Post by fabian on Tue Apr 29, 2008 4:53 pm

lol...
  • Post new topic
  • Reply to topic

Current date/time is Fri Nov 27, 2009 5:54 am