Jump to content
  • 0

Help l2scripts password encryption


MaXUN
 Share

Question

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?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
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. 

Link to comment
Share on other sites

  • 0
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

Link to comment
Share on other sites

  • 0
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 ? 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



  • Posts

    • try to do this:   Magic Human -> Fighter Human Magic Orc       -> Fighter Orc   or vice versa   stuck will happen ALWAYS
    • player.decayMe(); player.spawnMe();   mobius c6 does use it. dunno if other c6 use it tho. but if im not wrong mobius is based on acis   below u can see the code for the item im using. most likely can be improved since im a beginer. (note that this code is not from c6 but newer version so it needs changes but .decayMe and .spawnMe where used in c6).   /* * This file is part of the L2J Mobius project. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package handlers.itemhandlers; import org.l2jmobius.gameserver.handler.IItemHandler; import org.l2jmobius.gameserver.model.actor.Playable; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.item.instance.Item; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; /** * @author Drazeal */ public class SexChange implements IItemHandler { /* * (non-Javadoc) * @see org.l2jmobius.gameserver.handler.IItemHandler#useItem(org.l2jmobius.gameserver.model.actor.Playable, org.l2jmobius.gameserver.model.items.instance.ItemInstance, boolean) */ @Override public boolean useItem(Playable playable, Item item, boolean forceUse) { if (!(playable instanceof Player)) { return true; } Player player = (Player) playable; MagicSkillUse msk; if (player.isInCombat()) { player.sendMessage("Cannot use while in combat."); return false; } if (player.isInOlympiadMode() || player.isInDuel() || player.isOnEvent()) { player.sendMessage("Cannot use while in Olympiad/Duel/Event."); return false; } if (player.getAppearance().isFemale()) { player.getAppearance().setMale(); } else { player.getAppearance().setFemale(); } msk = new MagicSkillUse(player, player, 837, 1, 1000, 0); Broadcast.toSelfAndKnownPlayersInRadius(player, msk, 1500); player.sendMessage("Your gender has been changed"); player.broadcastUserInfo(); player.decayMe(); player.spawnMe(); player.destroyItem("Consume", item.getObjectId(), 1, null, false); return false; } }  
    • Any news????? Is anything aight so far?
    • Hello can anyone share the russian system folder master class (latest from official 4games)?   ty
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock