0 Members and 1 Guest are viewing this topic.
How are you supposed to make a packet? What Format?
// Varschar RoomName[256] = {0x00};char UserName[64] = {0x00};WORD wLine = 0;WORD wPrimeUDPPort = 0;DWORD dwFiles = 0;DWORD dwPrimeIP = 0;char buffer[MAX_BUFFER_SIZE] = {0x00};sprintf(RoomName,"YourRoom_0100007f0003");sprintf(UserName,"YourUserName000_00000");//skip the first four bytes, for now.WORD Len = 4;//copy our room name to our packetlstrcpy(buffer+Len,RoomName);// our length is then increased,// we then add the length of our ROom Name// to our total length variable (Len)// Since the end of the string has no value (NULL)// we can just skip it by adding 1 to the total lengthLen+=strlen(RoomName)+1;//Now we copy our linetypememcpy(buffer+Len, &wLine, 2);// since the linetype is only 2 bytes// we add 2 to our total lengthLen+=2;// we then copy our Prime IPmemcpy(buffer+Len, &dwPrimeIP, 4);// since the prime ip is 4 bytes// we add 4 to our total lengthLen+=4;// Now we copy our Prime UDP Portmemcpy(buffer+Len, &wPrimeUDPPort, 2);// 2 bytes, we add 2Len+=2;// Add our file countmemcpy(buffer+Len, &dwFiles, 4);// 4 bytes, we add 4Len+=4;// add our user namelstrcpy(buffer+Len, UserName);// add the length of our username to the total length var (Len)// Null terminated, we just add 1, since end of string contains null charsLen+=strlen(UserName)+1;// we add our type at the beginning*(WORD*)buffer = 0x0064;// we add our packet length*(WORD*)buffer+2 = Len-4;// we subtract 4, the type and lenght are each 2 bytes, which makes 4, we don't// add the length of our type and length.// EncryptYourdwUPKey = EncryptMXTCP((BYTE*)buffer, Len, YourdwUPKey);// this should help, it doesn't explain everything, but it answers your question// on how to write a join packet. Please excuse any syntax errors in my code, it was// written in notepad. LOL