Koray

VIP
  • Content Count

    490
  • Joined

  • Last visited

  • Days Won

    48

Koray last won the day on March 6

Koray had the most liked content!

Community Reputation

630 Unstoppable

About Koray

  • Rank
    Noble
  • Birthday 05/17/1986

Profile Information

  • Gender
    Not Telling
  • Location
    localhost

Contact Methods

  • Skype
    k.demircitr

Recent Profile Visitors

11,242 profile views
  1. Koray

    open Command for notice in guild?

    tutorial is not english but you can figure https://transfer.sh/i1zIP/lonca duyuru.zip
  2. Use it and enjoy your legit rat https://github.com/NationalSecurityAgency/ghidra/issues/85 https://github.com/NationalSecurityAgency/ghidra/issues/6 and many more... Instead of NSA's shit I recommend freeware IDA(https://www.hex-rays.com/products/ida/support/download_freeware.shtml)
  3. std::find is not exception safe. create a handler or iterate yourself.
  4. I used boost because it's already required dependecy from game server and I didn't want to add a new dependency for such a simple change., I'm sure there are more lightweight and simple alternatives here but I don't understand one thing, what's wrong with boost?
  5. Hello, I started to convert some server data files from .txt to .json. I intend to convert them more understandable and modern with these changes, also few bugs and a memory leak in the old system has been fixed. Currently only mob_drop_info.txt file is translated, then all .txt files and proto files will be added. Tutorial for mob_drop_info.txt game part: Add to service.h: #define ENABLE_JSON_GAME_FILES Add to stl.h inline std::wstring StringToWstring(std::string input) { std::wstring output(input.begin(), input.end()); return output; } inline std::string WstringToString(std::wstring input) { std::string output(input.begin(), input.end()); return output; } Search in input_db.cpp "%s/mob_drop_item.txt", LocaleService_GetBasePath().c_str()); Change with: #ifdef ENABLE_JSON_GAME_FILES "%s/mob_drop_item.json", LocaleService_GetBasePath().c_str()); #else "%s/mob_drop_item.txt", LocaleService_GetBasePath().c_str()); #endif Search: if (!ITEM_MANAGER::instance().ReadMonsterDropItemGroup(szMOBDropItemFileName)) Change with: #ifdef ENABLE_JSON_GAME_FILES if (!ITEM_MANAGER::instance().ReadMonsterDropItemGroupNew(szMOBDropItemFileName)) #else if (!ITEM_MANAGER::instance().ReadMonsterDropItemGroup(szMOBDropItemFileName)) #endif Search in item_manager.h: bool ReadDropItemGroup(const char * c_pszFileName); Add it under: #ifdef ENABLE_JSON_GAME_FILES bool ReadMonsterDropItemGroupNew(const char * c_pszFileName); #endif Add in item_manager_read_tables.cpp #ifdef ENABLE_JSON_GAME_FILES #include <fstream> #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/json_parser.hpp> #endif Search: bool ITEM_MANAGER::ReadMonsterDropItemGroup(const char * c_pszFileName) Change like this: https://vgy.me/FC4F2v.png Codes: https://gist.github.com/mq1n/f31e4f1130819c1404b1348c8b28613d Converter: https://github.com/mq1n/M2TxtToJson Note: You need c ++ 11 and boost property tree module to use this configuration.
  6. Koray

    ymir beta skills

    Looks awesome, better than current ones , will you share?
  7. Stackoverflow and google tabs, Hint: My first freebsd work
  8. Hello, I have created an automation tool for .core file backtrace analysis, after installing CoreWatcher to monitor a directory, it will automatically analyze when a .core file is created and save its records in a file. Usage: CoreWatcher <target_directory> Notes: You must modify command files according to your own files. File: target server file Core: target server file with .core extension. IMPORANT NOTE: You must put .locked postfix after than .core extension. bt: It's backtrace command. quit: It's required for break gdb dialog. https://github.com/mq1n/CoreWatcher/tree/master Have fun.
  9. Koray

    [EterPack Archiver] PackMakerLite

    ahahahahaha, thats really funny. Thanks for great tool it's so usefull.
  10. Hello, This problem occurred after I did switch game server to x64, Auth core broken in handshake phase. Have you ever experienced such a problem? I tried cryptopp 5.6.5 and 8.0 both have the same problem.
  11. Kori

    Can you please send me message in discord Kori#7056 

    1. Koray

      Koray

      check your discord

  12. Hello, I want share a simple addon for more effective debugging crashes and exceptions on Windows. Technical details about mini dump: https://docs.microsoft.com/en-us/windows/desktop/debug/minidump-files winminidump.c #define __LIBTHECORE__ #include "stdafx.h" #include "winminidump.h" #ifdef __WIN32__ #include <DbgHelp.h> #pragma comment(lib, "dbghelp.lib") // Custom minidump callback BOOL CALLBACK MiniDumpCallback(PVOID pParam, const PMINIDUMP_CALLBACK_INPUT pInput, PMINIDUMP_CALLBACK_OUTPUT pOutput) { BOOL bRet = FALSE; if (!pInput || !pOutput) return FALSE; switch (pInput->CallbackType) { case IncludeModuleCallback: { bRet = TRUE; } break; case IncludeThreadCallback: { bRet = TRUE; } break; case ModuleCallback: { if (!(pOutput->ModuleWriteFlags & ModuleReferencedByMemory)) { pOutput->ModuleWriteFlags &= (~ModuleWriteModule); } bRet = TRUE; } break; case ThreadCallback: { bRet = TRUE; } break; case ThreadExCallback: { bRet = TRUE; } break; case MemoryCallback: { bRet = FALSE; } break; case CancelCallback: break; } return bRet; } bool CreateMiniDump(EXCEPTION_POINTERS* pExceptionInfo) { fprintf(stderr, "Exception handled: %p", pExceptionInfo); if (IsDebuggerPresent()) DebugBreak(); char szProcessName[MAX_PATH]; GetModuleFileNameA(NULL, szProcessName, MAX_PATH); std::string strFileName = std::string(szProcessName); if (strFileName.size() > 0) { size_t iLastSlash = strFileName.find_last_of("\\/"); strFileName = strFileName.substr(iLastSlash + 1, strFileName.length() - iLastSlash); } time_t t; time(&t); struct tm *tinfo; tinfo = localtime(&t); char szDumpName[128]; strftime(szDumpName, sizeof(szDumpName), "dump%Y%m%d_%H%M%S.dmp", tinfo); char szDumpPath[256]; sprintf(szDumpPath, "%s_%s", strFileName.c_str(), szDumpName); HANDLE hFile = CreateFileA(szDumpPath, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); if (!hFile || hFile == INVALID_HANDLE_VALUE) { fprintf(stderr, "Exception dump file is not created. Error code: %u Path: %s", GetLastError(), szDumpPath); return false; } // Create the minidump MINIDUMP_EXCEPTION_INFORMATION mdei; mdei.ThreadId = GetCurrentThreadId(); mdei.ExceptionPointers = pExceptionInfo; mdei.ClientPointers = FALSE; MINIDUMP_CALLBACK_INFORMATION mci; mci.CallbackRoutine = (MINIDUMP_CALLBACK_ROUTINE)MiniDumpCallback; mci.CallbackParam = 0; MINIDUMP_TYPE mdt = (MINIDUMP_TYPE)(MiniDumpWithIndirectlyReferencedMemory | MiniDumpScanMemory); BOOL rv = MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hFile, mdt, (pExceptionInfo != 0) ? &mdei : 0, 0, &mci); if (!rv) { fprintf(stderr, "Exception dump can not created. Error code: %u", GetLastError()); } else { fprintf(stderr, "Exception dump successfully created."); } // Close the file CloseHandle(hFile); return true; } LONG WINAPI ExceptionFilter(EXCEPTION_POINTERS * pExceptionInfo) { if (pExceptionInfo && pExceptionInfo->ExceptionRecord) { if (pExceptionInfo->ExceptionRecord->ExceptionCode == EXCEPTION_STACK_OVERFLOW) { HANDLE hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)CreateMiniDump, pExceptionInfo, 0, NULL); if (hThread && hThread != INVALID_HANDLE_VALUE) { WaitForSingleObject(hThread, INFINITE); CloseHandle(hThread); } } else { CreateMiniDump(pExceptionInfo); } } return EXCEPTION_EXECUTE_HANDLER; } bool setup_minidump_generator() { if (SetUnhandledExceptionFilter(ExceptionFilter)) { fprintf(stderr, "Mini dump generator succesfully created!"); return true; } fprintf(stderr, "Mini dump generator can NOT created! Error code: %u", GetLastError()); return false; } #else bool setup_minidump_generator() { return true; } #endif winminidump.h #ifndef __INC_LIBTHECORE_WINMINIDUMP_H__ #define __INC_LIBTHECORE_WINMINIDUMP_H__ #ifdef __cplusplus extern "C" { #endif extern bool setup_minidump_generator(); #ifdef __cplusplus }; #endif #endif Copy .c file to ServerSrc\libthecore\src and .h file to ServerSrc\libthecore\include. Define new files to your Makefile or CMakeLists.txt, and to libthecore project from your server's visual studio solution Open game\src\main.cpp and call new header file #include "../../libthecore/include/winminidump.h" Now search for your entrypoint int main(int argc, char **argv) Add new lines at the beginning of the function if (setup_minidump_generator() == false) return 1; Open your db\src\main.cpp and call new header file #include "../../libthecore/include/winminidump.h" Now search for your entrypoint int main() Add new lines at the beginning of the function if (setup_minidump_generator() == false) return 1; If you are using rubinum's auth core you can implement same routine to "int main(int argc, char** argv)" function from auth\src\main.cpp If you take any exceptions after making these edits, The core will create a memory dump with the file name like CORE_FILE_NAME_dump_DATE.dmp and you can easily analyze this file via visual studio just like freebsd ".core" files.
  13. Koray

    AsyncSQL with std::mutex and std::thread

    You can edit a little more, I think it will look better. Use nullptr instead of NULL Please stop usage header guards in 2019, go for pragma once Use smart pointers instead of raw pointers Use lock_guard instead of lock manually everytime Clear dirty korean commands, unused veriables etc. Anyway thanks for publishing.
  14. Koray

    open i need info of dark protection

    It's not about balance the most of skill informations are wrong it can be outdated or just fake informed, Terror, S.Attack and so on it doesn't make correct calculations. If you want make best balance you must rewrite all affect based skill calculations.