Jump to content

Koray

Active Member
  • Posts

    384
  • Joined

  • Last visited

  • Days Won

    58
  • Feedback

    0%

Everything posted by Koray

  1. Stackoverflow and google tabs, Hint: My first freebsd work ?
  2. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) 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. Have fun.
  3. ahahahahaha, thats really funny. Thanks for great tool it's so usefull.
  4. 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.
  5. M2 Download Center Download Here ( Internal ) Hello, I want share a simple addon for more effective debugging crashes and exceptions on Windows. Technical details about mini dump: [Hidden Content] 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.
  6. 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.
  7. 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.
  8. You can change encryption protocol with tls, probably it will solve your issue. git config --global --add http.sslVersion tlsv1.0
  9. I don't tested ingame just looked a little bit to codes probably there is have a memory leak, doesn't exist any exception handler and a typo issue. you can modify with; (not tested)
  10. [Hidden Content] [Hidden Content] [Hidden Content] [Hidden Content] Also you can look at to Ultralight; [Hidden Content]
  11. Do it yourself via C++ API; [Hidden Content]
  12. Great news! Since than 2014 to 2 weeks ago how much people scammed/infected, do you have a idea?
  13. I can bet nobody cares this thread and content, they will still continue to take it for "protection". Look at to him repulation and remember comments on his sale thread, and finally remember that the account is still not banned despite all the cancer content. In this community there are a lot of braindead peoples.
  14. Pretty usefull for unpack documentation
  15. this. And leaked version is not strong, Is not so useful.
  16. https://steamdb.info/app/550900/subs/
×
×
  • 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.