| MagicWin981.30f的注册机源码 |
|
| 作者:未知 文章来源:网络收集 点击数: 更新时间:2006-3-29 15:58:53
|
|
MagicWin 98 1.30f 注册机:
#include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h>
#define BUF_LEN 30 #define HEAD_SIZE 3 /* 前三个字符不作处理,Serial Number的长度要大于这个值 */ #define MOV_SIZE 4 /* 对Serial Number处理时,间隔4个字节相互替换 */ void int2str(int n, char *pt); /* 好久没用TC20了,所以不知道怎么将Int型的值转换成字符串 */
main () { char S_N[BUF_LEN]; /* Serial Number 存放的数组 */ char User_Name[BUF_LEN]; /* 用户名存放的数组 */ char *pstr, ch; unsigned int sum = 0;
pstr = S_N;
printf("Please Enter your Serials Number: "); scanf("%s",S_N);
if (strlen(S_N) > HEAD_SIZE) { printf("\nPlease Enter your Name: "); scanf("%s",User_Name); if ((sum = strlen(User_Name)) > 0) { pstr = User_Name; /* 将用户名字符的ASCII */ sum += pstr; /* 值累加,并加上用户名 */ while (*pstr++ != '\0') /* 长度。 */ sum += *pstr;
int2str(sum, User_Name); /* 求出这个Int对应的字符串 */
pstr = S_N + HEAD_SIZE; while (strlen(pstr) > MOV_SIZE) { /* 每隔4个字符xchg */ ch = *pstr; *pstr = *(pstr + MOV_SIZE); *(pstr + MOV_SIZE) = ch; pstr++; } while (*pstr != '\0' && *(pstr + 1) != '\0') {   [1] [2] [3] 下一页
|
|
[ 收藏此页到: 天天|和讯|博采|ViVi|狐摘|我摘|天极 ] 文章录入:kinda 责任编辑:kinda |
|
上一篇文章: Tornado2之Licence暴力破解 下一篇文章: irfanview注册器源码 |
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |