Register for your free account! | Forgot your password?
Rust Cheats

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server > Metin2 PServer Guides & Strategies
You last visited: Today at 14:20

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[FIX][C++] SQL Injection in Messenger and Guild

Discussion on [FIX][C++] SQL Injection in Messenger and Guild within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old 03/09/2016, 09:16   #76
 
vbacoder's Avatar
 
elite*gold: 39
Join Date: Sep 2011
Posts: 1,198
Received Thanks: 251
Ich bräuchte dif für 41K Revision :/ wäre mega wenn jemand eine hätte :0
vbacoder is offline  
Old 03/14/2016, 19:32   #77
 
elite*gold: 0
Join Date: Nov 2012
Posts: 149
Received Thanks: 39
35k diff fix giebs es hier ?
Walion is offline  
Old 04/10/2016, 02:46   #78

 
9TAILS's Avatar
 
elite*gold: 1308
Join Date: Jun 2012
Posts: 1,104
Received Thanks: 74
Fixx für die 404 revision :

PHP Code:
This difference file has been created by IDA Pro

game
0018C7C8
01 00 


PHP Code:
This difference file has been created by IDA Pro

db
00076598
01 00 
AsyncSQL connect funktion auf 0 also player DB wird nicht gelöscht x)
9TAILS is offline  
Old 04/12/2016, 18:20   #79
 
Chaosnightx3's Avatar
 
elite*gold: 0
Join Date: Jun 2012
Posts: 340
Received Thanks: 114
Quote:
Originally Posted by saver345 View Post
Fixx für die 404 revision :

PHP Code:
This difference file has been created by IDA Pro

game
0018C7C8
01 00 


PHP Code:
This difference file has been created by IDA Pro

db
00076598
01 00 
AsyncSQL connect funktion auf 0 also player DB wird nicht gelöscht x)
Gibt wohl doch noch welche, die nicht mit dem Source arbeiten.
Gute Arbeit.
Chaosnightx3 is offline  
Old 04/16/2016, 00:09   #80
 
elite*gold: 0
Join Date: Mar 2014
Posts: 29
Received Thanks: 22
Good fix. Thanks
°Light° is offline  
Old 04/18/2016, 08:55   #81
 
-Exploit's Avatar
 
elite*gold: 320
The Black Market: 154/1/0
Join Date: May 2015
Posts: 3,441
Received Thanks: 383
Quote:
Originally Posted by MartPwnS ^ View Post
Some updates from the WoM2 side:
So hier mal ein paar Neuigkeiten von WoM2:

[For developers mostly | Hauptsächlich für Entwickler]

A nicer way to fix the original vulnerability and even save some queries (YAAYYYY!) is:
Eine bessere Lösung um die Originallücke zu stopfen und um ein paar Abfragen zu sparen ist die folgende:

Search for the following text in MessengerManager::RemoveFromList:
Sucht nach dem folgenden Text in ^
Code:
if (companion.size() == 0)
    return;
and add the following lines below of that:
und fügt die folgenden Zeilen danach ein:

Code:
if (!IsInList(account, companion))
    return;
Then add the following function to messenger_manager.cpp:
Jetzt könnt ihr die folgende Funktion in der ^ hinzufügen:
Code:
bool MessengerManager::IsInList(MessengerManager::keyA account, MessengerManager::keyA companion)
{
    if (m_Relation.find(account) == m_Relation.end())
        return false;

    if (m_Relation[account].empty())
        return false;

    return m_Relation[account].find(companion) != m_Relation[account].end();
}
and ofc dont forget to declare it in messenger_manager.h:
und natürlich auch nicht vergessen diese in ^ zu deklarieren:
Code:
bool    IsInList(MessengerManager::keyA account, MessengerManager::keyA companion);
PS: Der Original fix ist nicht schlecht lediglich etwas am Ziel vorbei (funktionieren tut er auch)
PS: The original fix is not bad its just a little bit over the top (it works perfectly fine )

Kind regards
Mit freundlichen Grüßen
MartPwnS for WoM2
Bitte um Hilfe

