Jump to content

Cromon

Members
  • Posts

    8
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Cromon's Achievements

Newbie

Newbie (1/3)

0

Reputation

  1. Well, its hard to say, how you for your own should do it, i just can say, how i did it but that is no guarantee that it will fit you. I first always heard that strange "svn" (that was some years ago ) and so i decided to download that stuff. That was my first contact with source code. So then i looked at all those c++-files and thought "hey, why dont play around with'em?". I asked a friend, if he knows, how all that stuff works and he gave me 2 E-Books about c++. After about 2 or 3 months ive finished those books and from then on what i found at the sourcecode for me was pretty simple. At this point its a persisting accumulation of knowledge. Maybe this wont work for you at all, so just find your very own way to touch the language!
  2. Argh, damn it, found the error: RealmPacket& operator<<(char* data) { ui8* d = (ui8*)data; ui16 len = strlen(data); for(int i = 0; i < len; ++i) _data.push_back(*(d + i)); _data.push_back('\\0'); return (*this); } Combined with that: "\\x0C\\x30\\x78\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x02" // Pay attention on the \\x00 resulted in some wrong things . The operator stopped at the first \\x00 but should have to continue till the end. So changed that to pack.Append("....", 11) and now it works, FINALLY
  3. Hm, do you think so? I tested every power of 2 up to 32 and nothing seems to work.
  4. Yes, but the cursor looks like looting, so there must be something special. Maybe they use a special infostring like for guards where you can send "directions" to make normal npcs look like guards.
  5. So, hm, here are some more info: I use the 9551 client and not the 3.1. Here are some details about the packethandling: WorldPacket packet = WorldPacket(); packet << ui16(ntohs(13)) << ui16(SMSG_AUTH_RESPONSE) << "\\x0C\\x30\\x78\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x02"; SendPacket(packet); Here the addoninfo: void Session::AddonRequest() { if(m_authpacket == NULL) return; ui32 size; try{ *m_authpacket >> size; } catch(...){ return; } if(m_authpacket->GetSize() < 4 || size == 0) return; WorldPacket uncompressed = WorldPacket(); uncompressed.Resize(size); uLongf rsz = size; int res = uncompress(uncompressed.Contents(), &rsz, m_authpacket->Contents(), m_authpacket->GetSize()); if(res != Z_OK) { return; } ui32 addoncount; uncompressed >> addoncount; char* addonname = new char[500]; ui8 enabled = 0; ui32 unknown = 0; ui32 crc = 0; WorldPacket returnpacket; returnpacket << ui16(0) << ui16(SMSG_ADDON_INFO); for(register ui32 i = 0; i < addoncount; ++i) { if(!uncompressed.GetSize() || uncompressed.GetSize() < 10) break; uncompressed >> addonname >> enabled >> crc >> unknown; if(crc != 0x4C1C776D) returnpacket.Append(PublicKey, 264); else returnpacket << ui8(0x02) << ui8(0x01) << ui8(0x00) << ui32(0) << ui8(0); } returnpacket << ui32(0); ui16* b = (ui16*)returnpacket.Contents(); *b = ntohs(returnpacket.GetSize() - 2); SendPacket(returnpacket); delete [] addonname; } That all works fine and is encrypted fine, but after the addon_info the client sends char_enum and finished, encryption doesnt work anymore. ps: sometimes the client sends 0x38C right after char_enum. this one i also get correctly. //Edit: Tested some more things: If i dont send the smsg_char_enum everything stays just as it should. So if i now click on "cancle" at the client and back at the realmlist also cancle i get to the the char-list. If i create a new character i correctly get 0x36 from the client and i send char_create everything works fine (except that the client doesnt create the character). So it seems, that all gets wrong when i send smsg_char_enum...
  6. i know what you mean, i tested some things too to get the result, but since yet i couldnt find the place where this is handled. It is not a npc flag, so maybe its one of the unk-things.
  7. Hello everyone! In order to improve my skills in C/C++ (which i plan to use for mangos ) i gave myself the goal to program a logonserver and a worldserver, but only till the point where the characters are displayed. Dont have enough time to get further. Until yet everything worked perfectly, logonserver does what it should (and yes, it does it effective ), same to the worldserver, but - if you belive or not - i get stucked at cmsg_char_enum . That means just one step before i would have got my goal :mellow:. So, why do i get stucked? Actually i cant really tell you in detail, but after i haved decrypted cmsg_char_enum (there the decryption still works perfectly) all the cryptingstuff messes up. I cant even decrypt the clients ping-packets. So if i dont let the client get to cmsg_char_enum (e.g. if i dont send the smsg_addon_info) all is in perfect order, cmsg_ping is handled. And if i go one step further everything gets out of control. Serverpackets have no effect, clientpackets are nonsense. My first thinking was, that i may have messed up with the key of AuthCrypt, but this one stays the same all the time, so it cant be, that i changed it. Im working on that shit now since about 1 week and i still have no clue, why this all is happening. Here is what i do: ---Logonserver: - authenticating and saving the sessionkey - displaying the realms --World - sending auth_challenge with random seed - handling cmsg_auth_session - asking logonserver for sessionkey - initalising AuthCrypt - sending smsg_auth_session - sending smsg_addon_info - handling cmsg_char_enum (that is decrypted well) - ?? It would be really nice, if someone could help me out with that last little step. Greetings Cromon
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use