fca-priyansh 15.0.0 → 17.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/Extra/Balancer.js +49 -0
- package/Extra/Bypass/956/index.js +234 -0
- package/Extra/Bypass/test/aaaa.json +170 -0
- package/Extra/Bypass/test/index.js +188 -0
- package/Extra/Database/index.js +249 -140
- package/Extra/ExtraAddons.js +35 -33
- package/Extra/ExtraFindUID.js +3 -1
- package/Extra/ExtraGetThread.js +303 -56
- package/Extra/ExtraUptimeRobot.js +15 -3
- package/Extra/Html/Classic/script.js +3 -3
- package/Extra/Security/AES_256_GCM/index.js +0 -0
- package/Extra/Security/Base/Step_1.js +6 -0
- package/Extra/Security/Base/Step_2.js +22 -0
- package/Extra/Security/Base/Step_3.js +22 -0
- package/Extra/Security/Base/index.js +191 -0
- package/Extra/Security/Index.js +5 -146
- package/Extra/Security/Step_1.js +4 -9
- package/Extra/Security/Step_2.js +2 -0
- package/Extra/Security/Step_3.js +4 -2
- package/Extra/Src/Change_Environment.js +1 -1
- package/Extra/Src/Check_Update.js +67 -0
- package/Extra/Src/History.js +2 -2
- package/Extra/Src/Instant_Update.js +65 -0
- package/Extra/Src/Premium.js +35 -38
- package/Extra/Src/Release_Memory.js +160 -0
- package/Extra/Src/Websocket.js +213 -0
- package/Extra/Src/image/checkmate.jpg +0 -0
- package/Extra/Src/test.js +28 -0
- package/Extra/Src/uuid.js +1 -1
- package/Func/AcceptAgreement.js +4 -5
- package/Func/ClearCache.js +7 -7
- package/Func/ReportV1.js +5 -5
- package/LICENSE +1 -4
- package/Language/index.json +59 -8
- package/Main.js +1444 -0
- package/README.md +198 -1
- package/broadcast.js +43 -37
- package/index.js +305 -1709
- package/logger.js +4 -4
- package/package.json +16 -11
- package/src/Dev_Horizon_Data.js +3 -3
- package/src/Dev_getThreadInfoOLD.js +422 -0
- package/src/Dev_shareTest2.js +68 -0
- package/src/Dev_shareTest3.js +71 -0
- package/src/Premium.js +8 -13
- package/src/Screenshot.js +4 -6
- package/src/editMessage.js +53 -0
- package/src/getAccessToken.js +0 -4
- package/src/getFriendsList.js +1 -1
- package/src/getMessage.js +26 -3
- package/src/getThreadHistory.js +1 -1
- package/src/getThreadInfo.js +237 -161
- package/src/getThreadInfoOLD.js +422 -0
- package/src/getThreadMain.js +1 -1
- package/src/getUID.js +3 -3
- package/src/getUserInfo.js +56 -73
- package/src/getUserInfoMain.js +2 -2
- package/src/getUserInfoV2.js +0 -4
- package/src/getUserInfoV3.js +3 -3
- package/src/getUserInfoV4.js +5 -5
- package/src/getUserInfoV5.js +4 -4
- package/src/listenMqtt.js +905 -625
- package/src/listenMqttV1.js +846 -0
- package/src/sendMessage.js +54 -2
- package/src/sendMqttMessage.js +71 -0
- package/src/setPostReaction.js +3 -3
- package/src/shareContact.js +55 -0
- package/src/shareLink.js +58 -0
- package/src/unsendMessage.js +28 -20
- package/src/unsendMqttMessage.js +66 -0
- package/utils.js +1567 -138
- package/.gitattributes +0 -2
- package/gitattributes +0 -2
- package/gitignore.txt +0 -10
@@ -0,0 +1,191 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
const fs = require('fs-extra');
|
4
|
+
const utils = require('../../../utils');
|
5
|
+
const logger = require('../../../logger');
|
6
|
+
const Step_3 = require('./Step_3');
|
7
|
+
const Database = require("../../Database");
|
8
|
+
const Already_Action = { First: 0, Encode: { Status: false, Data: Array }, Decode: { Status: false, Data: Array } };
|
9
|
+
|
10
|
+
var ArrPassWord;
|
11
|
+
|
12
|
+
if (!fs.existsSync(process.cwd() + '/Horizon_Database') || !fs.existsSync(process.cwd() + '/Horizon_Database/RandPass.json')) {
|
13
|
+
const crypto = require('crypto');
|
14
|
+
ArrPassWord = Array.from({length: 101}, (_,i) => crypto.randomBytes(5).toString('hex'));
|
15
|
+
if (Database().has('Security')) {
|
16
|
+
Database().delete('Security');
|
17
|
+
}
|
18
|
+
if (!fs.existsSync(process.cwd() + '/Horizon_Database')) {
|
19
|
+
fs.mkdirSync(process.cwd() + '/Horizon_Database');
|
20
|
+
}
|
21
|
+
fs.writeFileSync(process.cwd() + '/Horizon_Database/RandPass.json', JSON.stringify(ArrPassWord, null, 2), 'utf8');
|
22
|
+
}
|
23
|
+
|
24
|
+
else {
|
25
|
+
ArrPassWord = JSON.stringify(fs.readFileSync(process.cwd() + '/Horizon_Database/RandPass.json'));
|
26
|
+
}
|
27
|
+
|
28
|
+
/**
|
29
|
+
* It creates a random string of a given length
|
30
|
+
* @param length - The length of the string to be generated.
|
31
|
+
* @returns A string of random characters.
|
32
|
+
*/
|
33
|
+
|
34
|
+
function CreateFakeType2(length) {
|
35
|
+
var result = '';
|
36
|
+
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz/+0123456789';
|
37
|
+
var charactersLength = characters.length;
|
38
|
+
for ( var i = 0; i < length; i++ ) result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
39
|
+
return result;
|
40
|
+
}
|
41
|
+
|
42
|
+
/**
|
43
|
+
* It returns a random number between the min and max values.
|
44
|
+
* @param min - The minimum number that can be generated.
|
45
|
+
* @param max - The maximum number that can be generated.
|
46
|
+
* @returns A random number between the min and max values.
|
47
|
+
*/
|
48
|
+
|
49
|
+
function Between(min, max) {
|
50
|
+
return parseInt(Math.random() * (max - min) + min);
|
51
|
+
}
|
52
|
+
|
53
|
+
/**
|
54
|
+
* It creates a random number between 0 and 90, then subtracts a random number between 10 and 33 from
|
55
|
+
* it, and then adds 10 to it.
|
56
|
+
*
|
57
|
+
* So, the result is a number between -23 and 90.
|
58
|
+
*
|
59
|
+
* The function also creates a random number between 10 and 70, and a random number between 10 and 33.
|
60
|
+
*
|
61
|
+
* The function returns an object with the following properties:
|
62
|
+
*
|
63
|
+
* Security: the random number between 0 and 90
|
64
|
+
* Previous: the random number between -23 and 90
|
65
|
+
* Secret: the random number between 10 and 33
|
66
|
+
* Number: the random number between 10 and 70
|
67
|
+
* @returns An object with the following properties:
|
68
|
+
*/
|
69
|
+
|
70
|
+
function CreateSecurity() {
|
71
|
+
var Security = Between(0,90);
|
72
|
+
var Secret = Between(10,33);
|
73
|
+
return {
|
74
|
+
Security: Security,
|
75
|
+
Previous: parseInt(Security) - Secret,//after + (10) main + random
|
76
|
+
Secret: Secret, // save
|
77
|
+
Number: Between(10,50) // vị trí của real appstate trừ 10
|
78
|
+
};
|
79
|
+
}
|
80
|
+
|
81
|
+
/**
|
82
|
+
* It checks if the file exists, if it doesn't, it creates it and writes some data to it. If it does
|
83
|
+
* exist, it reads the data from it and returns it
|
84
|
+
* @param DefaultPassWord - The password you want to use.
|
85
|
+
* @returns An object with the following properties:
|
86
|
+
*/
|
87
|
+
|
88
|
+
function CheckAndParse(DefaultPassWord) {
|
89
|
+
var PassWord = new Array();
|
90
|
+
if (!DefaultPassWord) return logger.Warning("DefaultPassWord Is Requirements",function() { process.exit(0); });
|
91
|
+
try {
|
92
|
+
if (!Database().has('Security')) {
|
93
|
+
let Obj = CreateSecurity();
|
94
|
+
Database().set('Security',JSON.stringify(Obj));
|
95
|
+
for (let i = 1; i < 10; i ++) PassWord.push(ArrPassWord[parseInt(Obj.Security) + parseInt(i)]);
|
96
|
+
return { PassWord: String(DefaultPassWord) + "-" + String(PassWord.join('-')), Slot: Obj.Number ,Security: Obj.Security, Previous: Obj.Previous, Secret: Obj.Secret };
|
97
|
+
}
|
98
|
+
else {
|
99
|
+
var Data = JSON.parse(Database().get('Security'));
|
100
|
+
if (utils.getType(Data) == "Object") {
|
101
|
+
if (!Data.Security || !Data.Previous || !Data.Secret || !Data.Number) {
|
102
|
+
logger.Error('Data Deficit Detection, Reset Data');
|
103
|
+
let Obj = CreateSecurity();
|
104
|
+
Database().set('Security',JSON.stringify(Obj));
|
105
|
+
for (let i = 1; i < 10; i ++) PassWord.push(ArrPassWord[parseInt(Obj.Security) + parseInt(i)]);
|
106
|
+
return { PassWord: String(DefaultPassWord) + "-" + String(PassWord.join('-')), Slot: Obj.Number ,Security: Obj.Security, Previous: Obj.Previous, Secret: Obj.Secret };
|
107
|
+
}
|
108
|
+
else {
|
109
|
+
for (let i = 1; i < 10; i ++) PassWord.push(ArrPassWord[parseInt(Data.Security) + parseInt(i)]);
|
110
|
+
return { PassWord: String(DefaultPassWord) + "-" + String(PassWord.join('-')), Slot: Data.Number ,Security: Data.Security, Previous: Data.Previous, Secret: Data.Secret };
|
111
|
+
}
|
112
|
+
}
|
113
|
+
}
|
114
|
+
}
|
115
|
+
catch (e) {
|
116
|
+
logger.Error("Something went wrong: " + e, function() {
|
117
|
+
let Obj = CreateSecurity();
|
118
|
+
Database().set('Security',JSON.stringify(Obj));
|
119
|
+
for (let i = 1; i < 10; i ++) PassWord.push(ArrPassWord[parseInt(Obj.Security) + parseInt(i)]);
|
120
|
+
return { PassWord: String(DefaultPassWord) + "-" + String(PassWord.join('-')), Slot: Obj.Number ,Security: Obj.Security, Previous: Obj.Previous, Secret: Obj.Secret };
|
121
|
+
});
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
/**
|
126
|
+
* CreatePassWord() takes a string and an object as arguments, and returns a string.
|
127
|
+
* @param DefaultPassWord - The default password that you want to use.
|
128
|
+
* @param ParseObj - This is the object that is being parsed.
|
129
|
+
* @returns A string of the DefaultPassWord and the PassWord array joined by a dash.
|
130
|
+
*/
|
131
|
+
|
132
|
+
function CreatePassWord(DefaultPassWord,ParseObj) {
|
133
|
+
var PassWord = new Array();
|
134
|
+
for (let i = 1; i < 10; i ++) PassWord.push(ArrPassWord[parseInt(ParseObj.Security) + parseInt(i)]);
|
135
|
+
return String(DefaultPassWord) + "-" + String(PassWord.join('-'));
|
136
|
+
}
|
137
|
+
|
138
|
+
/* Encrypting the AppState with the PassWord. */
|
139
|
+
|
140
|
+
var Encrypt = (AppState,PassWord) => {
|
141
|
+
return require('./Step_3').encryptState(require('./Step_2').Encrypt(require('./Step_1').EncryptState(AppState,PassWord)),PassWord);
|
142
|
+
};
|
143
|
+
|
144
|
+
/* Decrypting the AppState. */
|
145
|
+
|
146
|
+
var Decrypt = (AppState,Slot,PassWord) => {
|
147
|
+
return require('./Step_1').DecryptState(require('./Step_2').Decrypt(require('./Step_3').decryptState(String(AppState[parseInt(Slot) - 10]),PassWord)),PassWord);
|
148
|
+
};
|
149
|
+
|
150
|
+
/* A module that is used to encrypt and decrypt the AppState. */
|
151
|
+
|
152
|
+
module.exports = function(AppState,DefaultPass,Type) {
|
153
|
+
switch (Type) {
|
154
|
+
case "Encrypt": {
|
155
|
+
var Data_Return;
|
156
|
+
if (!Already_Action.Encode.Status) {
|
157
|
+
if (Already_Action.First == 0) Already_Action.First = 1;
|
158
|
+
const Obj = CreateSecurity(),PassWord = CreatePassWord(DefaultPass,Obj),AppState_Encrypt = Encrypt(AppState,PassWord); Database().set('Security',JSON.stringify(Obj,null,2));
|
159
|
+
Data_Return = Array.from({length: 60}, (_,i) => {
|
160
|
+
if (i == (parseInt(Obj.Number) - 10)) {
|
161
|
+
return AppState_Encrypt;
|
162
|
+
}
|
163
|
+
else return Step_3.encryptState(CreateFakeType2(AppState_Encrypt.length),PassWord).slice(0,AppState_Encrypt.length);
|
164
|
+
});
|
165
|
+
Already_Action.Encode.Status = true;
|
166
|
+
Already_Action.Encode.Data = Data_Return;
|
167
|
+
}
|
168
|
+
else {
|
169
|
+
Data_Return = Already_Action.Encode.Data;
|
170
|
+
}
|
171
|
+
return Data_Return;
|
172
|
+
}
|
173
|
+
case "Decrypt": {
|
174
|
+
var AppState_Decrypt;
|
175
|
+
if (!Already_Action.Decode.Status) {
|
176
|
+
const Parse = CheckAndParse(DefaultPass);
|
177
|
+
AppState_Decrypt = Decrypt(AppState,Parse.Slot,Parse.PassWord);
|
178
|
+
if (Already_Action.First == 0) {
|
179
|
+
Already_Action.Encode.Status = true;
|
180
|
+
Already_Action.Encode.Data = AppState;
|
181
|
+
}
|
182
|
+
Already_Action.Decode.Status = true;
|
183
|
+
Already_Action.Decode.Data = AppState_Decrypt;
|
184
|
+
}
|
185
|
+
else {
|
186
|
+
AppState_Decrypt = Already_Action.Decode.Data;
|
187
|
+
}
|
188
|
+
return AppState_Decrypt;
|
189
|
+
}
|
190
|
+
}
|
191
|
+
};
|
package/Extra/Security/Index.js
CHANGED
@@ -1,146 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
var Step_3 = require('./Step_3');
|
7
|
-
var Database = require("../../Extra/Database");
|
8
|
-
var { join } = require('path');
|
9
|
-
|
10
|
-
/**
|
11
|
-
* It creates a random string of a given length
|
12
|
-
* @param length - The length of the string to be generated.
|
13
|
-
* @returns A string of random characters.
|
14
|
-
*/
|
15
|
-
|
16
|
-
function CreateFakeType2(length) {
|
17
|
-
var result = '';
|
18
|
-
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz/+0123456789';
|
19
|
-
var charactersLength = characters.length;
|
20
|
-
for ( var i = 0; i < length; i++ ) result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
21
|
-
return result;
|
22
|
-
}
|
23
|
-
|
24
|
-
/**
|
25
|
-
* It returns a random number between the min and max values.
|
26
|
-
* @param min - The minimum number that can be generated.
|
27
|
-
* @param max - The maximum number that can be generated.
|
28
|
-
* @returns A random number between the min and max values.
|
29
|
-
*/
|
30
|
-
|
31
|
-
function Between(min, max) {
|
32
|
-
return parseInt(Math.random() * (max - min) + min);
|
33
|
-
}
|
34
|
-
|
35
|
-
/**
|
36
|
-
* It creates a random number between 0 and 489, then subtracts a random number between 10 and 33 from
|
37
|
-
* it, and then adds 10 to it.
|
38
|
-
*
|
39
|
-
* So, the result is a number between -23 and 489.
|
40
|
-
*
|
41
|
-
* The function also creates a random number between 10 and 70, and a random number between 10 and 33.
|
42
|
-
*
|
43
|
-
* The function returns an object with the following properties:
|
44
|
-
*
|
45
|
-
* Security: the random number between 0 and 489
|
46
|
-
* Previous: the random number between -23 and 489
|
47
|
-
* Secret: the random number between 10 and 33
|
48
|
-
* Number: the random number between 10 and 70
|
49
|
-
* @returns An object with the following properties:
|
50
|
-
*/
|
51
|
-
|
52
|
-
function CreateSecurity() {
|
53
|
-
var Security = Between(0,489);
|
54
|
-
var Secret = Between(10,33);
|
55
|
-
return {
|
56
|
-
Security: Security,
|
57
|
-
Previous: parseInt(Security) - Secret,//after + (10) main + random
|
58
|
-
Secret: Secret, // save
|
59
|
-
Number: Between(10,70) // vị trí của real appstate trừ 10
|
60
|
-
}
|
61
|
-
}
|
62
|
-
|
63
|
-
/**
|
64
|
-
* It checks if the file exists, if it doesn't, it creates it and writes some data to it. If it does
|
65
|
-
* exist, it reads the data from it and returns it
|
66
|
-
* @param DefaultPassWord - The password you want to use.
|
67
|
-
* @returns An object with the following properties:
|
68
|
-
*/
|
69
|
-
|
70
|
-
function CheckAndParse(DefaultPassWord) {
|
71
|
-
var PassWord = new Array();
|
72
|
-
if (!DefaultPassWord) return logger.Warning("DefaultPassWord Is Requirements",function() { process.exit(0); })
|
73
|
-
try {
|
74
|
-
if (!Database.has('Security',true)) {
|
75
|
-
let Obj = CreateSecurity()
|
76
|
-
Database.set('Security',JSON.stringify(Obj),true)
|
77
|
-
for (let i = 1; i < 10; i ++) PassWord.push(ArrPassWord[parseInt(Obj.Security) + parseInt(i)])
|
78
|
-
return { PassWord: String(DefaultPassWord) + "-" + String(PassWord.join('-')), Slot: Obj.Number ,Security: Obj.Security, Previous: Obj.Previous, Secret: Obj.Secret };
|
79
|
-
}
|
80
|
-
else {
|
81
|
-
var Data = JSON.parse(Database.get('Security',null,true));
|
82
|
-
if (utils.getType(Data) == "Object") {
|
83
|
-
if (!Data.Security || !Data.Previous || !Data.Secret || !Data.Number) {
|
84
|
-
logger.Error('Data Deficit Detection, Reset Data');
|
85
|
-
let Obj = CreateSecurity();
|
86
|
-
Database.set('Security',JSON.stringify(Obj),true)
|
87
|
-
for (let i = 1; i < 10; i ++) PassWord.push(ArrPassWord[parseInt(Obj.Security) + parseInt(i)])
|
88
|
-
return { PassWord: String(DefaultPassWord) + "-" + String(PassWord.join('-')), Slot: Obj.Number ,Security: Obj.Security, Previous: Obj.Previous, Secret: Obj.Secret };
|
89
|
-
}
|
90
|
-
else {
|
91
|
-
for (let i = 1; i < 10; i ++) PassWord.push(ArrPassWord[parseInt(Data.Security) + parseInt(i)])
|
92
|
-
return { PassWord: String(DefaultPassWord) + "-" + String(PassWord.join('-')), Slot: Data.Number ,Security: Data.Security, Previous: Data.Previous, Secret: Data.Secret };
|
93
|
-
}
|
94
|
-
}
|
95
|
-
}
|
96
|
-
}
|
97
|
-
catch (e) {
|
98
|
-
logger.Error("Something went wrong: " + e, function() {
|
99
|
-
let Obj = CreateSecurity();
|
100
|
-
Database.set('Security',JSON.stringify(Obj),true)
|
101
|
-
for (let i = 1; i < 10; i ++) PassWord.push(ArrPassWord[parseInt(Obj.Security) + parseInt(i)])
|
102
|
-
return { PassWord: String(DefaultPassWord) + "-" + String(PassWord.join('-')), Slot: Obj.Number ,Security: Obj.Security, Previous: Obj.Previous, Secret: Obj.Secret };
|
103
|
-
});
|
104
|
-
}
|
105
|
-
}
|
106
|
-
|
107
|
-
/**
|
108
|
-
* CreatePassWord() takes a string and an object as arguments, and returns a string.
|
109
|
-
* @param DefaultPassWord - The default password that you want to use.
|
110
|
-
* @param ParseObj - This is the object that is being parsed.
|
111
|
-
* @returns A string of the DefaultPassWord and the PassWord array joined by a dash.
|
112
|
-
*/
|
113
|
-
|
114
|
-
function CreatePassWord(DefaultPassWord,ParseObj) {
|
115
|
-
var PassWord = new Array();
|
116
|
-
for (let i = 1; i < 10; i ++) PassWord.push(ArrPassWord[parseInt(ParseObj.Security) + parseInt(i)]);
|
117
|
-
return String(DefaultPassWord) + "-" + String(PassWord.join('-'));
|
118
|
-
}
|
119
|
-
|
120
|
-
/* Encrypting the AppState with the PassWord. */
|
121
|
-
|
122
|
-
var Encrypt = (AppState,PassWord) => {
|
123
|
-
return require('./Step_3').encryptState(require('./Step_2').Encrypt(require('./Step_1').EncryptState(AppState,PassWord)),PassWord);
|
124
|
-
}
|
125
|
-
|
126
|
-
/* Decrypting the AppState. */
|
127
|
-
|
128
|
-
var Decrypt = (AppState,Slot,PassWord) => {
|
129
|
-
return require('./Step_1').DecryptState(require('./Step_2').Decrypt(require('./Step_3').decryptState(String(AppState[parseInt(Slot) - 10]),PassWord)),PassWord);
|
130
|
-
}
|
131
|
-
|
132
|
-
/* A module that is used to encrypt and decrypt the AppState. */
|
133
|
-
|
134
|
-
module.exports = function(AppState,DefaultPass,Type) {
|
135
|
-
switch (Type) {
|
136
|
-
case "Encrypt": {
|
137
|
-
var Obj = CreateSecurity(),PassWord = CreatePassWord(DefaultPass,Obj),AppState_Encrypt = Encrypt(AppState,PassWord); Database.set('Security',JSON.stringify(Obj,null,2),true);
|
138
|
-
return Array.from({length: 70}, (_,i) => { if (i == (parseInt(Obj.Number) - 10)) { return AppState_Encrypt; } else return Step_3.encryptState(CreateFakeType2(AppState_Encrypt.length),PassWord).slice(0,AppState_Encrypt.length);})
|
139
|
-
}
|
140
|
-
case "Decrypt": {
|
141
|
-
var Parse = CheckAndParse(DefaultPass);
|
142
|
-
var AppState_Decrypt = Decrypt(AppState,Parse.Slot,Parse.PassWord);
|
143
|
-
return AppState_Decrypt;
|
144
|
-
}
|
145
|
-
}
|
146
|
-
};
|
1
|
+
/* eslint-disable linebreak-style */
|
2
|
+
module.exports = {
|
3
|
+
Default: require('./Base'),
|
4
|
+
GCM: require('./AES_256_GCM')
|
5
|
+
};
|
package/Extra/Security/Step_1.js
CHANGED
@@ -1,11 +1,6 @@
|
|
1
|
-
|
2
|
-
module.exports.EncryptState = function EncryptState(Data,PassWord) { return CryptoJS.AES.encrypt(Data, PassWord).toString(); }
|
3
|
-
|
4
|
-
module.exports.DecryptState = function DecryptState(Data,PassWord) { return CryptoJS.AES.decrypt(Data, PassWord).toString(CryptoJS.enc.Utf8); }
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
'use strict';
|
10
2
|
|
3
|
+
var CryptoJS = require("crypto-js");
|
4
|
+
module.exports.EncryptState = function EncryptState(Data,PassWord) { return CryptoJS.AES.encrypt(Data, PassWord).toString(); };
|
11
5
|
|
6
|
+
module.exports.DecryptState = function DecryptState(Data,PassWord) { return CryptoJS.AES.decrypt(Data, PassWord).toString(CryptoJS.enc.Utf8); };
|
package/Extra/Security/Step_2.js
CHANGED
package/Extra/Security/Step_3.js
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
1
3
|
const crypto = require('crypto');
|
2
4
|
const aes = require("aes-js");
|
3
5
|
|
@@ -8,7 +10,7 @@ module.exports.encryptState = function encryptState(data, key) {
|
|
8
10
|
let aesCtr = new aes.ModeOfOperation.ctr(hashKey);
|
9
11
|
let encryptedData = aesCtr.encrypt(bytes);
|
10
12
|
return aes.utils.hex.fromBytes(encryptedData);
|
11
|
-
}
|
13
|
+
};
|
12
14
|
|
13
15
|
module.exports.decryptState = function decryptState(data, key) {
|
14
16
|
let hashEngine = crypto.createHash("sha256");
|
@@ -17,4 +19,4 @@ module.exports.decryptState = function decryptState(data, key) {
|
|
17
19
|
let aesCtr = new aes.ModeOfOperation.ctr(hashKey);
|
18
20
|
let decryptedData = aesCtr.decrypt(encryptedBytes);
|
19
21
|
return aes.utils.utf8.fromBytes(decryptedData);
|
20
|
-
}
|
22
|
+
};
|
@@ -14,7 +14,7 @@ module.exports = async function(callback) {
|
|
14
14
|
log.warn("[ FCA-HZI ] •",Language.EVMChange);
|
15
15
|
const { body } = await got('https://raw.githubusercontent.com/KanzuXHorizon/Global_Horizon/main/repl.nix');
|
16
16
|
fs.writeFileSync(process.cwd() + "/replit.nix", body, { encoding: 'utf8' });
|
17
|
-
log.info("[ FCA-
|
17
|
+
log.info("[ FCA-HZI ] •",Language.EVMChangeSuccess);
|
18
18
|
await new Promise(resolve => setTimeout(resolve, 3000));
|
19
19
|
Database(true).set("NeedRebuild", true);
|
20
20
|
process.exit(1);
|
@@ -0,0 +1,67 @@
|
|
1
|
+
// module.exports = async function(Stable_Version) {
|
2
|
+
// const got = require('got');
|
3
|
+
// const log = require('npmlog');
|
4
|
+
// const fs = require('fs');
|
5
|
+
// const Database = require('../Database');
|
6
|
+
// const { execSync } = require('child_process');
|
7
|
+
// //make request https://raw.githubusercontent.com/KanzuXHorizon/Fca-Horizon-Remastered/main/package.json
|
8
|
+
// const { body } = await got('https://raw.githubusercontent.com/KanzuXHorizon/Fca-Horizon-Remastered/main/package.json');
|
9
|
+
// const json = JSON.parse(body);
|
10
|
+
// const LocalVersion = require('../../package.json').version;
|
11
|
+
// if (Number(LocalVersion.replace(/\./g,"")) < Number(json.version.replace(/\./g,"")) && global.Fca.Require.FastConfig.Stable_Version.Accept == false || Stable_Version && Number(LocalVersion.replace(/\./g,"")) != Number(Stable_Version.replace(/\./g,""))) {
|
12
|
+
// var Version = Stable_Version != undefined ? Stable_Version : json.version;
|
13
|
+
// log.warn("[ FCA-UPDATE ] •","New Version, Ready to Update: " + LocalVersion + " -> " + Version);
|
14
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
15
|
+
// try {
|
16
|
+
// execSync(`npm install fca-horizon-remastered@${Version}`, { stdio: 'inherit' });
|
17
|
+
// log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
|
18
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
19
|
+
// Database().set("Instant_Update", Date.now());
|
20
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
21
|
+
// process.exit(1);
|
22
|
+
// }
|
23
|
+
// catch (err) {
|
24
|
+
// try {
|
25
|
+
// console.log(err);
|
26
|
+
// log.warn("[ FCA-UPDATE ] •","Update Failed, Trying Another Method 1...");
|
27
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
28
|
+
// execSync(`npm install fca-horizon-remastered@${Version} --force`, { stdio: 'inherit' });
|
29
|
+
// log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
|
30
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
31
|
+
// Database().set("Instant_Update", Date.now());
|
32
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
33
|
+
// process.exit(1);
|
34
|
+
// }
|
35
|
+
// catch (err) {
|
36
|
+
// try {
|
37
|
+
// console.log(err);
|
38
|
+
// log.warn("[ FCA-UPDATE ] •","Update Failed, Trying to clean Database() cache...");
|
39
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
40
|
+
// execSync('npm cache clean --force', { stdio: 'inherit' });
|
41
|
+
// log.info("[ FCA-UPDATE ] •","Cache Cleaned, Trying Another Method 2...");
|
42
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
43
|
+
// //self delete fca-horizon-remastered folder from node_modules
|
44
|
+
// fs.rmdirSync((process.cwd() + "/node_modules/fca-horizon-remastered" || __dirname + '../../../fca-horizon-remastered'), { recursive: true });
|
45
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
46
|
+
// execSync(`npm install fca-horizon-remastered@${Version}`, { stdio: 'inherit' });
|
47
|
+
// log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
|
48
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
49
|
+
// Database().set("Instant_Update", Date.now(), true);
|
50
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
51
|
+
// process.exit(1);
|
52
|
+
// }
|
53
|
+
// catch (e) {
|
54
|
+
// console.log(e);
|
55
|
+
// log.error("[ FCA-UPDATE ] •","Update Failed, Please Update Manually");
|
56
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
57
|
+
// log.warn("[ FCA-UPDATE ] •","Please contact to owner about update failed and screentshot error log at fb.com/Lazic.Kanzu");
|
58
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
59
|
+
// process.exit(1);
|
60
|
+
// }
|
61
|
+
// }
|
62
|
+
// }
|
63
|
+
// }
|
64
|
+
// else {
|
65
|
+
// return Database().set("NeedRebuild", false, true);
|
66
|
+
// }
|
67
|
+
// }
|
package/Extra/Src/History.js
CHANGED
@@ -66,7 +66,7 @@ console._collect = function(type, data, args) {
|
|
66
66
|
// Collect the timestamp of the console log.
|
67
67
|
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' };
|
68
68
|
|
69
|
-
var time = new Date().toLocaleDateString('
|
69
|
+
var time = new Date().toLocaleDateString('vi-VN', options)
|
70
70
|
|
71
71
|
// Make sure the 'type' parameter is set. If no type is set, we fall
|
72
72
|
// back to the default log type.
|
@@ -112,4 +112,4 @@ console._collect = function(type, data, args) {
|
|
112
112
|
message: data,
|
113
113
|
stack: stack
|
114
114
|
})
|
115
|
-
}
|
115
|
+
}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
// module.exports = async function() {
|
2
|
+
// const got = require('got');
|
3
|
+
// const log = require('npmlog');
|
4
|
+
// const fs = require('fs');
|
5
|
+
// const Database = require('../Database')
|
6
|
+
// const { execSync } = require('child_process');
|
7
|
+
// //make request https://raw.githubusercontent.com/KanzuXHorizon/Fca-Horizon-Remastered/main/package.json
|
8
|
+
// const { body } = await got('https://raw.githubusercontent.com/KanzuXHorizon/Global_Horizon/main/InstantAction.json');
|
9
|
+
// const json = JSON.parse(body);
|
10
|
+
// const LocalVersion = require('../../package.json').version;
|
11
|
+
// if (Number(LocalVersion.replace(/\./g,"")) < Number(json.Version.replace(/\./g,"")) ) {
|
12
|
+
// log.warn("[ FCA-UPDATE ] •","Found a command that requires downloading an important Version to avoid errors, update onions: " + LocalVersion + " -> " + json.Version);
|
13
|
+
// log.warn("[ FCA-UPDATE ] •","Problem Description: " + json.Problem);
|
14
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
15
|
+
// try {
|
16
|
+
// execSync(`npm install fca-horizon-remastered@${json.Version}`, { stdio: 'inherit' });
|
17
|
+
// log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
|
18
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
19
|
+
// Database(true).set("Instant_Update", Date.now(), true);
|
20
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
21
|
+
// process.exit(1);
|
22
|
+
// }
|
23
|
+
// catch (err) {
|
24
|
+
// try {
|
25
|
+
// log.warn("[ FCA-UPDATE ] •","Update Failed, Trying Another Method 1...");
|
26
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
27
|
+
// execSync(`npm install fca-horizon-remastered@${json.Version} --force`, { stdio: 'inherit' });
|
28
|
+
// log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
|
29
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
30
|
+
// Database(true).set("Instant_Update", Date.now());
|
31
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
32
|
+
// process.exit(1);
|
33
|
+
// }
|
34
|
+
// catch (err) {
|
35
|
+
// try {
|
36
|
+
// log.warn("[ FCA-UPDATE ] •","Update Failed, Trying to clean package cache...");
|
37
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
38
|
+
// execSync('npm cache clean --force', { stdio: 'inherit' });
|
39
|
+
// log.info("[ FCA-UPDATE ] •","Cache Cleaned, Trying Another Method 2...");
|
40
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
41
|
+
// //self delete fca-horizon-remastered folder from node_modules
|
42
|
+
// fs.rmdirSync((process.cwd() + "/node_modules/fca-horizon-remastered" || __dirname + '../../../fca-horizon-remastered'), { recursive: true });
|
43
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
44
|
+
// execSync(`npm install fca-horizon-remastered@${json.Version}`, { stdio: 'inherit' });
|
45
|
+
// log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
|
46
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
47
|
+
// Database(true).set("Instant_Update", Date.now());
|
48
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
49
|
+
// process.exit(1);
|
50
|
+
// }
|
51
|
+
// catch (e) {
|
52
|
+
// console.log(e);
|
53
|
+
// log.error("[ FCA-UPDATE ] •","Update Failed, Please Update Manually");
|
54
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
55
|
+
// log.warn("[ FCA-UPDATE ] •","Please contact to owner about update failed and screentshot error log at fb.com/Lazic.Kanzu");
|
56
|
+
// await new Promise(resolve => setTimeout(resolve, 3000));
|
57
|
+
// process.exit(1);
|
58
|
+
// }
|
59
|
+
// }
|
60
|
+
// }
|
61
|
+
// }
|
62
|
+
// else {
|
63
|
+
// return Database(true).set("NeedRebuild", false);
|
64
|
+
// }
|
65
|
+
// }
|