Advertisement
Kapa3a

fix exploid SQL inject messenger,guild

Nov 23rd, 2023
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.08 KB | Source Code | 0 0
  1. Fix Exploid 40k : Acest fix blocheaza noul exploit(SQL inject messenger,guild etc)
  2.  
  3. Sursa Game
  4. 1.Deschidem db.cpp si cautam :
  5. void DBManager::Query(const char * c_pszFormat, ...)
  6.  
  7. inlocuim  toata functia cu :
  8. void DBManager::Query(const char * c_pszFormat, ...)
  9. {
  10.     char szQuery[4096];
  11.     va_list args;
  12.  
  13.     va_start(args, c_pszFormat);
  14.     vsnprintf(szQuery, sizeof(szQuery), c_pszFormat, args);
  15.     va_end(args);
  16.     std::string sQuery(szQuery);
  17.  
  18.     m_sql.AsyncQuery(sQuery.substr(0,sQuery.find_first_of(";")==-1?sQuery.length(): sQuery.find_first_of(";")).c_str());
  19. }
  20.  
  21. 2.Cautam :
  22.  
  23. SQLMsg * DBManager::DirectQuery(const char * c_pszFormat, ...)
  24.  
  25. inlocuim toata funtia cu :
  26.  
  27. SQLMsg * DBManager::DirectQuery(const char * c_pszFormat, ...)
  28. {
  29.     char szQuery[4096];
  30.     va_list args;
  31.     va_start(args, c_pszFormat);
  32.     vsnprintf(szQuery, sizeof(szQuery), c_pszFormat, args);
  33.     va_end(args);
  34.     std::string sQuery(szQuery);
  35.     return m_sql_direct.DirectQuery(sQuery.substr(0, sQuery.find_first_of(";") == -1 ? sQuery.length() : sQuery.find_first_of(";")).c_str());
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement