汇编网首页登录博客注册
240420643的学习博客
博客首页博客互动【做检测题】论坛求助

我的博客

个人首页 |  我的文章 |  我的相册 |  我的好友 |  最新访客 |  文章收藏 |  论坛提问 |  友情链接 |  给我留言  
图片载入中
学习动态
好友圈
文章收藏

[2010-03-15 14:21] 一个CM的注册机!!

图片载入中
CM在如下地址:
http://www.unpack.cn/viewthread.php?tid=18678&extra=&page=1


#include <stdio.h>
#include <stdlib.h>
#include <math.h>

void main()
{
  char usr[100];   /*放输入的用户名*/ 
  char const_str[]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
  char fin_str[3];     /*将注册码的前3位放在这里*/
  int i,str_len;
  double tol1=0;
  long int temp1;
  gets(usr);                /*接收用户名*/
  str_len=strlen(usr);      /*获取用户名长度*/ 
  for(i=0;i<str_len;i++)    /*循环计算*/
  {
    tol1+=usr[str_len-i-1];
    tol1=tol1*95.0; 
  }
  temp1=tol1;
  while(temp1>4294967295)
  {
    temp1=temp1>>4;
  }
  while(temp1>300)
    {
      temp1-=51;
    }
    temp1%=51;
    fin_str[0]=const_str[temp1];       /*注册码的第一位*/
         
    temp1=tol1;
    temp1^=4417869;
    while(temp1>300)
    {
      temp1-=51;
    }
    fin_str[1]=const_str[temp1%51]^32;     /*注册码第二位*/
    fin_str[2]='-';                         /*注册码的第三位*/
    printf("%c%c%c",fin_str[0],fin_str[1],fin_str[2]);
    temp1=tol1;
    printf("%04X",temp1>>16);   
    printf("%X",temp1);
    getch();
}
评论次数(2)  |  浏览次数(1215)  |  类型(加密与解密) |  收藏此文  | 

[  versaariel   发表于  2010-03-17 09:31  ]

能把注册机写出来,挺厉害的

[  游客   发表于  2010-06-23 13:01  ]

厉害!!!

 
 请输入验证码  (提示:点击验证码输入框,以获取验证码