openkore icon indicating copy to clipboard operation
openkore copied to clipboard

unkown switch 083E

Open WraithDead opened this issue 9 years ago • 16 comments

Hi everybody,

On a private server with no protection, nor gameguard, nor hashield, I keep having "Packet tokenizer unknown switch 083E" and a timeout on account server. Im 100% having the wright ip, port, version and masterversion.

I extracted the recvpackets.txt using PEEK and this packet have been classified as 083E 26, however I keep having this unkown switch 083E and absolutely can't connect to the server.

I know my login are wright but it is like it would be wrong, or maybe openkore isn't able to manage the login informations.

I also tryed bypassing it by adding 083E 0 in every recvpackets but I got the same exact result.

Can someone help me actually finding it out ? I would really appreciate

WraithDead avatar Jul 01 '17 20:07 WraithDead

Server?

Sent from my SPRD SMART MAX 4.0 PLUS using FastHub

sctnightcore avatar Jul 01 '17 22:07 sctnightcore

Please, read the FAQ http://openkore.com/index.php/Frequently_Asked_Questions#Packet_Tokenizer:_Unknown_switch:_xxxx

Packet Tokenizer: Unknown switch: xxxx Value that is supposed to be a packet switch is not found in recvpackets.txt, so packet length is not known.

lututui avatar Jul 02 '17 00:07 lututui

@sctnightcore server : https://kusanagi-legend.cf/ link to full client : chrome-extension://bigefpfhnfcobdlfbedofhhaibnlghod/mega/secure.html#!bst1HSIQ!LbPzcW5G1348Ld9OnYglanirJCG_347Ezr4TOjdbLB4

@lututui I actually started by reading the faq and the forums related comments, I actually have this packet in every recvpackets.txt as 083E 26. Maybe I shall try other values like 083E 1, 083E 2, 083E 3, etc

Also, it is the latest openkore that I downloaded.

I also put the encryption packets provided by PEEK in send servertypes in every order but didn't change anything. image

That's what i get when I set 083E 26 to 083E 0 : image We can see that it actually does 26 bytes, but when I set 083E 26 I have unkown switch

That's what happen on whireshark when entering a wrong login in game : image

And here with a good login in game : image

The following part looks wierd to me, could it be a custom login packets ? image

It seems that when openkore is logging in, the server return that the username doesn't exist or wrong password.

That's what whireshark recorded when openkore was trying to logging in : image

So I guess I have to make openkore send this part to, which may be needed for logging in the game : image

I found this in ServerType0.pm : image

Do anybody know how to do it ?

Thank you for your help

WraithDead avatar Jul 02 '17 04:07 WraithDead

md5 hash .Enable in u sv settings the clientHash containing the 16 bytes inside packet 0x0204( 04 02 xxxxxxxxxxxxxxxx). 083E is error. end of line.

ghost avatar Jul 03 '17 16:07 ghost

@Slipxxliose Skylord thank you mate it worked

I didn't knew about "clienthash" until know.

I can know log on account server, and the character server successfully.

Unfortunately, Im stuck once again, this time on the map server.

Here is is the error : image

With WPE PRO I compared the sended code by openkore when trying to connect to map server (left) and the sended code when I connect mannualy (right) :

wpe

The trouble seem to come from here ; kore is sending this : image and disconnect right after without receiving nothing.

while a manually connexion would send this : image and receinving a response.

Do you know how to send the hex string for this case ?

Thanx you again

WraithDead avatar Jul 04 '17 04:07 WraithDead

@kou90258 thank you for the explanation mate, I have a better undestanding of how it actually works.

So when I delete '022D' => ['map_login', 'a4 a4 a4 V C', [qw(accountID charID sessionID tick sex)]], in Send Servertype RagexeRE_2013_08_07a, and add '63C4' => ['map_login', 'a4 a4 a4 V C', [qw(accountID charID sessionID tick sex)]], kore return this error when logging in : image

If I set '63C4' => ['map_login', 'a4 a4 a4 V C', [qw(accountID charID sessionID tick sex)]], before and after '022D' => ['map_login', 'a4 a4 a4 V C', [qw(accountID charID sessionID tick sex)]], I then still get this : image

kore is starting to send the Account ID packets but not until the end and nor with the Character ID packets.

