zoukankan      html  css  js  c++  java
  • 注册机代码~

    做看雪的crackme才看出差距,包含的东西比别的多。

    这个ck没别的,用代码校验和来做反调试,于是下硬件断点,直接还原上代码

    // Reverse11.cpp : Defines the entry point for the console application.
    //
    
    #include "stdafx.h"
    #include "windows.h"
    
    int _tmain(int argc, _TCHAR* argv[])
    {
        char username[30] = { 0 };
        char password[30] = { 0 };
        scanf_s("%s", username, 30);
        scanf_s("%s", password, 30);
    
        BYTE v1 = 0;
        BYTE v2 = 0;
        char str[] = "ZWATRQLCGHPSXYENVBJDFKMU";
        if (password[1] != 'E' || strlen(password) != 0xa)
        {
            printf_s("wrong");
            system("pause");
            return 0;
        }
        for (int i = 0; i < strlen(password); i++)
        {
            if (password[i]<'A' || password[i]>'Z')
            {
                printf_s("wrong");
                system("pause");
                return 0;
            }
                
        }
        int temp1 = 0;
        for (int i = 0; i < strlen(username); i++)
        {
            temp1 += username[i];
        }
        v1 = temp1 % 0x18;
        int temp2 = 0;
        for (int i = 0; i < 9; i++)
        {
            temp2 += password[i];
        }
        v2 = temp2 / 0x9;
    
        if (v1 > 0x18)
        v1 -= 0x18;
        if (password[0] != str[v1])
        {
            printf_s("wrong");
            system("pause");
            return 0;
        }
    
        BYTE v3 = v1 + (v1 + 0x18);
        if (v3 > 0x18)
        v3 -= 0x18;
        if (password[2] != str[v3])
        {
            printf_s("wrong");
            system("pause");
            return 0;
        }
        for (int i = 2; i < 8; i++)
        {
            v1 -= 0x41;
            v3 += v1;
            if (v3 > 0x18)
                v3 -= 0x18;
            if (password[i] != str[v3])
            {
                printf_s("wrong");
                system("pause");
                return 0;
            }
        }
        if (v2 == password[9])
        {
            printf_s("right");
            system("pause");
            return 0;
        }
    
    
        return 0;
    }
  • 相关阅读:
    Chrome Extension 扩展程序 小白入门
    gulp 打包报错:ReferenceError: internalBinding is not defined
    error in static/js/xxx.js from UglifyJs Unpected token: punc() [static/js/xxx.js]
    ES6-
    浏览器的渲染原理(转载)
    nodeType、nodeName和nodeValue
    浏览器 HTTP 协议缓存机制详解
    JS函数的上下文环境
    ready和onload的区别
    自定义事件
  • 原文地址:https://www.cnblogs.com/distanceblog/p/5370449.html
Copyright © 2011-2022 走看看