Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. Talendrys

    SMSG_CHAR_ENUM returns error

    Hello, Did you check big_endian & little_endian format ? Some more info there: https://github.com/Warkdev/JaNGOSRealm/blob/master/src/main/java/eu/jangos/realm/network/packet/server/character/SMSG_CHAR_ENUM.java#L178 Tal'
  3. Yesterday
  4. /dev/not/null

    SMSG_CHAR_ENUM returns error

    I'm trying to send SMSG_CHAR_ENUM packet (example below): 1. Character data data = pack( '<Q{name_len}s3B5BB2I3f2IB3IIBI'.format(name_len = len(name_bytes)), 1, # guid name_bytes, # 'Name' + '\x00' 4, # race 11, # class id 0, # gender 0, # skin 0, # face 0, # hair style 0, # hair color 0, # facial hair 61, # level 141, # zone id 1, # map id 10322.1, # x 825.436, # y 1326.37, # z 0, # guild 0, # char flags ? 0, # first login 0, # pet display id 0, # pet level 0, # pet family 0, # first bag inventory id 0, # first bag inventory type 0 # enchant ? ) 2. Full packet: packet = pack('<B', num_chars) + data But client returns 'Error retrieving character list'. What am I doing wrong ?
  5. Talendrys

    Need help in packet decryption

    Wonderful, you find issue and root cause at the same time!
  6. /dev/not/null

    Need help in packet decryption

    Solved! The opcode is 55 (0x037) = CMSG_CHAR_ENUM. Answering own question: in client request (b'\x00\x047\x00\x00\x00\x18\xb7\xce\xa7/Y\xff\xff\xff\xff') the first 2 bytes = packet size, next 4 bytes = opcode, so 7\x00\x00\x00 is opcode here, which equals to 55 after translating into integer.
  7. /dev/not/null

    Need help in packet decryption

    After success SMSG_AUTH_RESPONSE client sends packet, after decryption it equals to b'\x00\x047\x00\x00\x00\x18\xb7\xce\xa7/Y\xff\xff\xff\xff', What is the client packet structure ? First two bytes are opcode, aren't it ? But if so, I can't find this opcode in list. Maybe I'm doing something wrong ? This is my enc/decrypt code: def encrypt(self, data): assert len(data) >= HeaderCrypt.ENCRYPT_HEADER_SIZE encrypted_header = [0] * HeaderCrypt.ENCRYPT_HEADER_SIZE for index in range(HeaderCrypt.ENCRYPT_HEADER_SIZE): enc = (data[index] ^ self.crypt_key[self.send_i]) + self.send_j enc %= 0x100 encrypted_header[index] = self.send_j = enc self.send_i = (self.send_i + 1) % len(self.crypt_key) return bytes(encrypted_header) + data[HeaderCrypt.ENCRYPT_HEADER_SIZE:] def decrypt(self, data): assert len(data) >= HeaderCrypt.DECRYPT_HEADER_SIZE decrypted_header = [0] * HeaderCrypt.DECRYPT_HEADER_SIZE for index in range(self.DECRYPT_HEADER_SIZE): dec = (data[index] - self.recv_j) ^ self.crypt_key[self.recv_i] dec %= 0x100 decrypted_header[index] = dec self.recv_j = data[index] self.recv_i = (self.recv_i + 1) % len(self.crypt_key) return bytes(decrypted_header) + data[HeaderCrypt.DECRYPT_HEADER_SIZE:] Encryption works fine (because I can send SMSG_AUTH_RESPONSE and go to Character list loading), but I'm not sure about decryption. So, the question - what is the CMSG_* packets structure and what packet client send under 0x047 opcode after SMSG_AUTH_RESPONSE ?
  8. Last week
  9. H0zen

    SMSG_ACCOUNT_DATA_TIMES

    This packet is sent, along with other SMSG_***, as a response to CMSG_PLAYER_LOGIN opcode sent by the client. You can see how is used for MaNGOS TBC here.
  10. Talendrys

    A "small" test.

    Hello, A lot of interesting ideas. However, there are many things to be figured out properly before you even reach there. The client is developed and is expecting a running server in order to not hang. So before modifying the core structure, you will need some running network data. Don't give up but be aware that the road is long.
  11. Talendrys

    SMSG_ACCOUNT_DATA_TIMES

    Well, you can checkout that project to validate. I haven't been that far in reversing the protocol.
  12. Will

    A "small" test.

    Thank you very much for your time and getting back to me. I will try and figure out the best way to learn this. The idea in my head was to try and map out the websockets or communications protocols and then look for the mappings for client requests and server responses but I understand the client/server may not be set up in this approach. Also, I was hoping to learn Go in the process as the demand for Go developers seems to be growing rapidly and my current employer has no desire to use Go at this time. I may burn out and lose interest but the idea that sparked this motivation was to build service layers to help create emulated "battle groups" like WoW introduced to lower battle ground queue times. I was hoping if I could abstract the communication for the BG manager and the BGs themselves, MaNGOS servers could authenticate and communicate with this battle group service (eg: hmac, saml, oauth) and create server to server sockets for cross realm battle grounds. This could be used for instances and raids as well to allow certified and authenticated servers to allow cross realm raids. Although this was not part of Classic WoW it would allow servers to allocate different resources for raids/dungeons/bgs and run multiple smaller servers. I figured the easiest way to even test if this is plausible was the authentication module.
  13. /dev/not/null

    SMSG_ACCOUNT_DATA_TIMES

    Thanks! Does this packet should be sended after SMSG_AUTH_RESPONSE ?
  14. Talendrys

    SMSG_ACCOUNT_DATA_TIMES

    Hello, I've been told to send you this: https://github.com/marijnz/BunnyEmu/blob/master/src/bunnyEmu/main/net/packets/server/SMSG_ACCOUNT_DATA_TIMES.java Tal'
  15. /dev/not/null

    SMSG_ACCOUNT_DATA_TIMES

    What packet with this opcode actually do ? Why I need to send it ?
  16. Talendrys

    A "small" test.

    Hello Will, Starting is really the most difficult. You must understand all aspects of the game and start by one, knowing that, at some points, everything is embedded. I've started with data (DBC), bug fixing (spells, aura, loot) and auth server all written in Java. Auth server is perfectly working for 1.12 and I was facing the same issue as you do. Reversing the code was kind of difficult. I did not find really the contract for the logon but I was able to deduct it from the code. If Java is easier for you to read, you can have a look here: https://github.com/Warkdev/JaNGOSAuth/blob/master/src/test/java/eu/jangos/auth/network/handler/AuthServerHandlerTest.java#L105 Or here: https://github.com/Warkdev/JaNGOSAuth/blob/master/src/main/java/eu/jangos/auth/network/handler/AuthServerHandler.java#L90 And the different steps are logged in the enum here: https://github.com/Warkdev/JaNGOSAuth/blob/master/src/main/java/eu/jangos/auth/authenum/AuthStep.java
  17. Will

    A "small" test.

    I am contemplating doing something similar. I want to try and reverse engineer the current MaNGOS project to get a better understanding though I want to try and program it in Go. The problem is I have no idea where to start (and I think that is Space Crawler's dilemma too). Ideally speaking, I would love to make an Auth service that can stand on its own to start, and slowly add functionality. Is there any documentation on the request/response data contracts between the client and server? PS: I have not written anything in C++ since about 2002 so reading the code is an options but I am still struggling.
  18. /dev/not/null

    Need help in fixing client connection

    Solved. I just need to add code to generate key for HeaderCrypt correctly: def _generate_key(self, session_key): seed = b'8\xa7\x83\x15\xf8\x92%0q\x98g\xb1\x8c\x04\xe2\xaa' hashed = hmac.new(seed, session_key, sha1) return hashed.digest()
  19. Earlier
  20. Aescleal

    Mangos Zero on MacOS

    As the title suggests, I'm curious if there is a MacOS version of Mangos, more specifically Zero. I've done a search and there is very little on the subject. A change log suggests it's there, but when I look for it, there's only Windows and Linux only. Thanks in advance!
  21. splinecl

    CLUCK! quest

    I am having issues completing the quest "CLUCK!". select * from mangos0.quest_template q where q.entry=3861; It is being triggered by emoting "/chicken" repeatedly at chickens in Westfall. At some point the chicken becomes a quest giver. To complete the quest "CLUCK!" you need to have "Special Chicken Feed" in your inventory, which can be bought from "Farmer Saldean" in Westfall. select * from mangos0.item_template i where i.entry=11109; But for some reason it is not possible to complete the quest, even with the correct items in your inventory. I have attached a screenshot shoving the quest dialog and the item in the inventory.
  22. I only find the clients from classic til mists of pandaria, what about the other expansions? Wod,legion,bfa?
  23. /dev/not/null

    Need help in fixing client connection

    If I understands it correctly - first 16 bytes are same to any hash and only last 4 uses ?
  24. /dev/not/null

    Need help in fixing client connection

    Well, as I can see from the mangos code, there are also some key generating exists: void AuthCrypt::Init(BigNumber* K) { uint8* key = new uint8[SHA_DIGEST_LENGTH]; uint8 recvSeed[SEED_KEY_SIZE] = { 0x38, 0xA7, 0x83, 0x15, 0xF8, 0x92, 0x25, 0x30, 0x71, 0x98, 0x67, 0xB1, 0x8C, 0x4, 0xE2, 0xAA }; HMACSHA1 recvHash(SEED_KEY_SIZE, (uint8*)recvSeed); recvHash.UpdateBigNumber(K); recvHash.Finalize(); memcpy(key, recvHash.GetDigest(), SHA_DIGEST_LENGTH); _key.resize(SHA_DIGEST_LENGTH); std::copy(key, key + SHA_DIGEST_LENGTH, _key.begin()); delete[] key; _send_i = _send_j = _recv_i = _recv_j = 0; _initialized = true; } I tried to implement this in Python, but had no success: def _generate_key(self, session_key): key = bytes(20) seed = b'8\xa7\x83\x15\xf8\x92%0q\x98g\xb1\x8c\x04\xe2\xaa' hashed = hmac.new(seed, None, sha1) return hashed.digest() Need help with hmac_sha1 python implementation.
  25. onixiya

    maps/5301234.map isn't being extracted

    Thanks. I'll start looking for a different client then
  26. H0zen

    mangos zero mangosd.conf

    Cmangos and MaNGOS are DIFFERENT projects. Here is the support site for the MaNGOS project, located at https://github.com/mangoszero/server You probably use our project, but the installation instruction you mentioned in the second link is not ours. Stick to the first one. Cheers
  27. H0zen

    maps/5301234.map isn't being extracted

    The issue is not in the extractors, it's in your Cata client, which is definitely not right. I strongly suggest you to find another one, avoiding in the future that source you mention in the link.
  28. H0zen

    Need help in fixing client connection

    Here is the relevant code from MaNGOS regarding encrypting / decrypting. Translating to Python should be trivial, and I guess you notice where is your issue. // encryption // _key = session key for (size_t t = 0; t < ENCRYPT_HEADER_SIZE; t++) { _send_i %= _key.size(); uint8 x = (data[t] ^ _key[_send_i]) + _send_j; ++_send_i; data[t] = _send_j = x; } // decryption // _key = session key for (size_t t = 0; t < DECRYPT_HEADER_SIZE; t++) { _recv_i %= _key.size(); uint8 x = (data[t] - _recv_j) ^ _key[_recv_i]; ++_recv_i; _recv_j = data[t]; data[t] = x; }
  29. H0zen

    Load Path SPAM every 4 secs

    Go to mangosd.conf file and change LogLevel = 3 to LogLevel = 0 (or 1). This will diminish the verbosity of logs in console.
  1. Load more activity

Contact Us

To contact us click here
You can also email us at [email protected]

Privacy Policy | Terms & Conditions

Repositories

The Link to the master list
of MaNGOS repositories:
Copyright © getMaNGOS. All rights Reserved.

This website is in no way associated with or endorsed by Blizzard Entertainment®
×