Jump to content

Destiny

Inactive Member
  • Posts

    82
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Posts posted by Destiny

  1. Metod log > more secure :

    #define ENABLE_SYSCHAT_NOTICE
    #define ENABLE_SYSLOG_NOTICE
    #define ENABLE_BAN_WAITHACK
    bool IS_SPEED_HACK(LPCHARACTER ch, LPCHARACTER victim, DWORD current_time)
    {
        if (ch->m_kAttackLog.dwVID == victim->GetVID())
        {
            if (current_time - ch->m_kAttackLog.dwTime < GET_ATTACK_SPEED(ch))
            {
                INCREASE_SPEED_HACK_COUNT(ch);
     
                if (test_server)
                {
                    sys_log(0, "%s attack hack! time (delta, limit)=(%u, %u) hack_count %d",
                            ch->GetName(),
                            current_time - ch->m_kAttackLog.dwTime,
                            GET_ATTACK_SPEED(ch),
                            ch->m_speed_hack_count);
     
                    ch->ChatPacket(CHAT_TYPE_INFO, "%s attack hack! time (delta, limit)=(%u, %u) hack_count %d",
                            ch->GetName(),
                            current_time - ch->m_kAttackLog.dwTime,
                            GET_ATTACK_SPEED(ch),
                            ch->m_speed_hack_count);
                }
     
                SET_ATTACK_TIME(ch, victim, current_time);
                SET_ATTACKED_TIME(ch, victim, current_time);
                return true;
            }
        }
     
        SET_ATTACK_TIME(ch, victim, current_time);
     
        if (victim->m_AttackedLog.dwPID == ch->GetPlayerID())
        {
            if (current_time - victim->m_AttackedLog.dwAttackedTime < GET_ATTACK_SPEED(ch))
            {
                INCREASE_SPEED_HACK_COUNT(ch);
                if (ch->m_speed_hack_count > 100)
                {
    #ifdef ENABLE_SYSLOG_NOTICE
                    sys_log(0, "%s Attack Speed HACK! time (delta, limit)=(%u, %u), hack_count = %d",
                            ch->GetName(),
                            current_time - victim->m_AttackedLog.dwAttackedTime,
                            GET_ATTACK_SPEED(ch),
                            ch->m_speed_hack_count);
    #endif
    #ifdef ENABLE_SYSCHAT_NOTICE
                    ch->ChatPacket(CHAT_TYPE_INFO, "A hack was detected , close it!",
                            ch->GetName(),
                            current_time - victim->m_AttackedLog.dwAttackedTime,
                            GET_ATTACK_SPEED(ch),
                            ch->m_speed_hack_count);
    #endif             
    #ifdef ENABLE_BAN_WAITHACK              
                    DBManager::instance().Query("INSERT INTO log.wait_hack SET login='%s', nickname='%s', ip='%s', time=NOW(), map_index=%d, server='%s';",
          ch->GetDesc()->GetAccountTable().login, ch->GetName(), ch->GetDesc()->GetHostName(), ch->GetMapIndex(), g_stHostname.c_str());
    #endif
                    ch->GetDesc()->DelayedDisconnect(3);
                }
                 
                SET_ATTACKED_TIME(ch, victim, current_time);
                return true;
            }
        }
     
        SET_ATTACKED_TIME(ch, victim, current_time);
        return false;
    }
    
    

    Create in database log a table with name : wait_hack

    /*
    Navicat MySQL Data Transfer
    
    Source Server         : test
    Source Server Version : 50613
    Source Host           : 
    Source Database       : log
    
    Target Server Type    : MYSQL
    Target Server Version : 50613
    File Encoding         : 65001
    
    Date: 2015-01-02 12:54:57
    */
    
    SET FOREIGN_KEY_CHECKS=0;
    
    -- ----------------------------
    -- Table structure for wait_hack
    -- ----------------------------
    DROP TABLE IF EXISTS `wait_hack`;
    CREATE TABLE `wait_hack` (
      `login` varchar(50) COLLATE big5_bin DEFAULT NULL,
      `nickname` varchar(50) COLLATE big5_bin DEFAULT NULL,
      `ip` varchar(50) COLLATE big5_bin DEFAULT NULL,
      `time` time DEFAULT NULL,
      `map_index` varchar(30) COLLATE big5_bin DEFAULT NULL,
      `server` varchar(30) COLLATE big5_bin DEFAULT NULL,
      `playtime` int(11) DEFAULT NULL
    ) ENGINE=MyISAM DEFAULT CHARSET=big5 COLLATE=big5_bin;
    

    It is more secure now .

    • Love 1
    • Love 6
  2. Wasn't a good ideea , but with >50 works fine now ;

    I'm pretty sure if you play ninja with daggers you will get banned :)

    The ninja character is the most secured , even you use hack you won't get ban so fast .

    i dont know why...

  3. I changed if (ch->m_speed_hack_count > 50) with if (ch->m_speed_hack_count > 5)

    And works verry good .

     

     

    I work on mainline sg ,pvm hard server ;

    This protection can cause fake result and ban a fair player ?

  4. char_item.cpp: In member function 'bool CHARACTER::IsEmptyItemGrid(TItemPos, BYTE, int) const':
    char_item.cpp:640: warning: comparison is always false due to limited range of data type
    char_item.cpp:666: warning: comparison is always false due to limited range of data type
    char_item.cpp: In member function 'bool CHARACTER::UseItemEx(CItem*, TItemPos)':
    char_item.cpp:2387: warning: format '%d' expects type 'int', but argument 6 has type 'long int'
    char_item.cpp:2391: warning: format '%d' expects type 'int', but argument 6 has type 'long int'
    char_item.cpp:2403: warning: format '%d' expects type 'int', but argument 5 has type 'long int'
    char_item.cpp:2407: warning: format '%d' expects type 'int', but argument 5 has type 'long int'
    char_item.cpp:2434: warning: format '%d' expects type 'int', but argument 6 has type 'long int'
    char_item.cpp:2442: warning: format '%d' expects type 'int', but argument 5 has type 'long int'
    char_item.cpp:5096: warning: comparison between signed and unsigned integer expressions
    char_item.cpp: In member function 'bool CHARACTER::UseItem(TItemPos, TItemPos)':
    char_item.cpp:5168: warning: unused variable 'wDestCell'
    char_item.cpp:5169: warning: unused variable 'bDestInven'
    char_item.cpp: At global scope:
    char_item.cpp:5685: error: ISO C++ forbids initialization of member 'is_allowed'
    char_item.cpp:5685: error: making 'is_allowed' static
    char_item.cpp:5685: error: ISO C++ forbids in-class initialization of non-const static member 'is_allowed'
    compile crc32.cpp
    char_item.cpp:5974: error: 'NPartyPickupPermission' has not been declared
    char_item.cpp:5974: error: expected constructor, destructor, or type conversion before 'funcCompareOwnershi             p'
    char_item.cpp:5975: error: expected constructor, destructor, or type conversion before '->' token
    char_item.cpp:5976: error: expected constructor, destructor, or type conversion before '=' token
    char_item.cpp:5977: error: expected unqualified-id before 'if'
    char_item.cpp: In member function 'bool CHARACTER::EquipItem(CItem*, int)':
    char_item.cpp:6201: warning: array subscript has type 'char'
    char_item.cpp: In member function 'void CHARACTER::BuffOnAttr_AddBuffsFromItem(CItem*)':
    char_item.cpp:6265: warning: comparison between signed and unsigned integer expressions
    char_item.cpp: In member function 'void CHARACTER::BuffOnAttr_RemoveBuffsFromItem(CItem*)':
    char_item.cpp:6277: warning: comparison between signed and unsigned integer expressions
    char_item.cpp: In member function 'bool CHARACTER::CanEquipNow(CItem*, const TItemPos&, const TItemPos&)':
    char_item.cpp:7463: warning: unused variable 'itemType'
    char_item.cpp:7464: warning: unused variable 'itemSubType'
     
    fail to compile
  5.  

    You didn't have to give the actual link to this kick hack.. now i have to make lib for 34k coz kids are playing around^

     

    Having the information public is the fastest way to get people to take action against it and the fix is in the thread. If you're able to create libs then it should be no problem for you

     

    Also having the hack we could test if the c++ fix works :D

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.