PDA

View Full Version : Battle.net Chat Encryptor



homebrew89
07-05-2006, 11:11 AM
While bwhacks was down I decided to make a chat encryptor. You might be thinking 'why would I need this? I can just whisper somebody' Well, that is true, and you can do that if you want. I made this program for fun, and I figured people would use it for fun, so if you want to give it a try go to my program page in my sig.

XCreepingDeathX
07-05-2006, 12:19 PM
That's a cool hack. Good job.

adam592
07-05-2006, 01:03 PM
niiiiiiiiiiiiice :cool:

homebrew89
07-06-2006, 03:47 PM
I was chatting with somebody today, and if a multiline message was sent by the other person, it would look messed up for me after the first line but not for him, but if I sent a multiline message it looked messed up for him but not for me. Has anyone else experienced this problem?

guy476
07-06-2006, 04:23 PM
i dont get it what do you do with this?

HARD_ON
07-06-2006, 04:40 PM
i dont get it what do you do with this?
It has no real purpose. It's just for fun. It's basically another way to PM.

homebrew89
07-06-2006, 05:41 PM
I was chatting with somebody today, and if a multiline message was sent by the other person, it would look messed up for me after the first line but not for him, but if I sent a multiline message it looked messed up for him but not for me. Has anyone else experienced this problem?

Ok, I fixed it. I just had to adjust counter placement.

Flamez
07-07-2006, 12:44 AM
oh and can u plz let us change which key is used bcuz right shift is kinda annoying =\

homebrew89
07-07-2006, 12:54 AM
I thought it would be convenient to have right-shift as the send key, but I'll see what I can do in the future.

homebrew89
07-14-2006, 01:07 PM
Ok, if you have ever tried to send color codes in a Battle.net channel, you know that SC or Battle.net filters them out. Well, if you send them encrypted, they never get filtered, so your message will have the color you want! Your challenge: figure out the color codes.

gamepin126
07-14-2006, 01:11 PM
What do I get if I win?

homebrew89
07-14-2006, 01:30 PM
You get to chat in color.

gamepin126
07-14-2006, 01:31 PM
Not worth trying, then.

kewl hack anyways.

Zephyrix
07-17-2006, 02:49 PM
Well, that would depend on the encryption key ;)

Encryption routine:



@BNet_Enc_0040170b: ;<= Procedure Start
push esi
push edi
lea esi,dword ptr ds:[0403078h] ;Text
lea edi,dword ptr ds:[04031a4h] ;??
lea ebx,dword ptr ds:[0403330h] ;Key
mov ecx,0 ;Initialize ECX as a counter
mov al,0ffh
stos byte ptr es:[edi]
mov al,012h
xor al,byte ptr ds:[ebx+1]
xor al,0ffh
stos byte ptr es:[edi]
inc ecx

@BNet_Enc_00401730:
lods byte ptr ds:[esi]
or al,al
je @BNet_Enc_00401755
cmp al,0ffh
je @BNet_Enc_00401755
cmp al,020h
je @BNet_Enc_00401755
cmp al,9
je @BNet_Enc_00401755
inc ecx
cmp ecx,8
jnz @BNet_Enc_0040174c
mov ecx,0

@BNet_Enc_0040174c:
xor al,byte ptr ds:[ecx+ebx]
xor al,0ffh
or al,al
je @BNet_Enc_0040174c

@BNet_Enc_00401755:
stos byte ptr es:[edi]
or al,al
jnz @BNet_Enc_00401730
pop edi
pop esi
ret ;<= Procedure End



Decrypt routine:



@BNet_Enc_0040175d: ;<= Procedure Start
push esi
push edi
lea esi,dword ptr ds:[0403078h]
lea edi,dword ptr ds:[04031a4h]
lea ebx,dword ptr ds:[0403330h]
mov ecx,0

@BNet_Enc_00401776:
lods byte ptr ds:[esi]
or al,al
jnz @BNet_Enc_00401782
mov eax,0
jmp @BNet_Enc_004017af

@BNet_Enc_00401782:
cmp al,0ffh
je @BNet_Enc_00401789
stos byte ptr es:[edi]
jmp @BNet_Enc_00401776

@BNet_Enc_00401789:
lods byte ptr ds:[esi]
or al,al
je @BNet_Enc_004017aa
cmp al,020h
je @BNet_Enc_004017aa
cmp al,9
je @BNet_Enc_004017aa
inc ecx
cmp ecx,8
jnz @BNet_Enc_004017a1
mov ecx,0

@BNet_Enc_004017a1:
xor al,byte ptr ds:[ecx+ebx]
xor al,0ffh
or al,al
je @BNet_Enc_004017a1

@BNet_Enc_004017aa:
stos byte ptr es:[edi]
or al,al
jnz @BNet_Enc_00401789

@BNet_Enc_004017af:
pop edi
pop esi
ret ;<= Procedure End



Looks like a simple xor crypt with each letter rotating, skipping spaces and some other chars, starting from the 2nd character of the key, xoring with 0xFF, then OR with itself, then prefixing the whole string with.. part of your account name

homebrew89
07-19-2006, 01:29 AM
???

Well, that would depend on the encryption key ;)



Looks like a simple xor crypt with each letter rotating, skipping spaces and some other chars, starting from the 2nd character of the key, xoring with 0xFF, then OR with itself, then prefixing the whole string with.. part of your account name
Exactly correct! :woot: I could have just told you... lol

K? Pŕo?ćtiόnŹ
07-19-2006, 04:52 PM
I would use a much simpler encryption/decryption routine


DecryptStringEx Proc Export StrADDR:DWord, estrlen:DWord
Xor Ecx, Ecx
Mov Ebx, StrADDR
.While Ecx < estrlen
Mov Al, Byte Ptr [Ecx + Ebx]
.If Al == 0
Mov Al, 255
.Else
Dec Al
.EndIf
Mov Byte Ptr [Ecx + Ebx], Al
Inc Ecx
.EndW
Ret
DecryptStringEx EndP

EncryptStringEx Proc Export StrADDR:DWord, estrlen:DWord
Xor Ecx, Ecx
Mov Ebx, StrADDR
.While Ecx < estrlen
Mov Al, Byte Ptr [Ecx + Ebx]
.If Al == 255
Mov Al, 0
.Else
Inc Al
.EndIf
Mov Byte Ptr [Ecx + Ebx], Al
Inc Ecx
.EndW
Ret
EncryptStringEx EndP

homebrew89
07-19-2006, 08:29 PM
Take a closer look at the code xxzyzxx posted. There's more to the routines than you think.

K? Pŕo?ćtiόnŹ
07-19-2006, 08:59 PM
Take a closer look at the code xxzyzxx posted. There's more to the routines than you think.
I read it, I know how you did it, I congratulate you on it, I'm just saying all that protection for a Sc game X_x;