• 大小: 11KB
    文件类型: .gz
    金币: 1
    下载: 0 次
    发布日期: 2021-05-23
  • 语言: 其他
  • 标签: libxl  xls  

资源简介

libxl注册机源码,C写的,linux和windows都能跑,可支持3.8.2版本 $ tar zxvf keygen.tar.gz $ ./keygen test 拿到执行后生成name和key,调用下面函数进行注册即可! xlBookSetKey(book, L"yourname", L"yourkey")

资源截图

代码片段和文件信息

#include 
#include 
#include 
#include “md5.h“


//0 ->success
int checkCondition(char k26 char k28 char k30)
{
if (k28 + k30 - 0x69 == k26 && k28 >= 0x63 && k28 != 0x65)
{
if (k28 == 0x66)
return k30 >= 0x6C ? 0 : -1;
else
return 0; // success
}
return -1;
}


const char* calcReginsterCode(const char* key)
{
static char retcode[8 + 33] = { 0 };

const char* suffix = “windows-“;
strncpy(retcode suffix strlen(suffix));
char* code32 = retcode + strlen(suffix);

const char* odd = “22200ce06b66a“;
int i = 0;
for (i = 0; i < strlen(odd); ++i)
{
code32[i * 2] = odd[i];
}

int keylen = strlen(key);
char* flip_key = malloc(keylen + 1);
memset(flip_key 0 keylen + 1);
strncpy(flip_key key keylen);
for (i = 0; i < keylen / 2; i++)
{
char temp = flip_key[i];
flip_key[i] = flip_key[keylen - i - 1];
flip_key[keylen - i - 1] = temp;
}

unsigned char flip_key_md5[16] = { 0 };
if (0 != mbedtls_md5_ret(flip_key keylen flip_key_md5))
return NULL;

free(flip_key);

for (i = 0; i < 8; i++)
{
char data[3] = { 0 };
sprintf(data “%02x“ flip_key_md5[i]);
code32[i * 4 + 1] = data[0];
code32[i * 4 + 3] = data[1];
}

code32[26] = 0x6F;
code32[28] = 0x70;
code32[30] = 0x68;
if (0 != checkCondition(code32[26] code32[28] code32[30]))
return NULL;
/*
code32[28] + code32[30] - 0x69 == code32[26];
code32[28] >= 0x63;
code32[28] != 0x65;
code32[28] == 0x66 && code32[30] >= 0x6C;
*/
return retcode;
}


int main(int argc const char** argv)
{
if (argc < 2)
{
printf(“缺少参数注册机的用户名(英文或数字):\n“);
return 0;
}

const char* name = argv[1];

const char* key = calcReginsterCode(name);
printf(“\n \tname:%s\n\tkey:%s\n“ name key);
    return 0;
}

评论

共有 条评论