亦步亦趋wp
其实可以直接最后在内存中查看序列号,但是为了锻炼自己还是写了一下注册机。#include<iostream>
using namespace std;
int main()
{
int ch1[] = { 0xaa,0x89,0xc4,0xfe,0x46};
int ch2[] = { 0x78,0xf0,0xd0,0x03,0xe7};
int ch3[] = { 0xf7,0xfd,0xf4,0xe7,0xb9};
int ch4[] = { 0xb5,0x1b,0xc9,0x50,0x73};
int ch5[] = { 0,0,0,0 };
int flag = { 0 };
string username;
cout << "输入用户名:";
cin >> username;
int length = username.length();
for (int i = 0; i < length; i++)
{
flag = int(username);
}
for (int i = 1, j = -1; i <= length; i++)
{ j++;
if (j >= 5)
j = 0;
int mid = flag;
int sum = flag ^ ch1;
flag = sum;
ch1 = mid;
}
for (int i = length , j = -1; i > 0; i--)
{
j++;
if (j >= 5)
j = 0;
int mid = flag;
flag ^= ch2;
ch2 = mid;
}
for (int i = 1, j = -1; i <= length; i++)
{
j++;
if (j >= 5)
j = 0;
int mid = flag;
flag ^= ch3;
ch3 = mid;
}
for (int i = length , j = -1; i > 0; i--)
{
j++;
if (j >= 5)
j = 0;
int mid = flag;
flag ^= ch4;
ch4 = mid;
}
for (int i = 1, j = -1; i <= length; i++)
{
j++;
if (j >= 4)
j = 0;
ch5 = (ch5 + flag) % 0x100;
}
long long eax = (double)ch5 + (double)ch5*0x100 + (double)ch5*0x10000 + (double)ch5*0x1000000;
int i = 0;
while (eax)
{
flag = (eax % 0x0a) + 0x30;
eax = eax / 0x0a;
i++;
}
for (int u = i - 1; u >= 0; u--)
cout << char(flag);
return 0;
}
运行结果:
输入:123456
输出:894904543
页:
[1]