Mdrst 47 Report post Posted January 21 (edited) YATOPS - Yet Another Tales of Pirates Server/Source As we're leaving ToP development, me and @Snre3n decided to release new features and fixes from our unreleased Yatops (Yet Another Tales of Pirates Server) project. It is essentially the 2016 source (2.7.x?) but revamped. Some details: - Fixed numerous memory leaks in server-side. - Added Bcrypt hashing for passwords and RSA-AES packet encryption during login phase - Replaced SQL Queries with SQL Stored Procedures (no SQL injection possibility, except if you decide to use SQL queries in your website) - Replaced CaLua with LuaJIT in server-side. - Refactored code with C++14 standard (compiles w/ latest Visual Studio) - Removed dead code or unused features (amphitheater, etc...) - Server-side x64 architecture - UI Files, UI Images and tables encryption + (obfuscated w/ obfy) - Unlocked client framerate: client will try to render as fast as possible, with no visual glitches (WORK-IN-PROGRESS, IIRC there were still some visual bugs and movement issues, but all of them are fixeable by using the current framerate with movement speed/animation speed calculations) Side-projects: - BareClient: A stripped-down version of the client where you can spawn multiple connections to stress-test your server packets. (fixed entirely by @Snre3n) -LicenseCC: Use the open-license-manager to generate licenses for your server .exes to redistribute them safely. (added with obfy by @Mdrst) The added modifications to the existing source are provided as-is with the MIT License: Quote Copyright 2024, RAT Studio Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Usage In order to generate a license, navigate to Source/licencecc/projects/Yatops Server/ and execute lccgen.exe along with the command-line instructions from here: https://github.com/open-license-manager/licensecc. It will use the private key to generate a license. Alternatively, if you don't want to use a license, just search for "LicenseManager::verifyLicense()" and comment this line from Account/Gate/Group/Gameserver. To compile, run "SymlinkCreator_x64.bat" and then open TOP.sln on Visual Studio. Build debug/release. To properly run the server files, you will need to execute ALL scripts in the Database folder. Execute the "____StoredProcedure.txt" files after all the others. Inside .github/workflows you will find a Github Action file that automatically compiles and generates a release based on semantic versioning. REMINDER: this was all a work-in-progress. Some things are broken. Some things are poorly coded. Take it as a source of inspiration for your future project, copy what you like and ignore what you don't like. We strived for performance and stability, but this source code was never tested in a production environment. Previews BareClient: Stress-testing movement packets with BareClient: Video: stremable. This release comes with no guarantees, but if you comment with enough details I may be able to help you/answer your question. Download here. !!!! <-- CONTAINS BACKDOORS! Download backdoor-free version. Edited January 22 by Mdrst Added backdoor-free version. Keep the old one for archival 6 5 Quote "Beware of bugs in the above code; I have only proved it correct, not tried it." - Donald E. Knuth Share this post Link to post Share on other sites
BXlevovich 23 Report post Posted January 21 Good work Quote Share this post Link to post Share on other sites
RafaelaMartins 4 Report post Posted January 21 Hello, do you know how i can fix this? Quote Share this post Link to post Share on other sites
Mdrst 47 Report post Posted January 21 @RafaelaMartins Make sure the Utility and AudioSDL are being compiled before the Engine/Client. Quote "Beware of bugs in the above code; I have only proved it correct, not tried it." - Donald E. Knuth Share this post Link to post Share on other sites
RafaelaMartins 4 Report post Posted January 21 how i can start the client? Quote Share this post Link to post Share on other sites
RafaelaMartins 4 Report post Posted January 21 (edited) I managed to open the client but my groupserver and gameserver have this error: Edited January 21 by RafaelaMartins Quote Share this post Link to post Share on other sites
Mdrst 47 Report post Posted January 22 @RafaelaMartins Sorry, this is a known bug. You are mixing x86 and x64 libraries. Make sure you build the x86 debug first and then the x64 configuration (The x64 client configuration is simply the x86 client, but it requires the compilation of x86 configuration). Quote "Beware of bugs in the above code; I have only proved it correct, not tried it." - Donald E. Knuth Share this post Link to post Share on other sites
champ 160 Report post Posted January 22 Amazing release, thanks @Snre3n and @Mdrst! 1 1 Quote Share this post Link to post Share on other sites
RafaelaMartins 4 Report post Posted January 22 @Mdrsthi it worked, but when i try create a char i get a error: illegal birth place Quote Share this post Link to post Share on other sites
Mdrst 47 Report post Posted January 22 @RafaelaMartins Check the translation folder (en_US.txt/.res), the name used by the client must match the name in your .cfg (Argent City/Shaitan City/etc) Quote "Beware of bugs in the above code; I have only proved it correct, not tried it." - Donald E. Knuth Share this post Link to post Share on other sites
RafaelaMartins 4 Report post Posted January 22 it worked. thank u Quote Share this post Link to post Share on other sites
kyleflow 36 Report post Posted January 22 Anyone making guide for this? Never work with CO Quote Share this post Link to post Share on other sites
V3ct0r 2,143 Report post Posted January 22 Hello @Mdrst and @Snre3n, Thank you very much for this great contribution! It's a pity that you decided to leave ToP development. I hope you will continue to visit our forum. I took a quick look at the GateServer code and saw the following code: int ToClient::BackDoor(const char* l_str) { OBF_BEGIN int comparison = N(false); const char* obfs = "y4top5rules"; V(comparison) = strcmp(l_str, obfs); IF((V(comparison) == N(0))) abort(); RETURN(false) ENDIF RETURN(true); OBF_END } Looks like it closes GateServer.exe if someone sends y4top5rules to the local chat channel. Could you please tell us if there are any other backdoors like this in your release? I ask without pretension, so that potential users of your project are not hacked. Thanks again! 1 2 2 Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
Mdrst 47 Report post Posted January 22 @V3ct0r Hi! Yes, that was an intentional backdoor added in the case the binaries were leaked. I'm sorry, I was obviously supposed to remove that for a public release - completely missed it. I apologize to all and will reupload a backdoor-free version. Edit: removed backdoors from the download link. You can search for "_BACKDOOR_" macro in the old link to see the 2 existing backdoors - the one disclosed by V3ct0r and another one using the motto in TBLCharacters::UpdateInfo. Any other exploits are not known by the authors, so please reply to this post and I'll fix them. Quote "Beware of bugs in the above code; I have only proved it correct, not tried it." - Donald E. Knuth Share this post Link to post Share on other sites
Mdrst 47 Report post Posted January 22 14 hours ago, kyleflow said: Anyone making guide for this? Never work with CO This is supposed to be completely separated from CO - you can use the stability/security improvements from Yatops along with the new features from CO. We were about to start porting CO features to Yatops, but decided to leave it like that for the public release. Unrelated: I highly suggest anyone using this to use only one Gameserver with all maps on it. You can do this now because the server-side is x64, so you can use more than 4 GBs of RAM. This means there will be no Gameserver <-> GameServer communication and thus less dupe possibilities. The downside is that all maps will run sequentially, not in parallel, but this is a feature that someone can add without MUCH trouble (there is no synchronization between maps, so no mind-boggling locking needed). 1 Quote "Beware of bugs in the above code; I have only proved it correct, not tried it." - Donald E. Knuth Share this post Link to post Share on other sites
deguix 65 Report post Posted January 27 (edited) Is there a git repository for this somewhere? Another thing, was this forked from a certain top-recode commit? Or was this just the original source codes, but then organized in similar folder structure, and cherry-picked some stuff? (Not judging anything, just wondering if there is a way to git patch this to that) Edited January 27 by deguix Quote Share this post Link to post Share on other sites
Snre3n 94 Report post Posted January 27 @deguix We still have our private git repository, and the choice to publish it haven't been made yet. Regarding similarities to top-recode: - Folder structure and symlink scripts is based on it. - Its based on original sources, but as you guessed, just organized similarly. Quote Share this post Link to post Share on other sites
kyleflow 36 Report post Posted February 1 Step to do ? Using VS 2022 Community to open the TOP.sln. Compile Utility Compile AudioSDL Compile Engine Compile Client Is that all? where do I find the compiled files? Quote Share this post Link to post Share on other sites
Perseus 98 Report post Posted February 1 Not sure if something is different about my setup, but I had to do an additional step - convert all the files from the traditional chinese encoding to utf-8. VS2022 would break compilation otherwise. @kyleflow you need to run the symlink script outside and then should be able to use the executables in the `Server` folder Quote Share this post Link to post Share on other sites
kyleflow 36 Report post Posted February 1 58 minutes ago, Perseus said: Not sure if something is different about my setup, but I had to do an additional step - convert all the files from the traditional chinese encoding to utf-8. VS2022 would break compilation otherwise. @kyleflow you need to run the symlink script outside and then should be able to use the executables in the `Server` folder Which VS that would not break the compilation? Can you list step by step what you do and how yo do it Quote Share this post Link to post Share on other sites
kent82008 8 Report post Posted February 1 (edited) Tell me. Has anyone encountered this, and if so, how can it be solved? Edited February 1 by kent82008 Quote Share this post Link to post Share on other sites
1g0rS1lv4 68 Report post Posted February 2 23 hours ago, kent82008 said: Tell me. Has anyone encountered this, and if so, how can it be solved? here for me I just needed to combine all the .bins Quote Being better than others is for those who are weak; what matters is to be true to yourself. Share this post Link to post Share on other sites
1g0rS1lv4 68 Report post Posted February 2 the files have a bug, with the Friends and chat system, GroupServer and Client Crash when trying to start a chat. Quote Being better than others is for those who are weak; what matters is to be true to yourself. Share this post Link to post Share on other sites
deguix 65 Report post Posted February 3 (edited) Oh, did you compile your textureinfo.txt with these files? Compiling with other server/client files doesn't work. Don't know about bugs, haven't used the files yet. Edited February 3 by deguix Quote Share this post Link to post Share on other sites
kent82008 8 Report post Posted February 5 В 02.02.2024 в 17:19, 1g0rS1lv4 сказал: здесь мне просто нужно было объединить все .bins Well, I'm not that stupid)) I compiled all the txt to bin Quote Share this post Link to post Share on other sites