[Release]Fix Login Hack

Page 1 of 2 12 LastLast
Results 1 to 25 of 30
  1. #1
    Apprentice iPhantom is offline
    MemberRank
    Apr 2008 Join Date
    19Posts

    [Release]Fix Login Hack

    Coded by reakw0n from CEF. I posted it here because this will stop those hackers fucking other ones' accounts.

    Quote Originally Posted by rEakW0n
    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);
    }

    Done!


  2. #2
    Account Upgraded | Title Enabled! Cruceo is offline
    MemberRank
    Apr 2008 Join Date
    620Posts

    Re: [Fix] Login Hack

    I created a much shorter fix to this............. HERE

  3. #3
    Account Upgraded | Title Enabled! xnBlaze is offline
    MemberRank
    Apr 2008 Join Date
    860Posts

    Re: [Fix] Login Hack

    I think advertising other websites aren't allowed Cruceo.

  4. #4
    Member SneakyMS is offline
    MemberRank
    Apr 2008 Join Date
    97Posts

    Re: [Fix] Login Hack

    Cruceo theres nothing on that FORUM. Stop advertising

  5. #5
    Member SneakyMS is offline
    MemberRank
    Apr 2008 Join Date
    97Posts

    Re: [Fix] Login Hack

    Also thanks for this sorry for the double post.

  6. #6
    om nom nom. Innovative is offline
    MemberRank
    Nov 2007 Join Date
    SydneyLocation
    1,237Posts

    Re: [Fix] Login Hack

    ------ Build started: Project: MapleStoryServer, Configuration: Debug Win32 ------
    Compiling...
    Characters.cpp
    c:\documents and settings\chris wong\desktop\khaosms\maplestoryserver\characters.cpp(163) : error C2039: 'getIDs' : is not a member of 'PlayerLogin'
    c:\documents and settings\chris wong\desktop\khaosms\maplestoryserver\playerlogin.h(7) : see declaration of 'PlayerLogin'
    Build log was saved at "file://c:\Documents and Settings\Chris Wong\Desktop\KhaosMS\MapleStoryServer\Debug\BuildLog.htm"
    MapleStoryServer - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========
    Yes i have tried...

  7. #7
    Member ups2000ups is offline
    MemberRank
    Apr 2008 Join Date
    69Posts

    Re: [Fix] Login Hack

    Quote Originally Posted by xnBlaze View Post
    I think advertising other websites aren't allowed Cruceo.
    spam isent allowed eighter

  8. #8
    Enthusiast xBlackLabel is offline
    MemberRank
    Apr 2008 Join Date
    36Posts

    Re: [Fix] Login Hack

    #include "MySQLM.h"
    #include "playerlogin.h"

    make sure those are there in chars.cpp which they should be already but thats all I can help without adding this to my server.

  9. #9
    om nom nom. Innovative is offline
    MemberRank
    Nov 2007 Join Date
    SydneyLocation
    1,237Posts

    Re: [Fix] Login Hack

    Both are in the includes =\

  10. #10
    Novice oot3000 is offline
    MemberRank
    Mar 2007 Join Date
    4Posts

    Re: [Fix] Login Hack

    Quote Originally Posted by Innovative View Post
    Yes i have tried...
    Me too. >.<

  11. #11
    Enthusiast xBlackLabel is offline
    MemberRank
    Apr 2008 Join Date
    36Posts

    Re: [Fix] Login Hack

    chars.h? lol, usually those are are by not including files but thats just what I think.

  12. #12
    Account Upgraded | Title Enabled! npmaple is offline
    MemberRank
    Apr 2008 Join Date
    Israel - a bad placeLocation
    281Posts

    Re: [Fix] Login Hack

    what is this does?

  13. #13
    Account Upgraded | Title Enabled! ralazo is offline
    MemberRank
    Apr 2007 Join Date
    Yeah.Location
    226Posts

    Re: [Fix] Login Hack

    thanks works good for me
    ------ Build started: Project: MapleStoryServer, Configuration: Debug Win32 ------
    Compiling...
    Characters.cpp
    Build log was saved at "file://c:\Maplelive\MapleStoryServer\MapleStoryServer\Debug\BuildLog.htm"
    MapleStoryServer - 0 error(s), 0 warning(s)
    ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

  14. #14
    om nom nom. Innovative is offline
    MemberRank
    Nov 2007 Join Date
    SydneyLocation
    1,237Posts

    Re: [Release]Fix Login Hack

    Then what did i do wrong? ._.

  15. #15
    Account Upgraded | Title Enabled! lukyjay is offline
    MemberRank
    Jul 2006 Join Date
    AustraliaLocation
    745Posts

    Re: [Fix] Login Hack

    Quote Originally Posted by npmaple View Post
    what is this does?
    If you send a packet to the server it lets you login to the account last logged in (sometimes a GM account) and you have full access. Very big security issue, this is a fix to address this.

  16. #16
    Account Upgraded | Title Enabled! shlomivman is offline
    MemberRank
    Jan 2006 Join Date
    284Posts

    Re: [Release]Fix Login Hack

    I get error same as Innovative got ,followed the steps and 100% I did all correct.

  17. #17
    Apprentice iPhantom is offline
    MemberRank
    Apr 2008 Join Date
    19Posts

    Re: [Release]Fix Login Hack

    Are you guys using Rev007 or Rev008?.

  18. #18
    Account Upgraded | Title Enabled! shlomivman is offline
    MemberRank
    Jan 2006 Join Date
    284Posts

    Re: [Release]Fix Login Hack

    I Use v7

  19. #19
    Valued Member jjaim is offline
    MemberRank
    Feb 2007 Join Date
    116Posts

    Re: [Release]Fix Login Hack

    rev 007 and some files from 8 :]

  20. #20
    Account Upgraded | Title Enabled! Cruceo is offline
    MemberRank
    Apr 2008 Join Date
    620Posts

    Re: [Release]Fix Login Hack

    Fine, don't listen to me... A simpler fix is there in that link I gave you. If you don't want to go there and fix the 16 00, 18 00, and crash packet issues, that's fine with me...

    If you want them, go ahead and look. They're there.

  21. #21
    Member Zaser is offline
    MemberRank
    Oct 2005 Join Date
    SWEDEN RULESLocation
    87Posts

    Re: [Release]Fix Login Hack

    It works fine. compailed without an error :)

    ty for the release keep up the good releases :)

  22. #22
    Apprentice Whymes is offline
    MemberRank
    Jul 2006 Join Date
    A cardboard boxlolLocation
    14Posts

    Re: [Release]Fix Login Hack

    Try this to fix your error:

    Code:
    void Characters::connectGame(PlayerLogin* player, unsigned char *packet){
       int charid = getInt(packet);
          if(MySQL::checkChar(charid) != player->getUserid())
                return;
       LoginPacket::connectIP(player, charid);
    }
    Might want to edit the post.. this works on v7 but you must use the code i posted, reakwon said so on CEF,

  23. #23
    Account Upgraded | Title Enabled! Dinosauru is offline
    MemberRank
    Mar 2008 Join Date
    Canada?Location
    610Posts

    Re: [Release]Fix Login Hack

    coo.thx

  24. #24
    Account Upgraded | Title Enabled! Cruceo is offline
    MemberRank
    Apr 2008 Join Date
    620Posts

    Re: [Release]Fix Login Hack

    Quote Originally Posted by Whymes View Post
    Try this to fix your error:

    Code:
    void Characters::connectGame(PlayerLogin* player, unsigned char *packet){
       int charid = getInt(packet);
          if(MySQL::checkChar(charid) != player->getUserid())
                return;
       LoginPacket::connectIP(player, charid);
    }
    Might want to edit the post.. this works on v7 but you must use the code i posted, reakwon said so on CEF,

    LMAO that's the fix I created and posted on my site ahahahaha

  25. #25
    Valued Member Gippo is offline
    MemberRank
    Apr 2008 Join Date
    139Posts

    Re: [Release]Fix Login Hack

    Code:
    MySQLM.cpp
    .\MySQLM.cpp(255) : warning C4101: 'mres' : unreferenced local variable
    .\MySQLM.cpp(256) : warning C4101: 'mrow' : unreferenced local variable
    .\MySQLM.cpp(271) : warning C4244: 'initializing' : conversion from 'my_ulonglong' to 'int', possible loss of data
    .\MySQLM.cpp(291) : warning C4244: 'initializing' : conversion from 'my_ulonglong' to 'int', possible loss of data
    Player.cpp
    Help



Page 1 of 2 12 LastLast

Advertisement