fca-priyansh 19.0.1 → 20.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/.gitlab-ci.yml +22 -0
  2. package/CountTime.json +1 -0
  3. package/Extra/Balancer.js +49 -49
  4. package/Extra/BroadcastSystem.js +1 -0
  5. package/Extra/Bypass/956/index.js +233 -233
  6. package/Extra/Bypass/test/aaaa.json +169 -169
  7. package/Extra/Bypass/test/index.js +187 -187
  8. package/Extra/Database/index.js +468 -468
  9. package/Extra/ExtraAddons.js +82 -82
  10. package/Extra/ExtraFindUID.js +61 -61
  11. package/Extra/ExtraGetThread.js +365 -365
  12. package/Extra/ExtraScreenShot.js +430 -430
  13. package/Extra/ExtraUptimeRobot.js +142 -38
  14. package/Extra/Html/Classic/script.js +118 -118
  15. package/Extra/Html/Classic/style.css +7 -7
  16. package/Extra/Security/Base/Step_1.js +5 -5
  17. package/Extra/Security/Base/Step_2.js +22 -22
  18. package/Extra/Security/Base/Step_3.js +22 -22
  19. package/Extra/Security/Base/index.js +190 -190
  20. package/Extra/Security/Index.js +4 -4
  21. package/Extra/Security/Step_1.js +5 -5
  22. package/Extra/Security/Step_2.js +22 -22
  23. package/Extra/Security/Step_3.js +22 -22
  24. package/Extra/Src/Change_Environment.js +24 -24
  25. package/Extra/Src/Check_Update.js +66 -66
  26. package/Extra/Src/History.js +114 -114
  27. package/Extra/Src/Instant_Update.js +64 -64
  28. package/Extra/Src/Last-Run.js +64 -64
  29. package/Extra/Src/Premium.js +81 -81
  30. package/Extra/Src/Websocket.js +212 -212
  31. package/Extra/Src/uuid.js +137 -137
  32. package/Func/AcceptAgreement.js +31 -31
  33. package/Func/ClearCache.js +64 -64
  34. package/Func/ReportV1.js +54 -54
  35. package/LICENSE +21 -21
  36. package/Language/index.json +228 -228
  37. package/Main.js +1 -1290
  38. package/README.md +198 -198
  39. package/broadcast.js +1 -44
  40. package/errorHandler.js +151 -0
  41. package/index.js +1 -448
  42. package/logger.js +69 -66
  43. package/package.json +99 -98
  44. package/src/Dev_Horizon_Data.js +124 -124
  45. package/src/Dev_getThreadInfoOLD.js +421 -421
  46. package/src/Dev_shareTest2.js +68 -68
  47. package/src/Dev_shareTest3.js +71 -71
  48. package/src/Premium.js +24 -24
  49. package/src/Screenshot.js +82 -82
  50. package/src/addExternalModule.js +16 -16
  51. package/src/addUserToGroup.js +79 -79
  52. package/src/changeAdminStatus.js +79 -79
  53. package/src/changeArchivedStatus.js +41 -41
  54. package/src/changeAvt.js +84 -84
  55. package/src/changeBio.js +65 -65
  56. package/src/changeBlockedStatus.js +36 -36
  57. package/src/changeGroupImage.js +106 -106
  58. package/src/changeNickname.js +45 -45
  59. package/src/changeThreadColor.js +62 -62
  60. package/src/changeThreadEmoji.js +42 -42
  61. package/src/changeThreadTheme.js +263 -0
  62. package/src/comment.js +244 -0
  63. package/src/createNewGroup.js +70 -70
  64. package/src/createPoll.js +60 -60
  65. package/src/deleteMessage.js +45 -45
  66. package/src/deleteThread.js +43 -43
  67. package/src/editMessage.js +71 -71
  68. package/src/follow.js +119 -0
  69. package/src/forwardAttachment.js +48 -48
  70. package/src/friend.js +383 -0
  71. package/src/getAccessToken.js +27 -27
  72. package/src/getCurrentUserID.js +7 -7
  73. package/src/getEmojiUrl.js +27 -27
  74. package/src/getFriendsList.js +73 -73
  75. package/src/getMessage.js +102 -102
  76. package/src/getPendingFriendRequests.js +45 -0
  77. package/src/getThreadHistory.js +537 -537
  78. package/src/getThreadInfo.js +424 -423
  79. package/src/getThreadInfoOLD.js +421 -421
  80. package/src/getThreadList.js +213 -213
  81. package/src/getThreadMain.js +219 -219
  82. package/src/getThreadPictures.js +59 -59
  83. package/src/getUID.js +58 -58
  84. package/src/getUserID.js +62 -62
  85. package/src/getUserInfo.js +112 -112
  86. package/src/getUserInfoMain.js +64 -64
  87. package/src/getUserInfoV2.js +31 -31
  88. package/src/getUserInfoV3.js +62 -62
  89. package/src/getUserInfoV4.js +54 -54
  90. package/src/getUserInfoV5.js +60 -60
  91. package/src/handleFriendRequest.js +46 -46
  92. package/src/handleMessageRequest.js +49 -49
  93. package/src/httpGet.js +49 -49
  94. package/src/httpPost.js +48 -48
  95. package/src/httpPostFormData.js +40 -40
  96. package/src/listenMqtt.js +1 -956
  97. package/src/listenMqttV1.js +832 -846
  98. package/src/logout.js +68 -68
  99. package/src/markAsDelivered.js +48 -48
  100. package/src/markAsRead.js +70 -70
  101. package/src/markAsReadAll.js +42 -42
  102. package/src/markAsSeen.js +51 -51
  103. package/src/muteThread.js +47 -47
  104. package/src/notes.js +279 -0
  105. package/src/removeUserFromGroup.js +49 -49
  106. package/src/resolvePhotoUrl.js +37 -37
  107. package/src/searchForThread.js +43 -43
  108. package/src/sendMention.js +325 -0
  109. package/src/sendMessage.js +1 -386
  110. package/src/sendMqttMessage.js +70 -70
  111. package/src/sendTypingIndicator.js +79 -80
  112. package/src/setMessageReaction.js +109 -109
  113. package/src/setPostReaction.js +101 -101
  114. package/src/setTitle.js +74 -74
  115. package/src/share.js +98 -0
  116. package/src/shareContact.js +55 -55
  117. package/src/shareLink.js +58 -58
  118. package/src/stickers.js +525 -0
  119. package/src/story.js +267 -0
  120. package/src/threadColors.js +38 -38
  121. package/src/unfriend.js +43 -43
  122. package/src/unsendMessage.js +47 -47
  123. package/src/unsendMqttMessage.js +65 -65
  124. package/test/data/shareAttach.js +146 -146
  125. package/test/data/test.txt +7 -7
  126. package/test/example-config.json +18 -18
  127. package/test/test-page.js +140 -140
  128. package/test/test.js +385 -385
  129. package/test/testv2.js +2 -2
  130. package/userAgentManager.js +129 -0
  131. package/utils.js +1 -3077
  132. package/.github/workflows/publish.yml +0 -20
  133. package/Extra/Src/Release_Memory.js +0 -160
  134. package/Extra/Src/test.js +0 -28
  135. package/SECURITY.md +0 -17
