bRO's client asking for PIN Code on log in

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

iMikeLance
Moderators
Moderators
Posts: 208
Joined: 01 Feb 2010, 17:37
Noob?: No
Location: Brazil - MG

Re: bRO's client asking for PIN Code on log in

#31 Post by iMikeLance »

ever_boy_ wrote:
EternalHarvest wrote:
ever_boy_ wrote:Well, yeah, I got to find out how to do that.. tried to use 'print' command but didn't work.

Code: Select all

use Data::Dumper;
Log::message(Dumper \$var);
it says the same as before: "global symbol @keys requires explicit package name".

edit: got it. thanks.


everything looks "fine", execpt for the accountID, which is shown as: ?ú¬'
is that right?
unpack('V', $args->{accountID});
ever_boy_
Developers
Developers
Posts: 308
Joined: 06 Jul 2012, 13:44
Noob?: No

Re: bRO's client asking for PIN Code on log in

#32 Post by ever_boy_ »

thanks. works perfectly, with 'H*'.
now how about the 4 random bytes... could they be a key?

when everything's in place, this:

Code: Select all

$self->sendToServer($msg);
should it look exactly like the 08B8 packet in wireshark? (b8 08 XX XX XX XX YY YY YY YY)
iMikeLance
Moderators
Moderators
Posts: 208
Joined: 01 Feb 2010, 17:37
Noob?: No
Location: Brazil - MG

Re: bRO's client asking for PIN Code on log in

#33 Post by iMikeLance »

ever_boy_ wrote:
iMikeLance wrote:Also 08B9 is received AFTER inputing pin code and selecting your char.
It's a bit confusing here. BEFORE entering the pin, I get the 08B9 packet together with the char list info. At this point, it contains my account ID:

b9 08 45 4e 7e 05 XX XX XX XX 01 00
Are you sure?
Image
If you're right then maybe we should send another packet after receiving charlist in order to bring up the PIN window?
ever_boy_
Developers
Developers
Posts: 308
Joined: 06 Jul 2012, 13:44
Noob?: No

Re: bRO's client asking for PIN Code on log in

#34 Post by ever_boy_ »

iMikeLance wrote: Are you sure?
If you're right then maybe we should send another packet after receiving charlist in order to bring up the PIN window?
Yeah, pretty sure. As I said some pages ago, the first 08B9 packet comes "in the same flow" as the 08D2, right at the end of it. At this point, it contains: packet's ID, 4 random bytes, 4 bytes for accountID, 2 bytes for a flag.
After you enter your pin code, this 08B9 packet shows up again, but this time it is completely null, except for the packet's ID.

Now I know what is sent, and when is sent. Just need to figure out how to properly build the packet, since it seems to be different from mRO.


In ServerType0.pm, both sendLoginPinCode and sendStoragePassword are sharing this piece of code:

Code: Select all

$msg = pack("C C v", 0x3B, 0x02, $type)
in this case, should bRO's sendPinLogin share the same piece as SendStoragePassword?
If so, I would have it replaced for:

Code: Select all

$msg = pack("v v", 0x0968, $type)
how about that?
iMikeLance
Moderators
Moderators
Posts: 208
Joined: 01 Feb 2010, 17:37
Noob?: No
Location: Brazil - MG

Re: bRO's client asking for PIN Code on log in

#35 Post by iMikeLance »

Ignore this post, already discovered why and solving it.
ever_boy_ wrote:
iMikeLance wrote: Are you sure?
If you're right then maybe we should send another packet after receiving charlist in order to bring up the PIN window?


Yeah, pretty sure. As I said some pages ago, the first 08B9 packet comes "in the same flow" as the 08D2, right at the end of it. At this point, it contains: packet's ID, 4 random bytes, 4 bytes for accountID, 2 bytes for a flag.
After you enter your pin code, this 08B9 packet shows up again, but this time it is completely null, except for the packet's ID.[/code]

how about that?

Just sniffed that part and indeed 08B9 is at the end of received_characters (082D) as you can see below:
Image
The problem is: in this situation 08B9 is being ignored by Openkore, as it wasn't received. It's not being recognized as a part of 082D either.
Kurama
Noob
Noob
Posts: 19
Joined: 13 Dec 2012, 17:26
Noob?: No

Re: bRO's client asking for PIN Code on log in

#36 Post by Kurama »

08B9 isnt ignored .-.
iMikeLance
Moderators
Moderators
Posts: 208
Joined: 01 Feb 2010, 17:37
Noob?: No
Location: Brazil - MG

Re: bRO's client asking for PIN Code on log in

#37 Post by iMikeLance »

Kurama wrote:08B9 isnt ignored .-.
If you unset "char" parameter it is. I'll fix it later.
ever_boy_
Developers
Developers
Posts: 308
Joined: 06 Jul 2012, 13:44
Noob?: No

Re: bRO's client asking for PIN Code on log in

#38 Post by ever_boy_ »

Hmm.. I didnt get that last part. Did you find the formula or not?
So, how many bytes should have in the packet sent by kore?
Kurama
Noob
Noob
Posts: 19
Joined: 13 Dec 2012, 17:26
Noob?: No

Re: bRO's client asking for PIN Code on log in

#39 Post by Kurama »

10?

ID + accountid + pin?
iMikeLance
Moderators
Moderators
Posts: 208
Joined: 01 Feb 2010, 17:37
Noob?: No
Location: Brazil - MG

Re: bRO's client asking for PIN Code on log in

#40 Post by iMikeLance »

ever_boy_ wrote:Hmm.. I didnt get that last part. Did you find the formula or not?
So, how many bytes should have in the packet sent by kore?
If you're sure that the "send PIN" packet is 08B8 it should be 10bytes (2bytes for packetID, 8bytes for the packet content itself (maybe accoutid+encryptedPIN). I just built the receive handler, seems like i'm stuck in the same situation as you are. I'll look into it tomorrow, I don't have much time now.