Ist die messenger_manager.h so richtig?

PHP Code:
#ifndef __INC_MESSENGER_MANAGER_H
#define __INC_MESSENGER_MANAGER_H

#include "db.h"

class MessengerManager : public singleton<MessengerManager>
{
    public:
        
typedef std::string keyT;
        
typedef const std::string keyA;

        
MessengerManager();
        
virtual ~MessengerManager();

    public:
        
void    P2PLogin(keyA account);
        
void    P2PLogout(keyA account);

        
void    Login(keyA account);
        
void    Logout(keyA account);

        
void    RequestToAdd(LPCHARACTER chLPCHARACTER target);
        
void    AuthToAdd(keyA accountkeyA companionbool bDeny);

        
void    __AddToList(keyA accountkeyA companion);    // 실제 m_Relation, m_InverseRelation 수정하는 메소드
        
void    AddToList(keyA accountkeyA companion);

        
void    __RemoveFromList(keyA accountkeyA companion); // 실제 m_Relation, m_InverseRelation 수정하는 메소드
        
void    RemoveFromList(keyA accountkeyA companion);    

        
void    RemoveAllList(keyA account);

        
void    Initialize();

    private:
        
void    SendList(keyA account);
        
void    SendLogin(keyA accountkeyA companion);
        
void    SendLogout(keyA accountkeyA companion);

        
void    LoadList(SQLMsg pmsg);

        
void    Destroy();

        
std::set<keyT>            m_set_loginAccount;
        
std::map<keyTstd::set<keyT> >    m_Relation;
        
std::map<keyTstd::set<keyT> >    m_InverseRelation;
        
std::set<DWORD>            m_set_requestToAdd;
        
        
bool    IsInList(MessengerManager::keyA accountMessengerManager::keyA companion);
};

#endif 
-Exploit is offline  
Old 08/11/2016, 18:22   #82
 
elite*gold: 0
Join Date: Aug 2016
Posts: 50
Received Thanks: 14
ty bro
Karakaya~ is offline  
Old 09/04/2016, 19:42   #83
 
elite*gold: 0
Join Date: Nov 2012
Posts: 149
Received Thanks: 39
Hatt jemand 35k files fix Dif ?
Walion is offline  
Reply


Similar Threads Similar Threads
Small Help needed to fix the icons on messenger/guild
08/08/2015 - Flyff Private Server - 2 Replies
Hello guys, i just need a little help or guide on how do i fix the icons for each job in the friend list or messenger list. cause my messenger looks like this : Messenger Icons Error i need to correct the icons same with the guild view Guild Icon Error wrong icons ... Thanks in advance
[B) What´s App Messenger
12/14/2012 - elite*gold Trading - 20 Replies
Hey Leute ich biete euch hiermit einen Code für den iTunes US Store an! Dieser Code beinhaltet den Download von dem What´s App Messenger! Sofortkauf 30 e*G! Ich wiederhole, dieser Code funktioniert nur auf dem US iTunes Store!
Messenger Bug ?
07/19/2012 - Combat Arms - 2 Replies
Leute bei Combat Arms geht der Messenger garnicht und mit dem Clan kann ich garnicht sprechen alle sind Offline ist das nur bei mir oder bei vielen ? Und wie bekommt mann das wieder zurück ?
Tcp Messenger
06/21/2010 - AutoIt - 8 Replies
Hi wieder mal ein Problem:rtfm: Möchte nun Von meinem Tcp,Client was zu meinem Tcp,Server senden eine Nahricht möchte diese aber nicht immer im code ändern habe dazu eine Inputbox gemacht möchte nun das der text der in der inputbox ist gesendet wird mein code sieht bisher so aus TCPStartup() $verbindung = TCPConnect("127.0.0.1", 4322) $message=Inputbox("Msg Transmitter","Bitte Gib deine Nahricht ein.") If $verbindung = -1 Then MsgBox(16, "Error", "Die Verbindung zum Server...



All times are GMT +1. The time now is 14:21.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.