吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 1686|回复: 7
收起左侧

[MacOS逆向] LunaModeler

[复制链接]
niwajiang 发表于 2023-10-30 16:36

LunaModeler是一款使用 Electron 开发的数据建模软件,这是一款收费软件,只有14天试用期。
发现了这篇文章,但是我使用没有生效。于是还是自己动手吧。

关于使用Electron开发的软件操作方法可以参考这里修改 NoSQLBooster for MongoDB 试用时间

源码已经摆出来了

思路

  • 根据产品确认生成激活文件的位置。

  • 随机生成一个合适的时间

  • 写激活文件

  • 调用执行

    • node index.js luna

实现

const crypto = require('crypto');
const moment = require('moment');
const fs = require('fs');

const encryption_key = 'BUA9VFNtbRQM85BODcCbXlrUtXXH3D3x';
const initialization_vector = '665UHDQ5qdBnI777';

function encrypt(text) {
  const cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(encryption_key), Buffer.from(initialization_vector));
  let crypted = cipher.update(text, 'utf8', 'hex');
  crypted += cipher.final('hex');
  return crypted;
}

function saveLicense(content, path) {
  const fileName = `${path}dts.asar.sys`;
  const encryptedContent = encrypt(JSON.stringify(content));
  fs.writeFileSync(fileName, encryptedContent);
}

// Get product name from argument
const productName = process.argv[2];
let pathName;

switch (productName) {
  case 'luna':
    pathName = 'LunaModeler';
    break;
  case 'meteor':
    pathName = 'MeteorModeler';
    break;
  case 'perseid':
    pathName = 'PerseidModeler';
    break;
  case 'galaxy':
    pathName = 'GalaxyModeler';
    break;
  case 'moon':
    pathName = 'MoonModeler';
    break;
  default:
    console.log('Invalid product name:');
    console.log('Usage: node index.js <product_name>');
    console.log('Where <product_name> is one of: luna, meteor, perseid, galaxy, moon');
    process.exit(1);
    break;
}

let licPath = '';
let username;
if (process.platform === 'win32') {
  // Path of app userData
  username = process.env.USERNAME;
  licPath = `C:\\Users\\${username}\\AppData\\Roaming\\`;
} else if (process.platform === 'darwin') {
  // Path of app userData
  username = process.env.USER;
  licPath = `/Users/${username}/Library/Application Support/`;
} else if (process.platform === 'linux') {
  // Path of app userData
  username = process.env.USER;
  licPath = `/home/${username}/.config/`;
} else {
  console.log('Unsupported platform');
  process.exit(1);
}

licPath += `${pathName}/`;

const fileName = `${licPath}dt.asar.sys`;
const expires = moment().add(60, 'years').unix();
fs.writeFileSync(fileName, `${expires.toString()}963`);

const stamp = new Date();

const randomKey = `${crypto.randomBytes(4).toString('hex')}-${crypto.randomBytes(4).toString('hex')}-${crypto.randomBytes(4).toString('hex')}-${crypto
  .randomBytes(4)
  .toString('hex')}`;
const randomMail = `${crypto.randomBytes(10).toString('hex')}@${crypto.randomBytes(10).toString('hex')}.com`;

/**
 * Returns a random number between min (inclusive) and max (exclusive)
 */
function getRandomArbitrary(min, max) {
  return Math.random() * (max - min) + min;
}

const licData = {
  licType: 'commercial',
  key: randomKey,
  purchase: {
    seller_id: 'Datensen',
    short_product_id: 'abc',
    product_name: productName,
    email: randomMail,
  },
  created: moment(stamp).subtract(1, 'days').unix(),
  uses: getRandomArbitrary(99999, 999999),
};

saveLicense(licData, licPath);
console.log('ok');
process.exit(0);

免费评分

参与人数 3吾爱币 +9 热心值 +3 收起 理由
笙若 + 1 + 1 谢谢@Thanks!
Hmily + 7 + 1 欢迎分析讨论交流,吾爱破解论坛有你更精彩!
furry + 1 + 1 谢谢@Thanks!

查看全部评分

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

小龙虾辣菊花 发表于 2023-10-30 16:55
可以可以
今朝有酒须纵歌 发表于 2023-10-30 17:10
hyc12 发表于 2023-10-30 17:16
luoyueqing 发表于 2023-10-30 19:52
学习了!
co2qy 发表于 2023-11-1 10:43
学习了!
ouzhenwei 发表于 2023-11-1 22:05
学习学习!
xiaoningming050 发表于 2023-11-14 22:02
有收获,感谢
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止灌水或回复与主题无关内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-4-29 23:40

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

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