中华资讯网2003-09-28 01:32:00
假定 WSD700-anyno-?7???-7??7?这样的序列号总是有解的。
遍历10000000次也就几个小时吧。

#include
#include
#include

int main(int argc, char* argv[])
{
HWND hwndTop, hwndMiddle, hwndPart1, hwndPart2, hwndPart3, hwndPart4, hwndNext;
LONG lStyle;
char sn[6];
int i, j;

hwndTop = FindWindow( L"{3CFFFC43-D199-46fb-BFEE-8342B653A491}", L"Macromedia Product Activation" );
if( hwndTop==NULL ) {
printf( "Can't find activation window, please run it first. " );
return 0;
}
hwndMiddle = FindWindowEx( hwndTop, NULL, L"#32770", L"" );
if( hwndMiddle==NULL ) {
wprintf( L"Can't find middle window, the version is not supported. " );
return 0;
}
hwndPart1 = FindWindowEx( hwndMiddle, NULL, L"Edit", NULL );
hwndPart2 = FindWindowEx( hwndMiddle, hwndPart1, L"Edit", NULL );
hwndPart3 = FindWindowEx( hwndMiddle, hwndPart2, L"Edit", NULL );
hwndPart4 = FindWindowEx( hwndMiddle, hwndPart3, L"Edit", NULL );
hwndNext = FindWindowEx( hwndMiddle, NULL, L"Button", L"&Continue" );

if( hwndPart1==NULL || hwndPart2==NULL || hwndPart3==NULL || hwndPart4==NULL || hwndNext==NULL ) {
wprintf( L"Can't find some control, the version is not supported. " );
return 0;
}

printf( "Input 5 number to begin. " );
scanf( "%5s", sn );

SendMessage( hwndPart1, EM_SETSEL, 0, 8 );
SendMessage( hwndPart1, WM_CHAR, 'W', 1L );
SendMessage( hwndPart1, WM_CHAR, 'S', 1L );
SendMessage( hwndPart1, WM_CHAR, 'D', 1L );
SendMessage( hwndPart1, WM_CHAR, '7', 1L );
SendMessage( hwndPart1, WM_CHAR, '0', 1L );
SendMessage( hwndPart1, WM_CHAR, '0', 1L );
SendMessage( hwndPart2, EM_SETSEL, 0, 8 );
for( i=0; i<5; i++ )
SendMessage( hwndPart2, WM_CHAR, sn[i], 1L );
for( i=999; i>=0; i-- ) {
printf( "." );
SendMessage( hwndPart4, EM_SETSEL, 0, 8 );
SendMessage( hwndPart4, WM_CHAR, '7', 1L );
SendMessage( hwndPart4, WM_CHAR, '0'+i/100, 1L );
SendMessage( hwndPart4, WM_CHAR, '0'+(i%100)/10, 1L );
SendMessage( hwndPart4, WM_CHAR, '7', 1L );
SendMessage( hwndPart4, WM_CHAR, '0'+(i%10), 1L );
for( j=9999; j>=0; j-- ) {
SendMessage( hwndPart3, EM_SETSEL, 0, 8 );
SendMessage( hwndPart3, WM_CHAR, '0'+j/1000, 1L );
SendMessage( hwndPart3, WM_CHAR, '7', 1L );
SendMessage( hwndPart3, WM_CHAR, '0'+(j%1000)/100, 1L );
SendMessage( hwndPart3, WM_CHAR, '0'+(j%100)/10, 1L );
SendMessage( hwndPart3, WM_CHAR, '0'+(j%10), 1L );

lStyle = GetWindowLong( hwndNext, GWL_STYLE ) & WS_DISABLED;
if( lStyle==0 )
return 0;
}
}

return 0;
}

http://ZhongHua.NetFirms.com



--文学城www.wenxuecity.com--
非常感谢阿!!!2003-09-28 02:26:00
能不能解释一下如何使用这种源代码?
yanon2003-09-28 06:40:00
Can you write a keygen?