Giter VIP home page Giter VIP logo

activation-script's Introduction

Wibus 👨‍💻    (   Email me.   Wibus on Twitter  )

Important

Development temporarily terminated.

I am currently preparing for the National College Entrance Examination (高考) in 2024.

To focus on my studies, I will be limiting my code time. I will probably only fix or otherwise focus on documentation issues for the time being.

Hi! I'm wibus! I am a 🎹 personal piano player and a 🎤 personal singer & maker, core team of 🔨 @jwcjs and 🏖 @mogland

I love myself, love the world, and always love my family. I hope I can become a FSD ( Full Stacks Developer | 全栈开发者) oneday.

I have been contributed to the Typecho ecosystem, and now I am working in Mog & Jwc.js development.

I began to learn vocal music and piano since I was a child, and I have won many first prizes in domestic and international competitions

  • 🔭 I’m currently working on a breakthrough blogging system 🏖 @mogland and web component framework 🔨 @jwcjs
  • 🌱 I’m currently learning 🧵 web design, and so on.
  • 🤔 I’m looking for help with 🥚 MicroService Module design.
  • 📫 How to reach me: 🏠 Home Page | ✍️ Blog (CN) | 🐦 Twitter
  • ⚡ Fun fact: Like sleeping. 💤
  • 🎵 I am currently focusing on the combination of 🇨🇳 Chinese style music and 💡 modern electronic music, and 🎹 piano music in the Baroque period.

Total time coded since Apr 24 2021




Stacks

React TypeScript Sass npm html5 Prettier TailwindCSS NestJS NodeJS MySQL github actions macOS vscode

我的开源项目

🎁 Projects⭐ Stars📚 Forks🛎 Issues📬 Pull requests💡 Last Commit
wibus-wee/PhotosProcessorStarsForksIssuesPull RequestsLast Commits
mogland/coreStarsForksIssuesPull RequestsLast Commits
mx-space/coreStarsForksIssuesPull RequestsLast Commits
jwcjs/coreStarsForksIssuesPull RequestsLast Commits
mogland-dev/mog-render-serviceStarsForksIssuesPull RequestsLast Commits
wibus-wee-ac/icalingua-theme-telegramStarsForksIssuesPull RequestsLast Commits

最近赞了...

曾经看了...

捉迷藏

Mog Github Innei


很感谢Innei所写的此项目,真的是我的idol!Innei's Blog:https://innei.ren
此文件 README 间隔 3 小时自动刷新生成!
刷新于:5/23/24, 5:20 PM
下一次刷新:5/23/24, 8:20 PM

Top Language by Repo My Stats
Top Language by Repo My Stats

activation-script's People

Contributors

ssttar avatar wibus-wee avatar zhuozhiyongde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

activation-script's Issues

[Application] Typora

// core file
// =====
// 验证许可证合法性
quickValidate = (e) => {
    const n = "L23456789ABCDEFGHJKMNPQRSTUVWXYZ";
    if (!/^([A-Z0-9]{6}-){3}[A-Z0-9]{6}$/.exec(e)) return !1; // 格式验证(6-6-6-6)
    var t = e.replace(/-/g, ""),
      i = t.substr(22);
    return (
      !t.replace(/[L23456789ABCDEFGHJKMNPQRSTUVWXYZ]/g, "") &&
      i ==
        ((e) => {
          for (var t = "", i = 0; i < 2; i++) {
            for (var a = 0, s = 0; s < 16; s += 2) a += n.indexOf(e[i + s]);
            t += n[(a %= n.length)];
          }
          return t;
        })(t)
    );
  },

getComputerName = async function () {
    var e = process.env.USER;
    switch ((e || (e = require("os").userInfo().username), process.platform)) {
      case "win32":
        return process.env.COMPUTERNAME + " | " + e + " | Windows";
      case "darwin":
        return new Promise((n) => {
          require("child_process").exec(
            "scutil --get ComputerName",
            { timeout: 5e3 },
            (t, i) => {
              n(
                !t && i
                  ? i.toString().trim() + " | " + e + " | darwin"
                  : require("os").hostname() + " | " + e + " | darwin"
              );
            }
          );
        });
      default:
        return require("os").hostname() + " | " + e + " | Linux";
    }
  },

doActivation = async function (e, n, t) {
    // 执行邮箱地址的格式验证 Start
    if (
      ((e = (e || "")
        .replace(/^[\s\u200b ]/g, "")
        .replace(/[\s\u200b ]$/g, "")),
      (n = (n || "").replace(/^[\s\u200b ]/g, "").replace(/[\s\u200b ]$/g, "")),
      !(function (e) {
        return /^[^\s@'"/\\=?]+@[^\s@'"/\\]+\.[^\s@'"/\\]+$/.test(e);
      })(e))
    )
      return [!1, "Please input a valid email address"];
    // 执行邮箱地址的格式验证 End

    // 执行许可证的合法性验证 Start
    if (!quickValidate(n)) return [!1, "Please input a valid license code"];
    // 执行许可证的合法性验证 End

    // 构造参数 Start
    const i = {
      v: getOS() + "|" + app.getVersion(),
      license: n,
      email: e,
      l: await getComputerName(), // scutil --get ComputerName
      f: await getFingerPrint(),
      u: app.setting.generateUUID(),
      type: global.devVersion ? "dev" : "",
      force: t,
    };
    JSON.stringify(i);
    // 构造参数 End
    try {
      const e = {
        data: {
          code: 0,
          msg: Buffer.from(
            JSON.stringify({
              deviceId: i.u, // generateUUID
              fingerprint: i.f, // getFingerPrint
              email: i.email,
              license: i.license, // quickValidate
              version: i.v, // getOS + app.getVersion
              date: new Date().toLocaleDateString("en-US"),
            }),
            "utf-8"
          ).toString("base64"),
        },
      };
// others
const ActiveResponseCode = {
    SUCCESS: 0,
    OUT_OF_LIMIT: 1,
    INVALIDATE: -1,
    WRONG_USER: -2,
  },
// utils
const getFingerPrint = async () => {
  if (!fingerPrint) {
    if (isWin) {
      const e = mustRequire("native-reg"),
        n = e.openKey(
          e.HKEY.LOCAL_MACHINE,
          "SOFTWARE\\Microsoft\\Cryptography",
          e.Access.WOW64_64KEY | e.Access.READ
        );
      (fingerPrint = e.getValue(n, null, "MachineGuid")), e.closeKey(n);
    } else
      fingerPrint = await require("node-machine-id").machineId({
        original: !0,
      });
    fingerPrint || Raven.captureMessage("[License] Failed to get fingerPrint"),
      (fingerPrint = makeHash(fingerPrint, "typora")
        .substr(0, 10)
        .replace(/[/=+-]/g, "a")),
      isMac && (fingerPrint += "darwin");
  }
  return fingerPrint;
};

// makeHash
makeHash = function () {
    var e = Array.from(arguments);
    const n = require("crypto").createHash("sha256");
    return (
      e.forEach((e) => {
        n.update(e);
      }),
      n.digest("base64")
    );
  },

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.