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

Kurama
Noob
Noob
Posts: 19
Joined: 13 Dec 2012, 17:26
Noob?: No

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

#91 Post by Kurama »

to create "Pin window"

edit--
i can make a dll with this function, is this useful?
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

#92 Post by ever_boy_ »

EternalHarvestest

This doesn't seem to be working as intended:

Code: Select all

$self->{charSelectScreenHook} = Plugins::addHook(charSelectScreen => sub { $_[1]{return} = 1 });
The char gets disconnected due timeout on char select server, even though it successfully send the PIN packet (08B8) before the char_login packet (0066). In fact, it gets disconnected even if not sending 08B8.
The only way I found to log in to the map server was by erasing 'char' value from config.txt. This way, it will prompt me for my char slot, and be able to answer the 08B9 packet, withouth disconnection
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

#93 Post by ever_boy_ »

Kurama wrote:to create "Pin window"

edit--
i can make a dll with this function, is this useful?
Probably I'll understand this better than asm.
But I still think I could make something usefull out of it, if you simply described what does this asm function do, step by step.
Also, I don't know if EternalHarvest is able/willing to convert asm -> perl...
Kurama
Noob
Noob
Posts: 19
Joined: 13 Dec 2012, 17:26
Noob?: No

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

#94 Post by Kurama »

we need a chat or anything like that
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

#95 Post by ever_boy_ »

pm.
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

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

#96 Post by EternalHarvest »

Kurama wrote:to create "Pin window"

edit--
i can make a dll with this function, is this useful?
If you're going for that, maybe executable file (with some standard input and output way) would be more easier to use from openkore.
Kurama
Noob
Noob
Posts: 19
Joined: 13 Dec 2012, 17:26
Noob?: No

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

#97 Post by Kurama »

EternalHarvest wrote:
Kurama wrote:to create "Pin window"

edit--
i can make a dll with this function, is this useful?
If you're going for that, maybe executable file (with some standard input and output way) would be more easier to use from openkore.
i can do it
Kaspy
Halfway to Eternity
Halfway to Eternity
Posts: 398
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

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

#98 Post by Kaspy »

ever_boy_ wrote:The only way I found to log in to the map server was by erasing 'char' value from config.txt. This way, it will prompt me for my char slot, and be able to answer the 08B9 packet, withouth disconnection
Yes yes, without the preset value of char that will access OpenKore it expects the client to send a response.
There has to be some condition before selecting char to check if it has to send the PIN. Something similar to what is already done with GameGuard in line at 354 of src\Network\DirectConnection.pm (Revision 7069)

I'm looking for a good solution for this and it will not bother the other servers that do not have the PIN.
Image
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

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

#99 Post by EternalHarvest »

ever_boy_ wrote:This doesn't seem to be working as intended:

Code: Select all

$self->{charSelectScreenHook} = Plugins::addHook(charSelectScreen => sub { $_[1]{return} = 1 });
The char gets disconnected due timeout on char select server
Yes, maybe some bug in Network::DirectConnection - notice that usually you won't ever see any messages about character SELECT server.

Workaround - monkey patch the corresponding timeout which is not set at all otherwise:

Code: Select all

$self->{charSelectScreenHook} = Plugins::addHook(charSelectScreen => sub {
	$Globals::timeout{charlogin}{time} = time;
	$_[1]{return} = 2;
});
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

#100 Post by ever_boy_ »

Works perfectly. I was able to login to the game withouth erasing my char slot value.
Now, the only thing left is the encrypt function. If I learn how to read asm, would it be possible to write it in perl? Or can we get the values straight to kore straight from the asm function?


edit:
Kore only needs the sequence of digits, which would be something like:

06000503010907040802

This is what we get from the asm function. Then, we gotta make a code that, based on this sequence, and player's PIN code, it will generate the encrypted bytes.

It's just a matter of matching each PIN's digit, counting the position, and assigning the corresponding value to its digit. Sounds easy to me.
The only thing I don't know is how to convert the asm function into perl..