• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OTClient - logowanie sie na ots z własnym protokołem

hemrenus321

Advanced OT User
Joined
Jun 1, 2010
Messages
396
Solutions
2
Reaction score
161
Location
Poland
Witam próbuję zalogować się poprzez OTC na otsa z custom clientem 7.72 (przerobiony na 1.00)
doszedłem do listy postaci i przy próbie wejścia do gry wywala ze mam złą wersje klienta

funkcja z OTC:
Code:
function ProtocolLogin:sendLoginPacket()
  local msg = OutputMessage.create()
  msg:addU8(1)  --ClientOpcodes.ClientEnterAccount
  msg:addU16(2) --os

  msg:addU16(100)   --g_game.getProtocolVersion()
   msg:addU32(100)

  msg:addU32(g_things.getDatSignature())
  msg:addU32(g_sprites.getSprSignature())
  msg:addU32(PIC_SIGNATURE)

  if g_game.getClientVersion() >= 980 then
    msg:addU8(0) -- clientType
  end

  local offset = msg:getMessageSize()

  if g_game.getClientVersion() >= 770 then
    -- first RSA byte must be 0
    msg:addU8(0)
    -- xtea key
    self:generateXteaKey()
    local xteaKey = self:getXteaKey()
    msg:addU32(xteaKey[1])
    msg:addU32(xteaKey[2])
    msg:addU32(xteaKey[3])
    msg:addU32(xteaKey[4])
  end

  if g_game.getFeature(GameAccountNames) then
    msg:addString(self.accountName)
  else
    msg:addU32(tonumber(self.accountName))
  end

  msg:addString(self.accountPassword)

  if self.getLoginExtendedData then
    local data = self:getLoginExtendedData()
    msg:addString(data)
  end

  local paddingBytes = g_crypt.rsaGetSize() - (msg:getMessageSize() - offset)
  assert(paddingBytes >= 0)
  msg:addPaddingBytes(paddingBytes, 0)
  if g_game.getClientVersion() >= 770 then
    msg:encryptRsa()
  end

  if g_game.getFeature(GameProtocolChecksum) then
    self:enableChecksum()
  end

  self:send(msg)
  if g_game.getClientVersion() >= 770 then
    self:enableXteaEncryption()
  end
  self:recv()
end


to odpowiada za ustawienie w OTC żeby logował się jako klient 1.00, i działa dobrze, pokazuje listę postaci i gdy chcę się zalogować to jest napisane ze zła wersja klienta :(
Code:
msg:addU16(100)



to chyba powinno w jakimś celu ponownie ostawiać wersje klienta na 1.00, leczy gdy tego nie usunę to dostaje Your connection has been lost error#2
Code:
msg:addU32(100)

proszę o pomoc
 
w kliencie edytowanym ollydbg i musisz znaleźć hexy jakimi sie klient definiuje w innym wypadku wersja "1.00" może odpowiadać numerowi 526277 bo blad wysyła server nie klient
 
mógłbyś wytłumaczyć dokładniej?
wychodzi na to ze login server ma protokół 100, ale game ma już jakiś inny?

jeśli chodzi o klucz RSA, to mam prawidłowy

edit:
chyba wiem o co chodzi, do klienta jest dołączony plik .dll, który prawdopodobnie zmienia wersje protokołu na jakiś randomowy, pytanie jak to wydobyć, o ile się nie mylę
 
Last edited:
Back
Top