I'm trying to make a tool which includes packet decryptation, however I'm stuck on decrypt results. My application gets KeyPacket and find the BF Key, then I use it with this formula:
public byte[] decryptRecv(byte[] raw, final int size)
{
if (!_isEnabled)
return null;
int temp = 0;
for (int i = 0; i < size; i++)
{
int temp2 = raw[i] & 0xFF;
raw[i] = (byte) (temp2 ^ _inKey[i&15] ^ temp);
temp = temp2;
}
int old = _inKey[8] &0xff;
old |= _inKey[9] << 8 &0xff00;
old |= _inKey[10] << 0x10 &0xff0000;
old |= _inKey[11] << 0x18 &0xff000000;
old += size;
_inKey[8] = (byte)(old &0xff);
_inKey[9] = (byte)(old >> 0x08 &0xff);
_inKey[10] = (byte)(old >> 0x10 &0xff);
_inKey[11] = (byte)(old >> 0x18 &0xff);
return raw;
}
This is the formula used by the emulators (gameserver part) but with the return of modified raw instead of void.
I checked if the hex key is fine, and it is.
Dunno if the conversion to byte is wrong, I'm using this:
public byte[] hexToBytes(String hex)
{
hex = hex.replaceAll(" ", "");
byte[] b = new BigInteger(hex, 16).toByteArray();
return b;
}
I'm comparing the decryptation results with PHX results. Once every 15 checks, it goes ok, but the others, some bytes are different from PHX.
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.
DISCORD :
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/hood-services
https://campsite.bio/utchihaamkt
Xmas Wolf Chariot Mount | Lineage 2 Mod
Celebrate the holiday spirit in Lineage 2 with this festive Xmas Wolf Chariot Mount! Created for protocol 166, this unique modification features majestic wolf mounts with holiday-themed harnesses pulling a decorative chariot.
If you have questions or want to add this updated skill to your game, feel free to contact me via Skype or Discord.
Download or in Discord Client Dev channel https://discord.gg/XdCb9dmTtf
06/12/2024 21:00 GMT +2
High Five - PvP server x45 - Aria Victoria Style 2004
NPC Buffer & Enchanted NPC Buffer.
Global Gatekeeper.
Clan Hall Teleports & Clan GM Shop (-20%).
Offline Shop.
GM shop up to B Grade.
Auto Farm system.
TvT - CTF - DM - Party Farm - Event Boss
Craftable Hero Weapon.
Instances Solo and Party, weekly and daily.
No kamael.
More informations can be found on our website including a "how to connect" greek guide
Valkyria is based on aCis
https://l2valkyria.com
Question
KaL
I'm trying to make a tool which includes packet decryptation, however I'm stuck on decrypt results. My application gets KeyPacket and find the BF Key, then I use it with this formula:
This is the formula used by the emulators (gameserver part) but with the return of modified raw instead of void.
I checked if the hex key is fine, and it is.
Dunno if the conversion to byte is wrong, I'm using this:
I'm comparing the decryptation results with PHX results. Once every 15 checks, it goes ok, but the others, some bytes are different from PHX.
For example:
RequestAuthLogin of PHX
Now, the same packet on my application:
Bold hex are different of PHX. Also, the differences are always at these bytes.
What am I doing wrong?
Thanks
0 answers to this question
Recommended Posts
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.