Jump to content
  • 0

l2scripts password encryption


Question

Posted

Hi everyone, im creating a acp for l2scripts server

 

Currently i havig problems to encrypt the password, i try with the common base64_encode(pack("H*",sha1($password))), but is not working

 

(The stored password has 88 char lenght instead 28)

 

Any one working with this source know how is the password encryption?

4 answers to this question

Recommended Posts

  • 0
Posted (edited)

The base64 encoded string of the 64 bytes is 88 character long. try base32 instead.

Edited by BruT
  • 0
Posted
On 3/2/2021 at 5:48 PM, MaXUN said:

Hi everyone, im creating a acp for l2scripts server

 

Currently i havig problems to encrypt the password, i try with the common base64_encode(pack("H*",sha1($password))), but is not working

 

(The stored password has 88 char lenght instead 28)

 

Any one working with this source know how is the password encryption?

 

Do you have access to the source? If yes you can check the encryption style though java.

If not you can write here. I have access in all Scripts sources i can paste you the part where it encrypt/decrypt the password. 

  • 0
Posted
On 3/4/2021 at 9:34 PM, Kara said:

 

Do you have access to the source? If yes you can check the encryption style though java.

If not you can write here. I have access in all Scripts sources i can paste you the part where it encrypt/decrypt the password. 

public String encrypt(String password) throws Exception
    {
        AbstractChecksum checksum = JacksumAPI.getChecksumInstance(name);
        checksum.setEncoding("BASE64");
        checksum.update(password.getBytes());
        return checksum.format("#CHECKSUM");
    }

 

@Kara i mean they are using the jacksumAPI but i cannot use that on NodeJS

  • 0
Posted
15 minutes ago, MaXUN said:

public String encrypt(String password) throws Exception
    {
        AbstractChecksum checksum = JacksumAPI.getChecksumInstance(name);
        checksum.setEncoding("BASE64");
        checksum.update(password.getBytes());
        return checksum.format("#CHECKSUM");
    }

 

@Kara i mean they are using the jacksumAPI but i cannot use that on NodeJS

 

I'm not familiar with JS but if you say so. If it's your problem or your client's project why don't you simply change the encoding to something similar to L2J ? 

Guest
This topic is now closed to further replies.
×
×
  • Create New...