Jump to content

L2 Acp (Account - Admin Control Panel)


Recommended Posts

10 minutes ago, .Elfocrash said:

What's the password hashing setting you are using?

I'm not at home now, but I think i left it as default.  Where can I confirm it ?

Im getting error 501 Invalid Password.

Link to comment
Share on other sites

22 hours ago, .Elfocrash said:

What's the password hashing setting you are using?

I'ts base64, the default.

 

"PasswordHashType": "Default",


I've tried to debug the code, on login, the password verification, runs this method:
 

        public static string ToL2Password(this string str)
        {
            if (Startup.Configuration.GetValue<string>("TargetServerType") == "L2OFF")
            {
                if (Startup.Configuration.GetValue<string>("PasswordHashType") == "Default")
                {
                    return L2OffCrypto.EncryptLegacyL2Password(str);
                }
                else
                {
                    return L2OffCrypto.EncryptMD5(str);
                }
            }
              /* and it always ends in choosing else, since the server is L2j, login works, change password doesnt*/
            else
            {
                SHA1 shA1 = SHA1.Create();
                byte[] bytes = new ASCIIEncoding().GetBytes(str);
                str = Convert.ToBase64String(shA1.ComputeHash(bytes));
                return str;
            }
        }

and it works for the login, but when it comes to changing the password, it always ends up in error 501 :
 

[HttpPost]
        [Route("changepass")]
        public async Task<IActionResult> ChangePassword([FromBody] ChangePassViewmodel model)
        {
            if (User.Identity.IsAuthenticated)
            {
                var accountName = HttpContext.GetUsername();

                var response = await _requestService.ChangePassword(accountName, model.CurrentPassword.ToLegacyL2Password(), model.NewPassword.ToL2Password());
                switch (response.ResponseCode)
                {
                    case 200:
                        return Content("ok");
                    case 500:
                        return Content(_localizer["Something went wrong!"]);
                    case 501:
                        return Content(_localizer["Invalid password!"]);
                }
            }
            return Unauthorized();
        }

And I don't get any error messages on the console either from the API or from the website.

Edited by abumini
extra content ^^
Link to comment
Share on other sites

  • 2 months later...

help me please when I try to log on the site of an error in the game server I'll post it here:

 

Exception in thread "Thread-9" java.lang.NoClassDefFoundError: com/google/gson/JsonParser
        at com.elfocrash.l2acp.L2ACPServer$RequestHandler.handle(L2ACPServer.java:71)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
        at sun.net.httpserver.AuthFilter.doFilter(Unknown Source)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
        at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(Unknown Source)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
        at sun.net.httpserver.ServerImpl$Exchange.run(Unknown Source)
        at sun.net.httpserver.ServerImpl$DefaultExecutor.execute(Unknown Source)
        at sun.net.httpserver.ServerImpl$Dispatcher.handle(Unknown Source)
        at sun.net.httpserver.ServerImpl$Dispatcher.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.google.gson.JsonParser
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 11 more

Link to comment
Share on other sites

16 hours ago, kslobaosp said:

help me please when I try to log on the site of an error in the game server I'll post it here:

You didn't reference the gson library.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
On 1/8/2019 at 10:23 PM, kslobaosp said:

Elfocrash Я поместил gson в lib игрового сервера и решил ее больше, теперь у меня проблема в сети :(

 

image.thumb.png.d403a5b69a41895969c41481980b821d.png

 

У меня похожая проблема.

 

P.S. I solved the problem using commit 5527abef518d665a4c3be89ca91a3ff57e423609.

The problem appeared after the transition to NetCore2.1

Edited by webdes27
Link to comment
Share on other sites

  • 2 weeks later...
On 5/2/2017 at 7:39 AM, Elfocrash said:


Security
L2ACP uses symmetric encryption for the payloads and an api key validation.
As long as they are changed you will have no problem with security. 
If you want to be 100% secure, make the server accept requests only from the ip that the site is hosted.
If you want to be 101% secure, then host them together and don't expose the api port.
 

 

@Elfocrash Thanks you for the beatiful code. But i have a question to you, and i hope not to offend you. Is the code still secure? i ask because the code was writed a few years ago and i must know if is secure. My apoligies if i offended you. Thanks

Edited by matiasf
Link to comment
Share on other sites

5 hours ago, matiasf said:

 

@Elfocrash Thanks you for the beatiful code. But i have a question to you, and i hope not to offend you. Is the code still secure? i ask because the code was writed a few years ago and i must know if is secure. My apoligies if i offended you. Thanks

It is, however I would advice you to change the api key to one of your own. On top of that, I would advice you use SSL on the l2 webserver but this is optional.

Link to comment
Share on other sites

Hello, amazing feature, is it possible to use with l2jsunrise or does the coding vary too much from acis?

Would I only need to adjust imports or need decent java skills to adapt?

Edited by lixxit
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




  • Posts

    • 💸 New discount coupon 5% 😎 boosti 😎
    • 💸 New discount coupon 5% 😎 boosti 😎
    • to my store : https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Telegram : https://t.me/ultrastore11 Whatsapp ; +212614849119  to my store : https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Telegram : https://t.me/ultrastore11 Whatsapp ; +212614849119
    • This is my first and last topic created on a Lineage Forum, because if there's one thing that causes headaches for a lot of people, it's the critical error, that's why I decided to share it...   I'm creating a server again and before starting configurations I started collecting dozens of customs, without realizing my system folder had 950MB of files, so I started to enter the game, every 1 to 2 hours my client was reaching the maximum limit of virtual memory of the game due to the absurd amount of customs inside the system folder, reaching the maximum limit of 2047MB virtual ram, automatically we get critical, regardless of the error that appears on your screen, "THE WORDS ARE IRRELEVANT, unless it is a critical error before the ram memory limit reaches its limit", if you are seeing "2047 MB", it means that the game's virtual memory has reached its limit, and this memory is not configurable due to the game being created on 32-bit architecture, so I significantly reduced the amount of customs within the system from 950MB to 625MB, so my client started to reach the maximum memory limit every 10 to 12h, a huge progress, but my goal was at least 24h before reaching the virtual memory limit (playing frantically), so I reduced the system's custom files from 625MB to 267MB, the result was a first virtual memory limit critical error appearing after 41h.   My client is H5, the only types of customs I added to the game were focused only on equipment, one of the main causes were these skins and cloaks, they consume a huge amount of MB's within the "system", the problem is not adding customs to the client, the problem is adapting a custom and adding it inside the system folder, the system folder was not created with the intention of storing a huge amount of files.   Adding customs to the system folder means significantly reducing the time your client can remain open before reaching the virtual ram limit and make no mistake, there are hundreds of different critical errors with a small summary of the cause of the error, but if the critical table shows 2047MB of RAM, the problem is only 1. Example: I can see 3, 5, 9 critical error with different messages, but if this table is showing 2047MB ram, the reason was the virtual memory limit, an important detail is that this 2047MB ram is not a "fixed message or information from your computer", this 2047MB only appear when the cause is the virtual ram limit, it means that when you get a critical error with random numbers of ram memory appearing, such as 358MB ram, 715MB ram, it means that the cause of this error has no connection with ram virtual memory.
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products  https://discord.gg/hoodservices https://campsite.bio/utchihaamkt
  • Topics

×
×
  • Create New...