Initial commit

This commit is contained in:
Mason
2021-12-01 15:20:29 +08:00
parent 6152b16fca
commit d5c1bc55c2
2 changed files with 18 additions and 0 deletions

17
example/keygen.js Normal file
View File

@@ -0,0 +1,17 @@
function randomSerial() {
var $chars = 'L23456789ABCDEFGHJKMNPQRSTUVWXYZ';
var maxPos = $chars.length;
var serial = '';
for (i = 0; i < 22; i++) {
serial += $chars.charAt(Math.floor(Math.random() * maxPos));
}
serial += (e => {
for (var t = "", i = 0; i < 2; i++) {
for (var a = 0, s = 0; s < 16; s += 2) a += $chars.indexOf(e[i + s]);
t += $chars[a %= $chars.length]
}
return t
})(serial)
return serial.slice(0, 6) + "-" + serial.slice(6, 12) + "-" + serial.slice(12, 18) + "-" + serial.slice(18, 24);
}
console.log(randomSerial());

1
example/patch/License.js Normal file

File diff suppressed because one or more lines are too long