elitepvpers

elitepvpers (https://www.elitepvpers.com/forum/)
-   Nostale (https://www.elitepvpers.com/forum/nostale/)
-   -   [EU, Client] Cryptography (https://www.elitepvpers.com/forum/nostale/3935929-eu-client-cryptography.html)

BlowaXD 10/23/2017 12:32

Quote:

Originally Posted by -Nokis (Post 36418780)
The NosTale Client uses the Windows-1252 encoding. You have to encode ‘current_packet’ in win1252.

It's not a need.

WalrossGreat 10/23/2017 17:20

It is if you want properly encode/decode special characters like łśćń etc, however it's not always the win1252, it depends on your local 8 bit, eg it may be win1250

Bejine 10/23/2017 21:23

it depends on the client, some countries use 1250 (poland), others use 1252 (germany, i think)

lika85 11/05/2017 22:44

Ty guys :handsdown:, now getting packets works, but sending packet is buggy, what should i do to send right encoded packet? Better question is, what is the server encoding? :)

Cryless~ 11/22/2017 11:19

Quote:

Originally Posted by lika85 (Post 36453107)
Ty guys :handsdown:, now getting packets works, but sending packet is buggy, what should i do to send right encoded packet? Better question is, what is the server encoding? :)

Had you found an answer to your question? Let us know about your experience it might help someone else.

lika85 11/22/2017 21:43

Well i fount, that the right encoding for czech server is Latin 1, probably for other servers too, i am encoding the output of decryptGamePacket function, but sending chars from Latin 1 is still not working :(. I tried encode the input to encrypt function, the output too, with different encodings (latin 1,cp1250,cp1252), but the result on nostale server is "?" or space, sometimes when i write character from Latin 1, it cuts the packet, so if i send "say abcčd" i see "abc", but sometimes it is "abc?d" or "abc d"

-Nokis 12/05/2017 00:59

Quote:

Originally Posted by lika85 (Post 36493263)
Well i fount, that the right encoding for czech server is Latin 1, probably for other servers too, i am encoding the output of decryptGamePacket function, but sending chars from Latin 1 is still not working :(. I tried encode the input to encrypt function, the output too, with different encodings (latin 1,cp1250,cp1252), but the result on nostale server is "?" or space, sometimes when i write character from Latin 1, it cuts the packet, so if i send "say abcčd" i see "abc", but sometimes it is "abc?d" or "abc d"

The correct encoding for Czech is Windows-1250.
I think there's a problem with your encryption algorithm.

I suggest to use the C++ crypto for testing: pass a random string to the C++ encryption, compile it, do the same with your Java algorithm and check if the output is the same (encoding here doesn't matter, compare bytes from buffers). If not, compare step by step your algorithm with the C++ one.

lika85 12/05/2017 19:54

Quote:

Originally Posted by -Nokis (Post 36518549)
The correct encoding for Czech is Windows-1250.
I think there's a problem with your encryption algorithm.

I suggest to use the C++ crypto for testing: pass a random string to the C++ encryption, compile it, do the same with your Java algorithm and check if the output is the same (encoding here doesn't matter, compare bytes from buffers). If not, compare step by step your algorithm with the C++ one.

I've solved my problem. I was really dumb :D. I converted the buf string into byte array with the coding, and then converted the byte array to string. In java String has only UTF16 internlal coding. So it is working :cool:.

siuwing123 03/15/2018 13:18

after i include the cryptoPP library and compile.
#error <mutex> is not supported when compiling with /clr or /clr:pure.


All times are GMT +2. The time now is 10:58.

Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.