Edit : I did get rid of the error on first figure by deleting map_login 022D and adding map_login 63C4 in handlers, anyway Im still providing a full packet string with 022D or an incomplete packet string with 63C4. Leading me in both case to not be able to connect.

It is that I forgot something ?

Thanx you

WraithDead avatar Jul 04 '17 19:07 WraithDead

issues_642

ghost avatar Jul 06 '17 13:07 ghost

Connecting to account server Sent packet : 0064 [55 bytes] [Account Server Login] '0064' => ['master_login', 'V Z24 Z24 C', [qw(version username password master_version)]],

<< Received packet: 0069 - Account Info [207 bytes] '0069' => ['account_server_info', 'x2 a4 a4 a4 a4 a26 C a*', [qw(sessionID accountID sessionID2 lastLoginIP lastLoginTime accountSex serverInfo)]],

----------Account Info------- Account ID: Sex: Session ID:

---------------------- Servers ---------------------- -Name---------------------------Users IP----------------------------Port 0__XXXXXXXXX____27__________XXX.XX.XXX.XXXX__________________XXXX

Closing connection to the account server Disconnected (IP: port)...[M/D H : m : s Y.??] has been disconnected Selected server: XXXXXXXX Connecting to Character server ... Connecting (IP: port)...[M/D H : m : s Y.??] Connected

Sent packet : 0065 [17 bytes] [Character Server Login] '0065' => ['game_login', 'a4 a4 a4 v C', [qw(accountID sessionID sessionID2 userLevel accountSex)]],

Received packet: 082D [29 bytes] '082D' => ['received_characters', 'x2 C5 x20 a*', [qw(normal_slot premium_slot billing_slot producible_slot valid_slot charInfo)]],

<< Received packet: 09A0 [ 6 bytes] '09A0' => ['sync_received_characters', 'V', [qw(sync_Count)]],

Sent packet : 09A1 [ 2 bytes] '09A1' => ['sync_received_characters'],

<< Received packet: 099D [445 bytes] '099D' => ['received_characters', 'v a*', [qw(len charInfo)]],

Sent packet : 09A1 [ 2 bytes]
'09A1' => ['sync_received_characters'],

<< Received packet: 099D [ 4 bytes] '099D' => ['received_characters', 'v a*', [qw(len charInfo)]],

Sent packet : 09A1 [ 2 bytes] '09A1' => ['sync_received_characters'],

<< Received packet: 08B9 [12 bytes] '08B9' => ['login_pin_code_request', 'V a4 v', [qw(seed accountID flag)]],

Server requested PIN password in order to select your character. Sent packet : 08B8 [10 bytes]
'08B8' => ['send_pin_password','a4 Z*', [qw(accountID pin)]], << Received packet: 08B9 [12 bytes] '08B9' => ['login_pin_code_request', 'V a4 v', [qw(seed accountID flag)]],

PIN code is correct. --------------Character List----------- Slot 0: ID (profession, level ??/??) Sent packet : 0066 [ 3 bytes] [Char Login] '0066' => ['char_login', 'C', [qw(slot)]], Received packet: 0071 - Received character ID and Map IP from Game Login Server [28 bytes] '0071' => ['received_character_ID_and_Map', 'a4 Z16 a4 v', [qw(charID mapName mapIP mapPort)]],

The character ID and map IP are accepted from the character server

---------- game information ----------- character ID: Map name: Map IP: Map Port:

Closing connection to the character server Disconnected (IP: port)...[M/D H : m : s Y.??] has been disconnected Connecting to a map server ... Connecting (IP: port)...[M/D H : m : s Y.??] Connected

[encryptMessageID] Encrypted MID: [XXXX]->[XXXX] / KEY: [XxXXXX]->[XxXXXX] Sent packet : XXXX [19 bytes] shuffles map_login

<< Received packet: 0283 [ 6 bytes] '0283' => ['account_id', 'a4', [qw(accountID)]], << Received packet: 02EB [13 bytes] '02EB' => ['map_loaded', 'V a3 x2 v', [qw(syncMapSync coords unknown)]], [encryptMessageID] [XXXX]->[XXXX] / KEY: [XxXXXX]->[XxXXXX] shuffles Sent packet : XXXX [ 2 bytes] [Guild First Query] 'XXXX' => ['guild_check'], # len 2 [encryptMessageID] [XXXX]->[XXXX] / KEY: [XxXXXX]->[XxXXXX] shuffles Sent packet : XXXX [ 6 bytes] [Guild Query Page] [encryptMessageID] [XXXX]->[XXXX] / KEY: [XxXXXX]->[XxXXXX] shuffles 'XXXX' => ['guild_info_request', 'V', [qw(type)]], Sent packet : XXXX [ 6 bytes] [Guild Query Page] 'XXXX' => ['guild_info_request', 'V', [qw(type)]], You are now in the game

