Packet Decryption

03/07/2005 11:20 Lowfyr#1
Packet Decryption:

Code:
BYTE *DecryptPacket(BYTE *Packet, DWORD len) { 
BYTE KeyIndex, curKey, lastByte; 
DWORD i; 

KeyIndex = *(CryptInfo + 0x115); 

lastByte = 0; 

for(i = 0; i < len; i++) {   //return the key to the initial state 
 KeyIndex--; 
  if(KeyIndex == 0xFF)   //-1, bytes are unsigned 
   KeyIndex = 39; 
} 

for(i = 0; i < len; i++) { 
curKey  = *(*(BYTE **)(CryptInfo + 0x11C) + KeyIndex); 
tmp = *(Packet + i); 
*(Packet + i) = (*(Packet + i ) - lastByte)) ^ curKey; 
lastByte = tmp;
} 

return Packet; 
}
The cryptinfo (cp-p )

Code:
typedef struct WoWKeyIndex { 
  BYTE Index; 
  BYTE LastByte; 
  BYTE CryptLen;   
} WoWKeyIndex; 

typedef struct WoWCryptInfo { 
  BYTE IsCrypted;        
  WoWKeyIndex SendKey; 
  WoWKeyIndex RecvKey; 
  BYTE KeyLen; 
  char *Key; 
} WoWCryptInfo; 

typedef struct WoWClientOP { 
  WORD Size; 
  DWORD Code; 
  BYTE Data[MAX_PACKET_LEN]; 
} WoWClientOP; 

typedef struct WoWServerOP { 
  WORD Size; 
  WORD Code; 
  BYTE Data[MAX_PACKET_LEN]; 
} WoWServerOP;
well you might want to check if the packet is encrypted or not otherwise it will crash when you recieve a undecrypted packet

p.s.: Maybe someone could update the current US offsets and release it because i only have the EU version + offsets ;P
03/08/2005 11:40 Lowfyr#2
nach absprache mit nem anderen admin wird das hier nu released - ist allerdings nur ein teil vom ganzen (leecher können damit wenig anfangen)

weitere infos kommen eventuell später
01/25/2008 23:51 KeroChan#3
Could anyone post a pseudo code here so us that can't understand C++ would be able to understand how this algorithm works? I am very interested in different encryption algorithms for my school projet. Thank you in advance! =)
01/26/2008 10:20 Kinu#4
03-07-2005, 11:20

=/
01/26/2008 10:47 nasty2116#5
was könnte uns das bringen oder welchen nutzen könnten wir daraus ziehen ? verste ich leider nich ganz thanks
01/26/2008 11:48 Aeh'#6
Ist das nu alt oder neu?
Und wieso ist es ganz oben ich raffs ned -.-
01/26/2008 12:03 wutzebaer#7
ka, weil irgendwelche leute meinen das man zu 2 jahre alten sachen noch was sagen muss ^^
01/26/2008 12:08 Kinu#8
Quote:
Originally Posted by NatuRe. View Post
Ist das nu alt oder neu?
Und wieso ist es ganz oben ich raffs ned -.-
kannsu lesen?

03-07-2005 11:20

:)
01/26/2008 13:04 Sourcesys#9
dum di dum dum
01/27/2008 02:10 KeroChan#10
Does it matter if it's old? Has Blizz changed the encryption to something else? If so has the new encryption been discovered already? Just wanting to know how it works/worked =P