Jump to content
SubSpace Forum Network

emileej

Member
  • Posts

    43
  • Joined

  • Last visited

About emileej

  • Birthday 02/21/1985

Contact Methods

  • MSN
    johansen_emil@hotmail.com
  • Website URL
    http://eej.dk
  • ICQ
    99792355
  • Yahoo
    some_ship

Profile Information

  • Location
    Denmark

emileej's Achievements

Newbie

Newbie (1/14)

  1. Yes ofcourse and no I'm doing something like this:send_rel(unsigned char *buf, int len) { unsigned char *pkt = malloc(relheader::PACKET_SIZE + len); /* fill out header */ ... memcpy(pkt + relheader::PACKET_SIZE, buf, len); /* push on rel buffer */ ... }Because I got some extra bytes at the end of the struct when I used sizeof to determine the size.
  2. lol@sama Delic you know very well what I mean when I say your email wasnt idealy formulated and if not then quite frankly I wont bother explaining further. Look Delic I don't have a thing against you and yet you give me this childish crap - thats just not cool man.
  3. Delic prease re-read my posts its clear that you misunderstand and I dont feel like re-posting. I am not commenting on you being suspended for two days - just on the email.
  4. I posted it here: http://www.ssforum.net/index.php?showtopic...indpost&p=68211
  5. Hehe I think you misunderstand my post. All I'm saying is that it was pure stupidity to formulate your email in the way you did when you already knew that you weren't on safe grounds.
  6. I agree with Delic being fired - if not for herrasment and disrespect fo staff then for stupidity. Man you knew you were in trouble for one reason or another and yet you sent that email. You seriously thought that an email being aggressive towards staff would help your case? *me is ninja* *woo!*
  7. Yeh. ploss said that.
  8. Sweet! I tought encryption was required! Hmm... And apparently it is... When I set the encryption key to 0 I dont get any more response from the server. I attached my logs from when I try logging into 17th Parallel with encryption enabled. I dont know if I have added some bugs when I imported your code. //Conversion routine void CSSConnection::WriteUint32to8(Uint32 data,Uint8 *target,int len){ for(Uint32 cnt=0;cnt<sizeof(Uint32) && cnt<len;cnt++) target[cnt]=(Uint8)((data >> (cnt * 8)) & 0xFF); } //Encryption routines - by Snrrrup void CSSConnection::InitEncryption(Uint32 key){ Log("InitEncryption"); Sint32 temp = 0; encCypherKey = key; for(int cnt = 0; cnt < 520; cnt += 2) // Each "block" is 2 bytes and the keystream size is 520 bytes { temp = (Uint32)((Uint64)((Uint64)key * (Uint64)0x834E0B5F) >> 48); temp += (temp >> 31); key = ((key % 0x1F31D) * 16807) - (temp * 2836) + 123; if((Sint32)key < 0) key += 0x7FFFFFFF; *((Uint16 *)(encKeyStream + cnt)) = (Uint16)key; } encryptionEnabled=true; } void CSSConnection::Encrypt(char *data,int len){ Log("Encrypt"); if(!encryptionEnabled) return; int StartPos = 1; Uint32 Encrypted = encCypherKey; if(!data[0]) //If Byte at Offset 0 is 0x00 StartPos++; for(Uint32 Count = StartPos; Count < len; Count += 4) { Encrypted ^= *(Uint32 *)(encKeyStream + (Count - StartPos)) ^ (Uint32)(data+Count); WriteUint32to8(Encrypted,(Uint8*)(data+Count),len-Count); } } void CSSConnection::Decrypt(char *data,int len){ Log("Decrypt"); if(!encryptionEnabled) return; Uint32 Decrypted = encCypherKey; int StartPos = 1; if(!data[0]) //If Byte at Offset 0 is 0x00 StartPos++; for(Uint32 Count = StartPos; Count < len; Count += 4) { Uint32 Encrypted = (Uint32)(data+Count); Decrypted ^= *(Uint32 *)(encKeyStream + (Count - StartPos)) ^ Encrypted; WriteUint32to8(Decrypted,(Uint8*)(data+Count),len-Count); Decrypted = Encrypted; } } some_core.zip.logs
  9. Thanks! Corrected. However - that didnt do the trick :/Core [ 8] 0 0x1 0xd7 0xff 0xff 0xff 0x1 0 Server [ 6] 0 0x2 0x29 0 0 0 Core [107] 0 0x3 0 0 0 0 0x9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x75 0x73 0x65 0x72 0 0x74 0x20 0x69 0x6e 0 0 0 0x74 0x13 0x77 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x24 0x48 0 0 0 0xf0 0 0 0 0 0 0 0x74 0x86 0 0 0 0xbc 0x1 0 0 0x2b 0x2 0 0 0x24 0x48 0 0 0 0 0 0 0 0 Core [ 14] 0 0x5 0xed 0x63 0x1 0 0x2 0 0 0 0x1 0 0 0 Server [ 10] 0 0x6 0x11 0x8b 0xde 0xfc 0x77 0x8c 0xff 0xdc Core [107] 0 0x3 0 0 0 0 0x9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x75 0x73 0x65 0x72 0 0x74 0x20 0x69 0x6e 0 0 0 0x74 0x13 0x77 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x24 0x48 0 0 0 0xf0 0 0 0 0 0 0 0x74 0x86 0 0 0 0xbc 0x1 0 0 0x2b 0x2 0 0 0x24 0x48 0 0 0 0 0 0 0 0 Core [107] 0 0x3 0 0 0 0 0x9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x75 0x73 0x65 0x72 0 0x74 0x20 0x69 0x6e 0 0 0 0x74 0x13 0x77 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x24 0x48 0 0 0 0xf0 0 0 0 0 0 0 0x74 0x86 0 0 0 0xbc 0x1 0 0 0x2b 0x2 0 0 0x24 0x48 0 0 0 0 0 0 0 0
  10. When I send reliable packets to the server I don't get an ansver :/ This is my net log (Note: packets sent after encryption kicks in are logged _before_ they're encrypted):Core [ 8] 0 0x1 0xd7 0xff 0xff 0xff 0x1 0 Server [ 6] 0 0x2 0x29 0 0 0 Core [107] 0 0x3 0x1 0 0 0 0x9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x75 0x73 0x65 0x72 0 0x74 0x20 0x69 0x6e 0 0 0 0x74 0x13 0x77 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x24 0x48 0 0 0 0xf0 0 0 0 0 0 0 0x74 0x86 0 0 0 0xbc 0x1 0 0 0x2b 0x2 0 0 0x24 0x48 0 0 0 0 0 0 0 0 Core [ 14] 0 0x5 0x4e 0x71 0x45 0 0x2 0 0 0 0x1 0 0 0 Server [ 10] 0 0x6 0x11 0x8b 0xde 0xfc 0x77 0x8c 0xff 0xdc Core [107] 0 0x3 0x1 0 0 0 0x9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x75 0x73 0x65 0x72 0 0x74 0x20 0x69 0x6e 0 0 0 0x74 0x13 0x77 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x24 0x48 0 0 0 0xf0 0 0 0 0 0 0 0x74 0x86 0 0 0 0xbc 0x1 0 0 0x2b 0x2 0 0 0x24 0x48 0 0 0 0 0 0 0 0 Core [107] 0 0x3 0x1 0 0 0 0x9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x75 0x73 0x65 0x72 0 0x74 0x20 0x69 0x6e 0 0 0 0x74 0x13 0x77 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x24 0x48 0 0 0 0xf0 0 0 0 0 0 0 0x74 0x86 0 0 0 0xbc 0x1 0 0 0x2b 0x2 0 0 0x24 0x48 0 0 0 0 0 0 0 0 Core [107] 0 0x3 0x1 0 0 0 0x9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x75 0x73 0x65 0x72 0 0x74 0x20 0x69 0x6e 0 0 0 0x74 0x13 0x77 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x24 0x48 0 0 0 0xf0 0 0 0 0 0 0 0x74 0x86 0 0 0 0xbc 0x1 0 0 0x2b 0x2 0 0 0x24 0x48 0 0 0 0 0 0 0 0
  11. Splody tells me that 0x77 is a lvz object switch and therefore irrelevant for the bot.
  12. Perhaps I introduced a bug when I ported your coed to my core?://Encryption routines - by Snrrrup void CSSConnection::InitEncryption(Uint32 key){ Log("InitEncryption"); Sint32 temp = 0; encCypherKey = key; for(int cnt = 0; cnt < 520; cnt += 2) // Each "block" is 2 bytes and the keystream size is 520 bytes { temp = (Uint32)((Uint64)((Uint64)key * (Uint64)0x834E0B5F) >> 48); temp += (temp >> 31); key = ((key % 0x1F31D) * 16807) - (temp * 2836) + 123; if((Sint32)key < 0) key += 0x7FFFFFFF; *((Uint16 *)(encKeyStream + cnt)) = (Uint16)key; } encryptionEnabled=true; } void CSSConnection::Encrypt(char *data,int len){ Log("Encrypt"); if(!encryptionEnabled) return; int StartPos = 1; Uint32 Encrypted = encCypherKey; if(!data[0]) //If Byte at Offset 0 is 0x00 StartPos++; for(Uint32 Count = StartPos; Count < len; Count += 4) { Encrypted ^= *(Uint32 *)(encKeyStream + (Count - StartPos)) ^ (Uint32)(data+Count); //((Uint32*)(data[Count]))=Encrypted; WriteUint32to8(Encrypted,(Uint8*)(data+Count),len-Count); } } void CSSConnection::Decrypt(char *data,int len){ Log("Decrypt"); if(!encryptionEnabled) return; Uint32 Decrypted = encCypherKey; int StartPos = 1; if(!data[0]) //If Byte at Offset 0 is 0x00 StartPos++; for(Uint32 Count = StartPos; Count < len; Count += 4) { Uint32 Encrypted = (Uint32)(data+Count); Decrypted ^= *(Uint32 *)(encKeyStream + (Count - StartPos)) ^ Encrypted; //((Uint32*)(data+Count))=Decrypted; WriteUint32to8(Decrypted,(Uint8*)(data+Count),len-Count); Decrypted = Encrypted; } }
  13. I'm printing it out after decryption - thats how I can tell that the packet is reliable, but should I both decrypt the packet and then if reliable - its content?
  14. I tried to send the packet as non-reliable and that worked. Now I recieve a strange packet, reliably, with an id saying 0x77://As it is recieved: [ 42] 0 0x3 0x21 0x8a 0xd1 0xfc 0x77 0x8c 0xff 0xdc 0x8d 0x26 0x62 0xf8 0x19 0xed 0x1b 0x48 0xfa 0xd 0xaf 0xe1 0x9 0xb3 0x8f 0x3d 0x8d 0x89 0xd1 0xb1 0xe1 0x30 0xb4 0x2c 0x74 0x6 0xb6 0xbb 0x95 0xe6 0xd7 0x4b //Without the reliable packet: [ 36] 0x77 0x8c 0xff 0xdc 0x8d 0x26 0x62 0xf8 0x19 0xed 0x1b 0x48 0xfa 0xd 0xaf 0xe1 0x9 0xb3 0x8f 0x3d 0x8d 0x89 0xd1 0xb1 0xe1 0x30 0xb4 0x2c 0x74 0x6 0xb6 0xbb 0x95 0xe6 0xd7 0x4bI cant find that anywhere in SOS' packet list.
  15. I found some errors in my packet and corrected them, but I'm still not recieving any response from the server - not even a response to the reliable part of the packet. This is the reliable packet: typedef struct SReliablePacket{ Uint8 type; //0x00 Uint8 subtype; //0x03 Uint32 id; static const Uint32 PACKET_SIZE=6; //reliable packet is appended to this }TReliablePacket;And this is the password packet: typedef struct SP!@#$%^&*wordPacket{ Uint8 type; //0x09 Uint8 newUser; //0x00 or 0x01 (bool) char name[32]; char p!@#$%^&*[32]; Uint32 macId; //Use random id Uint8 connType; //0x00 Uint16 timeZoneBias;//240==EST Uint16 unknown1; Uint16 clientType; //0x86 Uint32 memChecksumA;//444 Uint32 memChecksumB;//555 Uint32 permissionId;//Use random id char unknown2[12]; static const Uint32 PACKET_SIZE=101; }TP!@#$%^&*wordPacket;I am now memsetting the whole packet to 0x00 before I set the values as posted before. The result looks like this: [107] 0 0x3 0x1 0 0 0 0x9 0 0x75 0x73 0x65 0x72 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x70 0x61 0x73 0x73 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x24 0x48 0 0 0 0xf0 0 0 0 0 0 0 0 0x86 0 0 0 0xbc 0x1 0 0 0x2b 0x2 0 0 0x24 0x48 0 0 0 0 0 0 0 0
×
×
  • Create New...