[encryptMessageID] [XXXX]->[XXXX] / KEY: [XxXXXX]->[XxXXXX] shuffles Sent packet : 007D [ 2 bytes] [Map Loaded] '007D' => ['map_loaded'], Your coordinates: XXX, XXX

ghost avatar Jul 06 '17 13:07 ghost

Extract the recvpackets, and enable cryptKeys

ghost avatar Jul 07 '17 14:07 ghost

@kou90258 Thank you mate it is very interesting stuff, Im know seeing better how it actually goes.

I was able to join the server by adding 08B8 in Sent and 08B9 in receive and by replacing 022D by '63C4' => ['map_login', 'a4 a4 a4 V C', [qw(accountID charID sessionID tick sex)]], but with keeping map_login 022D in handlers (otherwise it doesn't connect).

Unfortunately, as soon as the bot try to move, I have a "Disconnected from Map Server" as we can see : image

We can also see that my computer doesn't handle korean symbols which are written in "???? ??" But I don't think it is related to the "Disconnected from Map Server" trouble.

@Slipxxliose yes I did with PEEK and I set the cryptKeys in server.txt and in the Sent serverType RagexeRE_2013_08_07a.

Actually PEEK encounter this error : image

and I couldn't connect with PEEK, however a PacketLengths_20140205.ini has been generated which I used as recvpackets.txt but I guess it may be wrong or at least incomplete as it seems to be a standard file dated to 05/02/2014.

Maybe the issue is that I should have the right recvpackets.txt, however until know I didn't know how to get them manually. (here is a link to the client http://www.filedropper.com/kusanagi if you would like to solve it)

At the point I don't really get why im "Disconnected from Map Server" straight after moving.

Edit : after searching here and there it seem that openkore is getting DC because the cryptKeys are wrong. But if PEEK could not provide the true ones for this Client therefore I don't really know how to get them.

Anyway thank you guys for helping me in figuring it out, I really appreciate it.

WraithDead avatar Jul 07 '17 18:07 WraithDead

[you're now in the map channl for albrta] change map? disconnected form map server.

The error. Please check. openkore/src/Network/Receive/ServerType0.pm '0091' => ['map_change', 'Z16 v2', [qw(map x y)]], '0092' => ['map_changed', 'Z16 v2 a4 v', [qw(map x y IP port)]], # 28 '0073' => ['map_loaded', 'V a3', [qw(syncMapSync coords)]], openkore/src/Network/Receive/ServerType0.pm line 2015.@sub map_changed {

fields/alberta.gat.gz? tables/???/maps.txt?

ghost avatar Jul 08 '17 12:07 ghost

@kou90258 I do have 0091, 0092 and 0073 defined like that in Receive/ServerType0.pm

I got alberta.rsw and alberta.gat in maps.txt. In "fields/" I don't have alberta.gat.gz but alberta.fld.gz.

However it is doing this DC on every map.

Everything is looking like I got wrong cryptkeys but on the other hand, when I try to connect without cryptKey or with another order then it doesn't work, only the 1,3,2 cryptKey provided by PEEK are allowing me to connect. Which make me thinking that they could be fine afterall.

I solved the "????" symbols but it didn't affected the DC occurence.

Im quite confuse actually, do you think I should extract all the map from grf and add them to field ?

Thank you for your help here

WraithDead avatar Jul 08 '17 17:07 WraithDead

No. There are not wrong with your map fields. The problem is actually your serverType looks like incorrect. Read the wiki, about the Connectivity Guide

ghost avatar Jul 09 '17 09:07 ghost

@WraithDead are we all good with this now?

kaliwanagan avatar Jul 21 '17 19:07 kaliwanagan

No. His server is 05/02/2014. and he is tryin to use 2013.^^ That is the error. I dont know if kore will support it but its okay.

ghost avatar Jul 28 '17 16:07 ghost

Download new openkore . Please test again. I have solved it already.

sctnightcore avatar Nov 17 '17 02:11 sctnightcore