MagicWin 98 1.30f的注册机源码
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') {
ch = *pstr;
*pstr = *(pstr+1);
/* 将最后不大于4长度的字符循环左移一位 */
*(pstr+1) = ch;
pstr++;
}
pstr = S_N + HEAD_SIZE;
sum = HEAD_SIZE;
while (*pstr != '\0') {/* 从第四个字符起将转换了得 */
*pstr += sum; /* 字符串依次加上0x10 + 在 */
*pstr += 0x10; /* 字符串中该字符的位置。注:*/
pstr++; /* 第一个字符的位置为0,以此 */
sum++; /* 类推 */
}
strcat(S_N, User_Name); /* 将User_Name字符串(转变后的) */
/* 接到S_N字符串的后面,此时的 */
/* S_N字符串就是正确的Code了 */
printf ("\nThe MagicWin 98 1.30f software Code is: %s \n",S_N);
}
else {
printf ("Name can't be NULL.");
}
}
else {
printf ("Serials Number Must be %d char or more.\n",HEAD_SIZE+1);
}
}
void int2str(int n, char *pt) {
int k = 0;
ldiv_t lx;
lx.quot = n;
while (lx.quot != 0) {
lx = ldiv(lx.quot, 10L);
*(pt+k) = lx.rem + 0x30;
k++;
}
*(pt+k) = '\0';
strrev(pt);
}
(出处:赢政天下收集整理)
相关文章:
·MD5的VB类模块源码
·adsubstract pro 2.1注册器(带源码)
·HappyIcon注册机TC源码
·irfanview注册器源码
·回家(PBackhome)v 1.02版注册机 源码
·winzip注册机 源码
·语音界面2.0算法分析及注册机源码!
相关软件:
·智能源码统计专家 v3.2
·智能源码统计专家 V3.4.05
·智能源码统计专家 V3.5
·源码备份 V2.22
→ 特别推荐
→ 热点TOP10
关于我们 |
帮助(?)
| 广告服务 |
版权声明 |
商业合作 |
发展历程 |
加盟我们 |
联系我们
Copyright © 1999-2003
winzheng.com All Rights Reserved.
繁体版:由华琦数码技术提供
Powered
by:MeSky.Net
当年一篇教程能让一台电脑焕然一新;今天的效率工具换成了 AI。 想知道当下最可靠的 AI 模型怎么选?看 赢政指数——我们用了 28 年的选软件严谨,现在用来评测大模型。