Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Credits for who deserves them, the author of those modifications is Sugoi.
- src\network\send\ServerType0.pm
- Remark:
- =pod
- sub sendMasterLogin {
- my ($self, $username, $password, $master_version, $version) = @_;
- my $msg;
- if ($self->{serverType} == 4) {
- # This is used on the RuRO private server.
- # A lot of packets are different so I gave up,
- # but I'll keep this code around in case anyone ever needs it.
- # I'm not sure if serverType 4 actually needs this whacko login
- $username = substr($username, 0, 23) if (length($username) > 23);
- $password = substr($password, 0, 23) if (length($password) > 23);
- my $tmp = pack("C*", 0x0D, 0xF0, 0xAD, 0xBA) x 6;
- substr($tmp, 0, length($username) + 1, $username . chr(0));
- $username = $tmp;
- $tmp = (pack("C*", 0x0D, 0xF0, 0xAD, 0xBA) x 3) .
- pack("C*", 0x00, 0xD0, 0xC2, 0xCF, 0xA2, 0xF9, 0xCA, 0xDF, 0x0E, 0xA6, 0xF1, 0x41);
- substr($tmp, 0, length($password) + 1, $password . chr(0));
- $password = $tmp;
- $msg = pack("v1 V", hex($masterServer->{masterLogin_packet}) || 0x64, $version) .
- $username . $password .
- pack("C*", $master_version);
- } else {
- $msg = pack("v1 V", hex($masterServer->{masterLogin_packet}) || 0x64, $version) .
- pack("a24", $username) .
- pack("a24", $password) .
- pack("C*", $master_version);
- }
- $self->sendToServer($msg);
- }
- =cut
- From src\network\send\bRO.pm add to src\network\send\ServerType0.pm
- sub version {
- return $masterServer->{version} || 1;
- }
- # 0x0204,18
- sub sendClientMD5Hash {
- my ($self) = @_;
- my $msg = pack('v H32', 0x0204, $masterServer->{clientHash});
- $self->sendToServer($msg);
- }
- # 0x02b0,85
- sub sendMasterLogin {
- my ($self, $username, $password, $master_version, $version) = @_;
- # Little Hack by 'Technology'
- $self->sendClientMD5Hash() if ($masterServer->{clientHash} != '');
- my $key = pack('C24', (6, 169, 33, 64, 54, 184, 161, 91, 81, 46, 3, 213, 52, 18, 0, 6, 61, 175, 186, 66, 157, 158, 180, 48));
- my $chain = pack('C24', (61, 175, 186, 66, 157, 158, 180, 48, 180, 34, 218, 128, 44, 159, 172, 65, 1, 2, 4, 8, 16, 32, 128));
- my $in = pack('a24', $password);
- my $rijndael = Utils::Rijndael->new();
- $rijndael->MakeKey($key, $chain, 24, 24);
- $password = $rijndael->Encrypt($in, undef, 24, 0);
- # To get out local IP of our connection we need: $self->{net}->{remote_socket}->sockhost();
- my $ip = "3139322e3136382e322e3400685f4c40";
- # To get the MAC we need to use Net::ARPing or Net::Address::Ethernet or even Net::Ifconfig::Wrapper, that are not bundeled in Win Distro.
- my $mac = "31313131313131313131313100"; # May-be Get it from Network Connection?
- my $isGravityID = 0;
- my $msg = pack('v V a24 a24 C H32 H26 C', 0x02B0, version(), $username, $password, $master_version, $ip, $mac, $isGravityID);
- $self->sendToServer($msg);
- }
- src\network\receive\bRO.pm add from src\network\receive\bRO\Thor.pm
- sub new {
- my ($class) = @_;
- my $self = $class->SUPER::new(@_);
- my %packets = (
- '0078' => ['actor_display', 'C a4 v14 a4 a2 v2 C2 a3 C3 v',
- [qw(object_type ID walk_speed opt1 opt2 option type hair_style weapon lowhead shield tophead midhead hair_color clothes_color head_dir guildID emblemID manner opt3 karma sex coords unknown1 unknown2 act lv)]], # 55 # standing
- '007C' => ['actor_display', 'C a4 v14 C2 a3 C2', [qw(object_type ID walk_speed opt1 opt2 option hair_style weapon lowhead type shield tophead midhead hair_color clothes_color head_dir karma sex coords unknown1 unknown2)]], # 42 # spawning
- '022C' => ['actor_display', 'C a4 v3 V v5 V v5 a4 a2 v V C2 a6 C2 v', [qw(object_type ID walk_speed opt1 opt2 option type hair_style weapon shield lowhead tick tophead midhead hair_color clothes_color head_dir guildID emblemID manner opt3 karma sex coords unknown1 unknown2 lv)]], # 65 # walking
- );
- foreach my $switch (keys %packets) {
- $self->{packet_list}{$switch} = $packets{$switch};
- }
- return $self;
- }
- tables\servers.txt - the IP and the secureLogin had changed
- [Brazil - bRO: Odin]
- ip 200.229.49.10
- port 6900
- master_version 22
- version 1
- serverType bRO
- secureLogin 0
- secureLogin_type 0
- secureLogin_requestCode
- secureLogin_account 0
- serverEncoding Western
- gameGuard 2
- storageEncryptKey 0x050B6F79, 0x0202C179, 0x0E20120, 0x04FA43E3, 0x0179B6C8, 0x05973DF2, 0x07D8D6B, 0x08CB9ED9
- addTableFolders bRO
- [Brazil - bRO: Thor]
- ip 200.229.50.3
- port 6900
- master_version 22
- version 1
- serverType bRO_Thor
- secureLogin 0
- secureLogin_type 0
- secureLogin_requestCode
- secureLogin_account 0
- serverEncoding Western
- gameGuard 2
- storageEncryptKey 0x050B6F79, 0x0202C179, 0x0E20120, 0x04FA43E3, 0x0179B6C8, 0x05973DF2, 0x07D8D6B, 0x08CB9ED9
- addTableFolders bRO
- tables\bRO\recvpackets.txt - from renew (credits for kLabMouse for v3)
- attached
- The new Poseidon code has no conpatibility with bRO, so the old one with some fixes is been used
- src\Poseidon\ - attached
- src\IPC\ - attached
- Best regards.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement