Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 29.03.2005, 23:56   #1
vaskes
Архивный участник
 
Join Date: Feb 2005
Posts: 156
Default Can anybody explain what is this?

另一种二章解密工具!
大家看看是怎么用的.这也是别人的� �真的要谢谢他能共享出来.
附件: C2的解密工具.rar (104 K)

translation
Another kind of two chapter of decipher tool! How does everybody have a look is uses. this also is others, really must thank him to be able to share.
Appendix: C2 decipher tool rar (104 K)

found here http://bbs.99nets.com/read.php?tid=1...page=1&fpage=2
i tried to open many types of files - its crashed. Just curious of purpouse of this tool.
vaskes is offline  
Old 30.03.2005, 03:31   #2
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

hmm.. it's probably... decrypted c2 client stuff?
Digital is offline  
Old 30.03.2005, 04:59   #3
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

天堂2官方版服务端帐号密码算法!


//authD的login比较流程
//客户端发过来密码(明码)----->服务端从数据库里取出加密过后的密� ��------>调用加密函数加密客户端发过来的明� ��---->比较


//从这里开始程序开始给从客户端发过� �的密码进行加密,然后跟从数据库里取 出的
//program start to encrypt the password here (the pawd is sended by client).

0042F65C >/$ 55 PUSH EBP
0042F65D |. 8BEC MOV EBP,ESP
0042F65F |. 83EC 14 SUB ESP,14
0042F662 |. 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8]
0042F665 |. 8B08 MOV ECX,DWORD PTR DS:[EAX]
0042F667 |. 69C9 7F400300 IMUL ECX,ECX,3407F
0042F66D |. 81C1 35972600 ADD ECX,269735
0042F673 |. 894D EC MOV DWORD PTR SS:[EBP-14],ECX
0042F676 |. 8B55 08 MOV EDX,DWORD PTR SS:[EBP+8]
0042F679 |. 8B42 04 MOV EAX,DWORD PTR DS:[EDX+4]
0042F67C |. 69C0 FF400300 IMUL EAX,EAX,340FF
0042F682 |. 05 41972600 ADD EAX,269741
0042F687 |. 8945 F0 MOV DWORD PTR SS:[EBP-10],EAX
0042F68A |. 8B4D 08 MOV ECX,DWORD PTR SS:[EBP+8]
0042F68D |. 8B51 08 MOV EDX,DWORD PTR DS:[ECX+8]
0042F690 |. 69D2 D3400300 IMUL EDX,EDX,340D3
0042F696 |. 81C2 35992600 ADD EDX,269935
0042F69C |. 8955 F4 MOV DWORD PTR SS:[EBP-C],EDX
0042F69F |. 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8]
0042F6A2 |. 8B48 0C MOV ECX,DWORD PTR DS:[EAX+C]
0042F6A5 |. 69C9 3D430300 IMUL ECX,ECX,3433D
0042F6AB |. 81C1 CD9A2600 ADD ECX,269ACD
0042F6B1 |. 894D F8 MOV DWORD PTR SS:[EBP-8],ECX
0042F6B4 |. 8B55 08 MOV EDX,DWORD PTR SS:[EBP+8]
0042F6B7 |. 0FBE02 MOVSX EAX,BYTE PTR DS:[EDX]
0042F6BA |. 0FBE4D EC MOVSX ECX,BYTE PTR SS:[EBP-14]
0042F6BE |. 33C1 XOR EAX,ECX
0042F6C0 |. 8B55 08 MOV EDX,DWORD PTR SS:[EBP+8]
0042F6C3 |. 8802 MOV BYTE PTR DS:[EDX],AL
0042F6C5 |. C745 FC 010000>MOV DWORD PTR SS:[EBP-4],1
0042F6CC |. EB 09 JMP SHORT L2AuthD.0042F6D7
//loop 循环
0042F6CE |> 8B45 FC /MOV EAX,DWORD PTR SS:[EBP-4]
0042F6D1 |. 83C0 01 |ADD EAX,1
0042F6D4 |. 8945 FC |MOV DWORD PTR SS:[EBP-4],EAX
0042F6D7 |> 837D FC 10 CMP DWORD PTR SS:[EBP-4],10
0042F6DB |. 7D 2C |JGE SHORT L2AuthD.0042F709
0042F6DD |. 8B4D 08 |MOV ECX,DWORD PTR SS:[EBP+8]
0042F6E0 |. 034D FC |ADD ECX,DWORD PTR SS:[EBP-4]
0042F6E3 |. 0FBE11 |MOVSX EDX,BYTE PTR DS:[ECX]
0042F6E6 |. 8B45 08 |MOV EAX,DWORD PTR SS:[EBP+8]
0042F6E9 |. 0345 FC |ADD EAX,DWORD PTR SS:[EBP-4]
0042F6EC |. 0FBE48 FF |MOVSX ECX,BYTE PTR DS:[EAX-1]
0042F6F0 |. 33D1 |XOR EDX,ECX
0042F6F2 |. 8B45 FC |MOV EAX,DWORD PTR SS:[EBP-4]
0042F6F5 |. 83E0 0F |AND EAX,0F
0042F6F8 |. 0FBE4C05 EC |MOVSX ECX,BYTE PTR SS:[EBP+EAX-14]
0042F6FD |. 33D1 |XOR EDX,ECX
0042F6FF |. 8B45 08 |MOV EAX,DWORD PTR SS:[EBP+8]
0042F702 |. 0345 FC |ADD EAX,DWORD PTR SS:[EBP-4]
0042F705 |. 8810 |MOV BYTE PTR DS:[EAX],DL
0042F707 |.^EB C5 \JMP SHORT L2AuthD.0042F6CE
//endloop
0042F709 |> C745 FC 000000>MOV DWORD PTR SS:[EBP-4],0
0042F710 |. EB 09 JMP SHORT L2AuthD.0042F71B
//loop 循环
0042F712 |> 8B4D FC /MOV ECX,DWORD PTR SS:[EBP-4]
0042F715 |. 83C1 01 |ADD ECX,1
0042F718 |. 894D FC |MOV DWORD PTR SS:[EBP-4],ECX
0042F71B |> 837D FC 10 CMP DWORD PTR SS:[EBP-4],10
0042F71F |. 7D 18 |JGE SHORT L2AuthD.0042F739
0042F721 |. 8B55 08 |MOV EDX,DWORD PTR SS:[EBP+8]
0042F724 |. 0355 FC |ADD EDX,DWORD PTR SS:[EBP-4]
0042F727 |. 0FBE02 |MOVSX EAX,BYTE PTR DS:[EDX]
0042F72A |. 85C0 |TEST EAX,EAX
0042F72C |. 75 09 |JNZ SHORT L2AuthD.0042F737
0042F72E |. 8B4D 08 |MOV ECX,DWORD PTR SS:[EBP+8]
0042F731 |. 034D FC |ADD ECX,DWORD PTR SS:[EBP-4]
0042F734 |. C601 66 |MOV BYTE PTR DS:[ECX],66
0042F737 |>^EB D9 \JMP SHORT L2AuthD.0042F712
//end loop
0042F739 |> 8BE5 MOV ESP,EBP
0042F73B |. 5D POP EBP
0042F73C \. C3 RETN
Digital is offline  
Old 30.03.2005, 04:59   #4
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

void func(int para[4])
{
int i;
int num[4];


num[0] = para[0] * 0x3407f + 0x269735;
num[1] = para[1] * 0x340ff + 0x269741;
num[2] = para[2] * 0x340d3 + 0x269935;
num[3] = para[3] * 0x3433d + 0x269acd;

(char)para[0]=(char)num[0] ^ (char)para[0];

for(i=1;i < 0x10;i++)
{
*((char *)para+i) = (*((char *)para+i)) ^ (*((char *)para+i-1)) ^ (*((char *)num+i));
}

for(i=0;i< 0x10;i++)
{
if(*((char *)para+i) == 0)
*((char *)para+i) = 0x66;
}
}

//l2pass.cpp
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>

bool encryptPassword( char *pSrcString, char *pDstString )
{
char passKey[16];

memcpy( pDstString, pSrcString, 16 );

*((int *)passKey) = *((int *)pDstString)*213119 + 2529077;
*(((int *)passKey)+1) = *(((int *)pDstString) + 1)*213247 + 2529089;
*(((int *)passKey)+2) = *(((int *)pDstString) + 2)*213203 + 2529589;
*(((int *)passKey)+3) = *(((int *)pDstString) + 3)*213821 + 2529997;

pDstString[0] = pDstString[0] ^ passKey[0];

for(int i = 1; i < 16; i++) {
pDstString[ i ] = pDstString[ i ] ^ pDstString[ i - 1] ^ passKey[ i & 15];
}
for(i = 0; i < 16; i++) {
if(pDstString[ i ] == 0) {
pDstString[ i ] = 0x66;
}
}

return true;
}

void main(int argc, char *argv[])
{
unsigned char cPassword[30], encPassword[16];

int i;

if(argc < 2)
{
printf("Lineage2 Pass Encrypt Tools V1.0 by Anonymous\r\n\n"
"Usage: %s <password>\r\n", argv[0]);
return;
}

memset(cPassword, 0, sizeof(cPassword));
memset(encPassword, 0, sizeof(encPassword));

strncpy((char*)cPassword, argv[1], sizeof(cPassword));

encryptPassword((char*)cPassword, (char*)encPassword);

printf("pass: %s => 0x", argv[1]);
for(i=0; i<16; i++)
{
printf("%02X", encPassword [ i ] );
}
printf("\r\n");
}
Digital is offline  
Old 30.03.2005, 04:59   #5
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

<%
'************************************************* ****************************
'
' $author: 狂歌浪舞 QQ:5272052
' $version: 0.43
' $Last Update DateTime: 2004-09-22 20:25
' $GuestBook: http://bclz.52net.org/gb/
'
'************************************************* ****************************

'response.write encrypt("whowhowho")

public function encrypt(password)
dim key(16)
dim one,two,three,four
dim i
dim dstbytes(16)

bu_String2Bytes password, key
bu_String2Bytes password, dstbytes

one= bu_Bytes2Int(key, 0) * 213119 + 2529077
one = one - Fix(one/ 4294967296) * 4294967296
two = bu_Bytes2Int(key, 4) * 213247 + 2529089
two = two - Fix(two/ 4294967296) * 4294967296
three = bu_Bytes2Int(key, 8) * 213203 + 2529589
three = three - Fix(three/ 4294967296) * 4294967296
four = bu_Bytes2Int(key, 12) * 213821 + 2529997
four = four - Fix(four/ 4294967296) * 4294967296


call MyuwSplit(one, key(0), key(1), key(2), key(3))
call MyuwSplit(two, key(4), key(5), key(6), key(7))
call MyuwSplit(three, key(8), key(9), key(10), key(11))
call MyuwSplit(Four, key(12), key(13), key(14), key(15))

dstbytes(0) = dstbytes(0) xor key(0)

for i=1 to 15
dstbytes(i) = dstbytes(i) xor dstbytes(i-1) xor key(i and 15)
next

for i=0 to 15
if dstbytes(i) = 0 then
dstbytes(i) = &H66
end if
next

encrypt = "0x"
for i=0 to 15
if dstbytes(i) < &H10 then
encrypt = encrypt & "0" & Hex(dstbytes(i))
else
encrypt = encrypt & Hex(dstbytes(i))
end if
next
end function

Public Sub MyuwSplit(ByRef w, a, b, C, d)
d = Fix(w / &H1000000)
c = Fix((w - d * &H1000000) / &H10000)
b = Fix((w - d * &H1000000 - c * &H10000) / &H100)
a = Fix((w - d * &H1000000 - c * &H10000 - b * &H100))
End Sub

public Function bu_Bytes2Int(aBytes(), index)
dim rslt
rslt = aBytes(index) + aBytes(index+1)*256 + aBytes(index+2)*65536 + aBytes(index+3)*16777216

bu_Bytes2Int = rslt
End Function

Public Function bu_String2Bytes(str, aBytes())
nBytes = Len(str)
For i = 0 To nBytes - 1
aBytes(i) = Asc(Mid(str, i + 1, 1))
Next

bu_String2Bytes = nBytes

End Function

%>
Digital is offline  
Old 30.03.2005, 05:00   #6
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

public static byte[] L2EncryptPwd(string pwd)
{
char[] key = new char[16];
char[] dstStr = new char[16];
string encryptStr = "";
int one;
int two;
int three;
int four;

if(pwd.Length > 16)
{
return null;
}

Array.Copy(pwd.ToCharArray(), key, pwd.ToCharArray().Length);
Array.Copy(pwd.ToCharArray(), dstStr, pwd.ToCharArray().Length);

one = (int)key[0] + ((int)key[1] << 8) + ((int)key[2] << 16) + ((int)key[3] << 24);
one = one * 213119 + 2529077;
two = (int)key[4] + ((int)key[5] << 8) + ((int)key[6] << 16) + ((int)key[7] << 24);
two = two * 213247 + 2529089;
three = (int)key[8] + ((int)key[9] << 8) + ((int)key[10] << 16) + ((int)key[11] << 24);
three = three * 213203 + 2529589;
four = (int)key[12] + ((int)key[13] << 8) + ((int)key[14] << 16) + ((int)key[15] << 24);
four = four * 213821 + 2529997;

key[0] = (char)(one);
key[1] = (char)(one >> 8);
key[2] = (char)(one >> 16);
key[3] = (char)(one >> 24);

key[4] = (char)(two >> 0);
key[5] = (char)(two >> 8);
key[6] = (char)(two >> 16);
key[7] = (char)(two >> 24);

key[8] = (char)(three >> 0);
key[9] = (char)(three >> 8);
key[10] = (char)(three >> 16);
key[11] = (char)(three >> 24);

key[12] = (char)(four >> 0);
key[13] = (char)(four >> 8);
key[14] = (char)(four >> 16);
key[15] = (char)(four >> 24);

dstStr[0] = (char)((byte)dstStr[0] ^ (byte)key[0]);
// if((byte)dstStr[0] == 0)
// {
// encryptStr += "66";
// }
// else
// {
// encryptStr += ((byte)dstStr[0]).ToString("X2");
// }

for(int i=1; i<16; i++)
{
dstStr = (char)((byte)dstStr ^ (byte)dstStr[i-1] ^ (byte)key[i & 0xF]);
// if((byte)dstStr == 0)
// {
// encryptStr += "66";
// }
// else
// {
// encryptStr += ((byte)dstStr).ToString("X2");
// }

}

byte[] retVal = new byte[16];

for(int i=1; i<16; i++)
{
if((byte)dstStr == 0)
{
retVal = 0x66;
}
else
{
retVal = (byte)dstStr;
}
}


/*
for(int i=0; i<16; i++)
{
if((byte)dstStr == 0)
{
dstStr = (char)0x66;
}

encryptStr += ((byte)dstStr).ToString("X2");
}
*/


return retVal;
}
Digital is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:12.