学逆向论坛

找回密码
立即注册

只需一步,快速开始

发新帖

2万

积分

41

好友

1171

主题

[Reverse] 亦步亦趋wp

发表于 2021-3-29 14:11:22 | 查看: 4063| 回复: 0

相关题目:

♦ 亦步亦趋

其实可以直接最后在内存中查看序列号,但是为了锻炼自己还是写了一下注册机。

#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[100] = { 0 };
string username;
cout << "输入用户名:";
cin >> username;
int length = username.length();
for (int i = 0; i < length; i++)
{
flag[i] = int(username[i]);
}

for (int i = 1, j = -1; i <= length; i++)
{    j++;
    if (j >= 5)
        j = 0;
    int mid = flag[i];
    int sum = flag[i] ^ ch1[j];
    flag[i] = sum;
    ch1[j] = mid;
}
for (int i = length , j = -1; i > 0; i--)
{
    j++;
    if (j >= 5)
        j = 0;
    int mid = flag[i];
    flag[i] ^= ch2[j];
    ch2[j] = mid;
}
for (int i = 1, j = -1; i <= length; i++)
{
    j++;
    if (j >= 5)
        j = 0;
    int mid = flag[i];
    flag[i] ^= ch3[j];

    ch3[j] = mid;


}
for (int i = length , j = -1; i > 0; i--)
{
    j++;
    if (j >= 5)
        j = 0;
    int mid = flag[i];
    flag[i] ^= ch4[j];

    ch4[j] = mid;


}
for (int i = 1, j = -1; i <= length; i++)
{
    j++;
    if (j >= 4)
        j = 0;
    ch5[j] = (ch5[j] + flag[i]) % 0x100;
}
long long eax = (double)ch5[0] + (double)ch5[1]*0x100 + (double)ch5[2]*0x10000 + (double)ch5[3]*0x1000000;
int i = 0;
while (eax)
{
    flag[i] = (eax % 0x0a) + 0x30;
    eax = eax / 0x0a;
    i++;
}
for (int u = i - 1; u >= 0; u--)
    cout << char(flag[u]);

return 0;
}


运行结果:
输入:123456
输出:894904543

温馨提示:
1.如果您喜欢这篇帖子,请给作者点赞评分,点赞会增加帖子的热度,评分会给作者加学币。(评分不会扣掉您的积分,系统每天都会重置您的评分额度)。
2.回复帖子不仅是对作者的认可,还可以获得学币奖励,请尊重他人的劳动成果,拒绝做伸手党!
3.发广告、灌水回复等违规行为一经发现直接禁言,如果本帖内容涉嫌违规,请点击论坛底部的举报反馈按钮,也可以在【投诉建议】板块发帖举报。
论坛交流群:672619046

小黑屋|手机版|站务邮箱|学逆向论坛 ( 粤ICP备2021023307号 )|网站地图

GMT+8, 2024-12-22 13:23 , Processed in 0.286826 second(s), 37 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表