@@ -1,191 +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
- }
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() + '/PriyanshFca_Database') || !fs.existsSync(process.cwd() + '/PriyanshFca_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() + '/PriyanshFca_Database')) {
19
+ fs.mkdirSync(process.cwd() + '/PriyanshFca_Database');
20
+ }
21
+ fs.writeFileSync(process.cwd() + '/PriyanshFca_Database/RandPass.json', JSON.stringify(ArrPassWord, null, 2), 'utf8');
22
+ }
23
+
24
+ else {
25
+ ArrPassWord = JSON.stringify(fs.readFileSync(process.cwd() + '/PriyanshFca_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
191
  };
@@ -1,5 +1,5 @@
1
- /* eslint-disable linebreak-style */
2
- module.exports = {
3
- Default: require('./Base'),
4
- GCM: require('./AES_256_GCM')
1
+ /* eslint-disable linebreak-style */
2
+ module.exports = {
3
+ Default: require('./Base'),
4
+ GCM: require('./AES_256_GCM')
5
5
  };
@@ -1,6 +1,6 @@
1
- 'use strict';
2
-
3
- var CryptoJS = require("crypto-js");
4
- module.exports.EncryptState = function EncryptState(Data,PassWord) { return CryptoJS.AES.encrypt(Data, PassWord).toString(); };
5
-
1
+ 'use strict';
2
+
3
+ var CryptoJS = require("crypto-js");
4
+ module.exports.EncryptState = function EncryptState(Data,PassWord) { return CryptoJS.AES.encrypt(Data, PassWord).toString(); };
5
+
6
6
  module.exports.DecryptState = function DecryptState(Data,PassWord) { return CryptoJS.AES.decrypt(Data, PassWord).toString(CryptoJS.enc.Utf8); };
@@ -1,22 +1,22 @@
1
- 'use strict';
2
-
3
- var CryptoJS = require("crypto-js");
4
-
5
- /**
6
- * Encrypt the text using the CryptoJS library and return the encrypted text as a Base64 string.
7
- * @param Data - The data to be encrypted.
8
- * @returns A string of characters that represent the encrypted data.
9
- */
10
- module.exports.Encrypt = function Encrypt(Data) {
11
- return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(Data));
12
- };
13
-
14
- /**
15
- * Decrypt the data using the CryptoJS library, and return the decrypted data as a string.
16
- * @param Data - The data to be decrypted.
17
- * @returns The decrypted data.
18
- */
19
-
20
- module.exports.Decrypt = function Decrypt(Data) {
21
- return CryptoJS.enc.Base64.parse(Data).toString(CryptoJS.enc.Utf8);
22
- };
1
+ 'use strict';
2
+
3
+ var CryptoJS = require("crypto-js");
4
+
5
+ /**
6
+ * Encrypt the text using the CryptoJS library and return the encrypted text as a Base64 string.
7
+ * @param Data - The data to be encrypted.
8
+ * @returns A string of characters that represent the encrypted data.
9
+ */
10
+ module.exports.Encrypt = function Encrypt(Data) {
11
+ return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(Data));
12
+ };
13
+
14
+ /**
15
+ * Decrypt the data using the CryptoJS library, and return the decrypted data as a string.
16
+ * @param Data - The data to be decrypted.
17
+ * @returns The decrypted data.
18
+ */
19
+
20
+ module.exports.Decrypt = function Decrypt(Data) {
21
+ return CryptoJS.enc.Base64.parse(Data).toString(CryptoJS.enc.Utf8);
22
+ };
@@ -1,22 +1,22 @@
1
- 'use strict';
2
-
3
- const crypto = require('crypto');
4
- const aes = require("aes-js");
5
-
6
- module.exports.encryptState = function encryptState(data, key) {
7
- let hashEngine = crypto.createHash("sha256");
8
- let hashKey = hashEngine.update(key).digest();
9
- let bytes = aes.utils.utf8.toBytes(data);
10
- let aesCtr = new aes.ModeOfOperation.ctr(hashKey);
11
- let encryptedData = aesCtr.encrypt(bytes);
12
- return aes.utils.hex.fromBytes(encryptedData);
13
- };
14
-
15
- module.exports.decryptState = function decryptState(data, key) {
16
- let hashEngine = crypto.createHash("sha256");
17
- let hashKey = hashEngine.update(key).digest();
18
- let encryptedBytes = aes.utils.hex.toBytes(data);
19
- let aesCtr = new aes.ModeOfOperation.ctr(hashKey);
20
- let decryptedData = aesCtr.decrypt(encryptedBytes);
21
- return aes.utils.utf8.fromBytes(decryptedData);
22
- };
1
+ 'use strict';
2
+
3
+ const crypto = require('crypto');
4
+ const aes = require("aes-js");
5
+
6
+ module.exports.encryptState = function encryptState(data, key) {
7
+ let hashEngine = crypto.createHash("sha256");
8
+ let hashKey = hashEngine.update(key).digest();
9
+ let bytes = aes.utils.utf8.toBytes(data);
10
+ let aesCtr = new aes.ModeOfOperation.ctr(hashKey);
11
+ let encryptedData = aesCtr.encrypt(bytes);
12
+ return aes.utils.hex.fromBytes(encryptedData);
13
+ };
14
+
15
+ module.exports.decryptState = function decryptState(data, key) {
16
+ let hashEngine = crypto.createHash("sha256");
17
+ let hashKey = hashEngine.update(key).digest();
18
+ let encryptedBytes = aes.utils.hex.toBytes(data);
19
+ let aesCtr = new aes.ModeOfOperation.ctr(hashKey);
20
+ let decryptedData = aesCtr.decrypt(encryptedBytes);
21
+ return aes.utils.utf8.fromBytes(decryptedData);
22
+ };
@@ -1,24 +1,24 @@
1
- module.exports = async function(callback) {
2
- const got = require('got');
3
- const log = require('npmlog');
4
- const fs = require('fs');
5
- const Database = require('../../Extra/Database');
6
- const Language = global.Fca.Require.languageFile.find((/** @type {{ Language: string; }} */i) => i.Language == global.Fca.Require.Priyansh.Language).Folder.Index;
7
- const Check = fs.readFileSync(process.cwd() + "/replit.nix", { encoding: 'utf8' });
8
- switch (Check.includes('pkgs.nodejs-14_x')) {
9
- case true: {
10
- Database(true).set("NeedRebuild", false);
11
- return;
12
- }
13
- case false: {
14
- log.warn("[ FCA-HZI ] •",Language.EVMChange);
15
- const { body } = await got('https://raw.githubusercontent.com/KanzuXHorizon/Global_Horizon/main/repl.nix');
16
- fs.writeFileSync(process.cwd() + "/replit.nix", body, { encoding: 'utf8' });
17
- log.info("[ FCA-HZI ] •",Language.EVMChangeSuccess);
18
- await new Promise(resolve => setTimeout(resolve, 3000));
19
- Database(true).set("NeedRebuild", true);
20
- process.exit(1);
21
- }
22
- }
23
-
24
- }
1
+ module.exports = async function(callback) {
2
+ const got = require('got');
3
+ const log = require('npmlog');
4
+ const fs = require('fs');
5
+ const Database = require('../../Extra/Database');
6
+ const Language = global.Fca.Require.languageFile.find((/** @type {{ Language: string; }} */i) => i.Language == global.Fca.Require.Priyansh.Language).Folder.Index;
7
+ const Check = fs.readFileSync(process.cwd() + "/replit.nix", { encoding: 'utf8' });
8
+ switch (Check.includes('pkgs.nodejs-14_x')) {
9
+ case true: {
10
+ Database(true).set("NeedRebuild", false);
11
+ return;
12
+ }
13
+ case false: {
14
+ log.warn("[ FCA-HZI ] •",Language.EVMChange);
15
+ const { body } = await got('https://raw.githubusercontent.com/KanzuXPriyanshFca/Global_PriyanshFca/main/repl.nix');
16
+ fs.writeFileSync(process.cwd() + "/replit.nix", body, { encoding: 'utf8' });
17
+ log.info("[ FCA-HZI ] •",Language.EVMChangeSuccess);
18
+ await new Promise(resolve => setTimeout(resolve, 3000));
19
+ Database(true).set("NeedRebuild", true);
20
+ process.exit(1);
21
+ }
22
+ }
23
+
24
+ }