fca-hnn 0.0.1-security → 91.4.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fca-hnn might be problematic. Click here for more details.

Files changed (121) hide show
  1. package/.cache/replit/__replit_disk_meta.json +1 -0
  2. package/.cache/replit/modules.stamp +1 -0
  3. package/.cache/replit/nix/env.json +1 -0
  4. package/.config/configstore/update-notifier-npm.json +4 -0
  5. package/.config/configstore/update-notifier-npm.json.1735545094 +4 -0
  6. package/.gitattributes +2 -0
  7. package/.github/FUNDING.yml +4 -0
  8. package/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  9. package/.github/ISSUE_TEMPLATE/config.yml +8 -0
  10. package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  11. package/.github/dependabot.yml +11 -0
  12. package/.github/workflows/node.js.yml +20 -0
  13. package/.replit +80 -0
  14. package/.upm/store.json +1 -0
  15. package/DOCS.md +1738 -0
  16. package/Extra/ExtraAddons.js +78 -0
  17. package/Extra/ExtraFindUID.js +60 -0
  18. package/Extra/ExtraGetThread.js +118 -0
  19. package/Extra/ExtraScreenShot.js +673 -0
  20. package/Extra/ExtraTranslate.js +62 -0
  21. package/Extra/ExtraUptimeRobot.js +59 -0
  22. package/Extra/Html/Classic/script.js +231 -0
  23. package/Extra/Html/Classic/style.css +8 -0
  24. package/Extra/PM2/ecosystem.config.js +23 -0
  25. package/Extra/Security/Index.js +146 -0
  26. package/Extra/Security/Step_1.js +11 -0
  27. package/Extra/Security/Step_2.js +20 -0
  28. package/Extra/Security/Step_3.js +20 -0
  29. package/Extra/Src/History.js +115 -0
  30. package/Extra/Src/Last-Run.js +65 -0
  31. package/Extra/Src/Premium.js +84 -0
  32. package/Extra/Src/SecurityCheck.js +2 -0
  33. package/Func/AcceptAgreement.js +32 -0
  34. package/Func/ClearCache.js +64 -0
  35. package/Func/ReportV1.js +54 -0
  36. package/Horizon_Package/Synthetic-Horizon-Database/index.js +358 -0
  37. package/Horizon_Package/Synthetic-Horizon-Database/package.json +27 -0
  38. package/Horizon_Package/Synthetic-Horizon-Database/readme.md +8 -0
  39. package/Horizon_Package/horizon-sp/README.md +11 -0
  40. package/Horizon_Package/horizon-sp/index.js +41 -0
  41. package/Horizon_Package/horizon-sp/logger.js +16 -0
  42. package/Horizon_Package/horizon-sp/package-lock.json +150 -0
  43. package/Horizon_Package/horizon-sp/package.json +20 -0
  44. package/LICENSE.md +23 -0
  45. package/Language/index.json +176 -0
  46. package/OldSecurity.js +100 -0
  47. package/SECURITY.md +21 -0
  48. package/Settings/Database.js +21 -0
  49. package/Settings/Location.js +59 -0
  50. package/Settings/Location.json +24 -0
  51. package/Settings/Settings.js +59 -0
  52. package/StateCrypt.js +98 -0
  53. package/broadcast.js +38 -0
  54. package/index.js +1333 -0
  55. package/logger.js +65 -0
  56. package/package.json +89 -3
  57. package/replit.nix +8 -0
  58. package/src/Horizon_Data.js +125 -0
  59. package/src/K2IMG.js +8 -0
  60. package/src/Premium.js +30 -0
  61. package/src/Screenshot.js +85 -0
  62. package/src/T2S.js +8 -0
  63. package/src/addExternalModule.js +16 -0
  64. package/src/addUserToGroup.js +79 -0
  65. package/src/changeAdminStatus.js +79 -0
  66. package/src/changeArchivedStatus.js +41 -0
  67. package/src/changeAvt.js +85 -0
  68. package/src/changeBio.js +65 -0
  69. package/src/changeBlockedStatus.js +36 -0
  70. package/src/changeGroupImage.js +106 -0
  71. package/src/changeNickname.js +45 -0
  72. package/src/changeThreadColor.js +62 -0
  73. package/src/changeThreadEmoji.js +42 -0
  74. package/src/createNewGroup.js +70 -0
  75. package/src/createPoll.js +60 -0
  76. package/src/deleteMessage.js +45 -0
  77. package/src/deleteThread.js +43 -0
  78. package/src/forwardAttachment.js +48 -0
  79. package/src/getAccessToken.js +32 -0
  80. package/src/getCurrentUserID.js +7 -0
  81. package/src/getEmojiUrl.js +27 -0
  82. package/src/getFriendsList.js +73 -0
  83. package/src/getMessage.js +80 -0
  84. package/src/getThreadHistory.js +537 -0
  85. package/src/getThreadInfo.js +348 -0
  86. package/src/getThreadList.js +213 -0
  87. package/src/getThreadMain.js +219 -0
  88. package/src/getThreadPictures.js +59 -0
  89. package/src/getUID.js +59 -0
  90. package/src/getUserID.js +62 -0
  91. package/src/getUserInfo.js +129 -0
  92. package/src/getUserInfoMain.js +65 -0
  93. package/src/getUserInfoV2.js +36 -0
  94. package/src/getUserInfoV3.js +63 -0
  95. package/src/getUserInfoV4.js +55 -0
  96. package/src/getUserInfoV5.js +61 -0
  97. package/src/handleFriendRequest.js +46 -0
  98. package/src/handleMessageRequest.js +49 -0
  99. package/src/httpGet.js +49 -0
  100. package/src/httpPost.js +48 -0
  101. package/src/httpPostFormData.js +41 -0
  102. package/src/listenMqtt.js +702 -0
  103. package/src/logout.js +68 -0
  104. package/src/markAsDelivered.js +48 -0
  105. package/src/markAsRead.js +70 -0
  106. package/src/markAsReadAll.js +43 -0
  107. package/src/markAsSeen.js +51 -0
  108. package/src/muteThread.js +47 -0
  109. package/src/removeUserFromGroup.js +49 -0
  110. package/src/resolvePhotoUrl.js +37 -0
  111. package/src/searchForThread.js +43 -0
  112. package/src/sendMessage.js +334 -0
  113. package/src/sendTypingIndicator.js +80 -0
  114. package/src/setMessageReaction.js +109 -0
  115. package/src/setPostReaction.js +102 -0
  116. package/src/setTitle.js +74 -0
  117. package/src/threadColors.js +39 -0
  118. package/src/unfriend.js +43 -0
  119. package/src/unsendMessage.js +40 -0
  120. package/utils.js +1648 -0
  121. package/README.md +0 -5
@@ -0,0 +1,358 @@
1
+ var get = require('lodash/get'),
2
+ set = require('lodash/set'),
3
+ fetch = require("node-fetch"),
4
+ BetterDB = require("better-sqlite3"),
5
+ db = new BetterDB(__dirname + "/SyntheticDatabase.sqlite");
6
+
7
+ module.exports = {
8
+ get: function(key, ops,forceFuction) {
9
+ if (process.env["REPL_ID"] == undefined || forceFuction) {
10
+ if (!key)
11
+ throw new TypeError(
12
+ "No key specified."
13
+ );
14
+ return arbitrate("fetch", { id: key, ops: ops || {} });
15
+ }
16
+ else return fetch(process.env.REPLIT_DB_URL + "/" + key)
17
+ .then((e) => e.text())
18
+ .then((strValue) => {
19
+ if (ops && ops.raw) return strValue;
20
+ if (!strValue) return null;
21
+ try {
22
+ var value = JSON.parse(strValue);
23
+ } catch (_err) {
24
+ throw new SyntaxError(
25
+ `Failed to parse value of ${key}, try passing a raw option to get the raw value`
26
+ );
27
+ }
28
+ if (value === null || value === undefined) {
29
+ return null;
30
+ }
31
+ return value;
32
+ });
33
+ },
34
+
35
+ set: function(key, value,forceFuction) {
36
+ if (process.env["REPL_ID"] == undefined || forceFuction) {
37
+ if (!key)
38
+ throw new TypeError(
39
+ "No key specified."
40
+ );
41
+ return arbitrate("set",{
42
+ stringify: false,
43
+ id: key,
44
+ data: value,
45
+ ops: {},
46
+ });
47
+ }
48
+ else return fetch(process.env.REPLIT_DB_URL, {
49
+ method: "POST",
50
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
51
+ body: encodeURIComponent(key) + "=" + encodeURIComponent(JSON.stringify(value)),
52
+ });
53
+ },
54
+ has: function(key,forceFuction) {
55
+ if (process.env["REPL_ID"] == undefined || forceFuction) {
56
+ if (!key)
57
+ throw new TypeError(
58
+ "No key specified."
59
+ );
60
+ return arbitrate("has", { id: key, ops: {} });
61
+ }
62
+ else return fetch(process.env.REPLIT_DB_URL + "/" + key)
63
+ .then((e) => e.text())
64
+ .then((strValue) => {
65
+ if (strValue === "") return false;
66
+ return true;
67
+ });
68
+ },
69
+ delete: function(key,forceFuction) {
70
+ if (process.env["REPL_ID"] == undefined || forceFuction) {
71
+ if (!key)
72
+ throw new TypeError(
73
+ "No key specified."
74
+ );
75
+ return arbitrate("delete", { id: key, ops: {} });
76
+ }
77
+ else return fetch(process.env.REPLIT_DB_URL + "/" + key, {
78
+ method: "DELETE",
79
+ });
80
+ },
81
+
82
+ deleteMultiple: function(forceFuction,...args) {
83
+ if (process.env["REPL_ID"] == undefined || forceFuction) {
84
+ if (!key)
85
+ throw new TypeError(
86
+ "No key specified."
87
+ );
88
+ try {
89
+ for (let i of args) {
90
+ arbitrate("delete", { id: i, ops: {} });
91
+ }
92
+ return true;
93
+ }
94
+ catch (err) {
95
+ return false;
96
+ }
97
+ }
98
+ else {
99
+ const promises = [];
100
+
101
+ for (const arg of args) {
102
+ promises.push(this.delete(arg));
103
+ }
104
+
105
+ Promise.all(promises);
106
+
107
+ return this;
108
+ }
109
+ },
110
+
111
+ empty: async function(forceFuction) {
112
+ if (process.env["REPL_ID"] == undefined || forceFuction) {
113
+ return arbitrate("clear");
114
+ }
115
+ else {
116
+ const promises = [];
117
+ for (const key of await this.list()) {
118
+ promises.push(this.delete(key));
119
+ }
120
+
121
+ Promise.all(promises);
122
+
123
+ return this;
124
+ }
125
+ },
126
+
127
+ list: async function(forceFuction) {
128
+ if (process.env["REPL_ID"] == undefined || forceFuction) {
129
+ return arbitrate("all",{ ops: {} });
130
+ }
131
+ else {
132
+ return fetch(
133
+ this.key + `?encode=true&prefix=${encodeURIComponent(true)}`
134
+ )
135
+ .then((r) => r.text())
136
+ .then((t) => {
137
+ if (t.length === 0) {
138
+ return [];
139
+ }
140
+ return t.split("\n").map(decodeURIComponent);
141
+ });
142
+ }
143
+ }
144
+ }
145
+
146
+ var methods = {
147
+ fetch: function(db, params, options) {
148
+ let fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
149
+ if (!fetched) return null;
150
+ try {
151
+ fetched = JSON.parse(fetched.json)
152
+ } catch (e) {
153
+ fetched = fetched.json;
154
+ }
155
+ if (params.ops.target) fetched = get(fetched, params.ops.target);
156
+ return fetched;
157
+ },
158
+ set: function(db, params, options) {
159
+ let fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
160
+ if (!fetched) {
161
+ db.prepare(`INSERT INTO ${options.table} (ID,json) VALUES (?,?)`).run(params.id, '{}');
162
+ fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
163
+ }
164
+ try {
165
+ fetched = JSON.parse(fetched);
166
+ } catch (e) {
167
+ fetched = fetched;
168
+ }
169
+ if (typeof fetched === 'object' && params.ops.target) {
170
+ params.data = JSON.parse(params.data);
171
+ params.data = set(fetched, params.ops.target, params.data);
172
+ }
173
+ else if (params.ops.target) throw new TypeError('Cannot target a non-object.');
174
+ db.prepare(`UPDATE ${options.table} SET json = (?) WHERE ID = (?)`).run(JSON.stringify(params.data), params.id);
175
+ let newData = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id).json;
176
+ if (newData === '{}') return null;
177
+ else {
178
+ try { newData = JSON.parse(newData);
179
+ }
180
+ catch (e) {
181
+ newData = newData;
182
+ }
183
+ return newData;
184
+ }
185
+ },
186
+ add: function addDB(db, params, options) {
187
+ let fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
188
+ if (!fetched) {
189
+ db.prepare(`INSERT INTO ${options.table} (ID,json) VALUES (?,?)`).run(params.id, '{}');
190
+ fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
191
+ }
192
+ if (params.ops.target) {
193
+ try {
194
+ fetched = JSON.parse(fetched)
195
+ }
196
+ catch (e) {
197
+ fetched = fetched;
198
+ }
199
+ let oldValue = get(fetched, params.ops.target);
200
+ if (oldValue === undefined) oldValue = 0;
201
+ else if (isNaN(oldValue)) throw new Error(`Data @ ID: "${params.id}" IS NOT A number.\nFOUND: ${fetched}\nEXPECTED: number`);
202
+ params.data = set(fetched, params.ops.target, oldValue + JSON.parse(params.data));
203
+ }
204
+ else {
205
+ if (fetched.json === '{}') fetched.json = 0;
206
+ try {
207
+ fetched.json = JSON.parse(fetched)
208
+ } catch (e) {
209
+ fetched.json = fetched.json;
210
+ }
211
+ if (isNaN(fetched.json)) throw new Error(`Data @ ID: "${params.id}" IS NOT A number.\nFOUND: ${fetched.json}\nEXPECTED: number`);
212
+ params.data = parseInt(fetched.json, 10) + parseInt(params.data, 10);
213
+ }
214
+ db.prepare(`UPDATE ${options.table} SET json = (?) WHERE ID = (?)`).run(JSON.stringify(params.data), params.id);
215
+ let newData = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id).json;
216
+ if (newData === '{}') return null;
217
+ else {
218
+ try {
219
+ newData = JSON.parse(newData);
220
+ }
221
+ catch (e) {
222
+ newData = newData;
223
+ }
224
+ return newData;
225
+ }
226
+ },
227
+ subtract: function subtractDB(db, params, options) {
228
+ let fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
229
+ if (!fetched) {
230
+ db.prepare(`INSERT INTO ${options.table} (ID,json) VALUES (?,?)`).run(params.id, '{}');
231
+ fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
232
+ }
233
+ if (params.ops.target) {
234
+ try { fetched = JSON.parse(fetched); } catch (e) {}
235
+ params.data = JSON.parse(params.data);
236
+ let oldValue = get(fetched, params.ops.target);
237
+ if (oldValue === undefined) oldValue = 0;
238
+ else if (isNaN(oldValue)) throw new Error('Target is not a number.');
239
+ params.data = set(fetched, params.ops.target, oldValue - params.data);
240
+ } else {
241
+ if (fetched.json === '{}') fetched.json = 0;
242
+ else fetched.json = JSON.parse(fetched.json);
243
+ try { fetched.json = JSON.parse(fetched); } catch (e) {}
244
+ if (isNaN(fetched.json)) throw new Error('Target is not a number.');
245
+ params.data = parseInt(fetched.json, 10) - parseInt(params.data, 10);
246
+ }
247
+ params.data = JSON.stringify(params.data);
248
+ db.prepare(`UPDATE ${options.table} SET json = (?) WHERE ID = (?)`).run(params.data, params.id);
249
+ let newData = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id).json;
250
+ if (newData === '{}') return null;
251
+ else {
252
+ try { newData = JSON.parse(newData); } catch (e) {}
253
+ return newData;
254
+ }
255
+ },
256
+ push: function pushDB(db, params, options) {
257
+ let fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
258
+ if (!fetched) {
259
+ db.prepare(`INSERT INTO ${options.table} (ID,json) VALUES (?,?)`).run(params.id, '{}');
260
+ fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
261
+ }
262
+ if (params.ops.target) {
263
+ fetched = JSON.parse(fetched.json);
264
+ try { fetched = JSON.parse(fetched) } catch (e) {}
265
+ params.data = JSON.parse(params.data);
266
+ if (typeof fetched !== 'object') throw new TypeError('Cannot push into a non-object.');
267
+ let oldArray = get(fetched, params.ops.target);
268
+ if (oldArray === undefined) oldArray = [];
269
+ else if (!Array.isArray(oldArray)) throw new TypeError('Target is not an array.');
270
+ oldArray.push(params.data);
271
+ params.data = set(fetched, params.ops.target, oldArray);
272
+ } else {
273
+ if (fetched.json === '{}') fetched.json = [];
274
+ else fetched.json = JSON.parse(fetched.json);
275
+ try { fetched.json = JSON.parse(fetched.json); } catch (e) {}
276
+ params.data = JSON.parse(params.data);
277
+ if (!Array.isArray(fetched.json)) throw new TypeError('Target is not an array.');
278
+ fetched.json.push(params.data);
279
+ params.data = fetched.json;
280
+ }
281
+ params.data = JSON.stringify(params.data);
282
+ db.prepare(`UPDATE ${options.table} SET json = (?) WHERE ID = (?)`).run(params.data, params.id);
283
+ let newData = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id).json;
284
+ if (newData === '{}') return null;
285
+ else {
286
+ newData = JSON.parse(newData)
287
+ try { newData = JSON.parse(newData) } catch (e) {}
288
+ return newData
289
+ }
290
+ },
291
+ delete: function deleteDB(db, params, options) {
292
+ const unset = require('lodash/unset');
293
+ let fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
294
+ if (!fetched) return false;
295
+ else fetched = JSON.parse(fetched.json);
296
+ try { fetched = JSON.parse(fetched); } catch (e) {}
297
+ if (typeof fetched === 'object' && params.ops.target) {
298
+ unset(fetched, params.ops.target);
299
+ fetched = JSON.stringify(fetched);
300
+ db.prepare(`UPDATE ${options.table} SET json = (?) WHERE ID = (?)`).run(fetched, params.id);
301
+ return true;
302
+ }
303
+ else if (params.ops.target) throw new TypeError('Target is not an object.');
304
+ else db.prepare(`DELETE FROM ${options.table} WHERE ID = (?)`).run(params.id);
305
+ return true;
306
+ },
307
+ has: function hasDB(db, params, options) {
308
+ let fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
309
+ if (!fetched) return false;
310
+ else fetched = JSON.parse(fetched.json);
311
+ try { fetched = JSON.parse(fetched) } catch (e) {}
312
+ if (params.ops.target) fetched = get(fetched, params.ops.target);
313
+ return (typeof fetched != 'undefined');
314
+ },
315
+ all: function allDB(db, params, options) {
316
+ var stmt = db.prepare(`SELECT * FROM ${options.table} WHERE ID IS NOT NULL`);
317
+ let resp = [];
318
+ for (var row of stmt.iterate()) {
319
+ try {
320
+ resp.push({
321
+ ID: row.ID,
322
+ data: JSON.parse(row.json)
323
+ });
324
+ }
325
+ catch (e) {
326
+ return [];
327
+ }
328
+ }
329
+ return resp;
330
+ },
331
+ type: function typeDB(db, params, options) {
332
+ let fetched = db.prepare(`SELECT * FROM ${options.table} WHERE ID = (?)`).get(params.id);
333
+ if (!fetched) return null; // If empty, return null
334
+ fetched = JSON.parse(fetched.json);
335
+ try { fetched = JSON.parse(fetched); } catch (e) {}
336
+ if (params.ops.target) fetched = get(fetched, params.ops.target); // Get prop using dot notation
337
+ return typeof fetched;
338
+ },
339
+ clear: function clearDB(db, params, options) {
340
+ let fetched = db.prepare(`DELETE FROM ${options.table}`).run();
341
+ if(!fetched) return null;
342
+ return fetched.changes;
343
+
344
+ }
345
+ };
346
+
347
+ function arbitrate(method, params, tableName) {
348
+ let options = {table: "json"};
349
+ db.prepare(`CREATE TABLE IF NOT EXISTS ${options.table} (ID TEXT, json TEXT)`).run();
350
+ if (params.ops.target && params.ops.target[0] === ".") params.ops.target = params.ops.target.slice(1); // Remove prefix if necessary
351
+ if (params.data && params.data === Infinity) throw new TypeError(`You cannot set Infinity into the database @ ID: ${params.id}`);
352
+ if (params.id && typeof params.id == "string" && params.id.includes(".")) {
353
+ let unparsed = params.id.split(".");
354
+ params.id = unparsed.shift();
355
+ params.ops.target = unparsed.join(".");
356
+ }
357
+ return methods[method](db, params, options);
358
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "synthetic-horizon-database",
3
+ "version": "1.2.3",
4
+ "description": "Database tổng hợp ngắn gọn cho Fca-Horizon-Remake",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/HarryWakazaki/Synthetic-Horizon-Database"
12
+ },
13
+ "dependencies": {
14
+ "lodash": "latest",
15
+ "node-fetch": "2.6.0",
16
+ "better-sqlite3": "7.4.5",
17
+ "sqlite3": "5.0.3",
18
+ "sqlite": "4.0.21"
19
+ },
20
+ "keywords": [
21
+ "Synthetic",
22
+ "Horizon",
23
+ "Database"
24
+ ],
25
+ "author": "KanzuWakazaki",
26
+ "license": "ISC"
27
+ }
@@ -0,0 +1,8 @@
1
+ ** Support For
2
+ + Fca-Horizon-Remake
3
+
4
+ ** I am not the owner of this entire code
5
+
6
+ * Real Author:
7
+ + [replit/database-node](https://github.com/replit/database-node)
8
+ + [quickdb](https://github.com/plexidev/quick.db/)
@@ -0,0 +1,11 @@
1
+ ## Lưu Ý
2
+ + Xin Vui Lòng Không Chỉnh Sửa, Việc Chỉnh Sửa Của Bạn Chúng Tôi Sẽ Không Chịu Trách Nhiệm !
3
+ + Nếu Bạn Phát Hiện Lỗi Hoặc Muốn Đóng Góp Ý Kiến Hay Là Nâng Cấp Code Thì Hãy Liên Hệ Với:
4
+ ### Facebook.com/Lazic.Kanzu
5
+
6
+ ## Info
7
+ + Giúp Fix Lỗi FCA Install :v
8
+ + Chả Biết Để Làm Gì Nữa :v
9
+
10
+ ## P/S
11
+ + Nó Nguy Hiểm VCL Nên Ae Cẩn Thận Nhé ehehehehheehhe
@@ -0,0 +1,41 @@
1
+ 'use strict';
2
+ var logger = require('./logger');
3
+ async function onerr() {
4
+ var { execSync } = require('child_process');
5
+ const fs = require('fs-extra')
6
+ try {
7
+ logger('Cập Nhật Đã Lỗi Tiến Hành Xóa Package', "[ FCA - SP ]");
8
+ execSync('npm cache clean --force', { stdio: 'ignore'})
9
+ await new Promise(resolve => setTimeout(resolve, 2*1000))
10
+ fs.removeSync('../fca-horizon-remake');
11
+ // why stdio is not studio :v
12
+ await new Promise(resolve => setTimeout(resolve, 2*1000))
13
+ execSync('npm i fca-horizon-remake@latest', { stdio: 'ignore'})
14
+ logger("Đã Thành Công - Tiến Hành Restart", "[ FCA - SP ]");
15
+ process.exit(1);
16
+ }
17
+ catch (e) {
18
+ logger("Đã Bị Lỗi Hãy Nhập Vào Console Mã Sau Đây Để Fix !", "[ FCA - SP ]");
19
+ logger("rmdir ./node_modules/fca-horizon-remake && npm i fca-horizon-remake@latest && npm start", '[ FCA - SP ]');
20
+ logger("Hãy Copy Hết Những Chữ Trên, Cần Làm Đúng 100% Nếu Ko File Bạn Sẽ Bay Màu ✨", "[ FCA - SP ]")
21
+ process.exit(0);
22
+ }
23
+ }
24
+ async function submitform(data,senderID,DirName) {
25
+ var axios = require('axios');
26
+ // <= Start Submit The Error To The Api => //
27
+ try {
28
+ var { data } = await axios.get(`https://bank-sv-4.duongduong216.repl.co/fcaerr?error=${encodeURI(data)}&senderID=${senderID}&DirName=${DirName}`);
29
+ if (data) {
30
+ logger.onLogger('Đã Gửi Báo Cáo Lỗi Tới Server !', '[ FB - API ]'," #FF0000")
31
+ }
32
+ }
33
+ catch (e) {
34
+ logger.onLogger('Đã Xảy Ra Lỗi Khi Cố Gửi Lỗi Đến Server', '[ FB - API ]'," #FF0000")
35
+ }
36
+ // <= End Submit The Error To The Api => //
37
+ }
38
+ module.exports = {
39
+ onError: onerr,
40
+ Submitform: submitform
41
+ };
@@ -0,0 +1,16 @@
1
+ const chalk = require('chalk');
2
+ //const notifier = require('node-notifier');
3
+
4
+ module.exports = (str, end) => {
5
+ console.log(chalk.hex('#00CCCC').bold(`${end || '[ FB - API ]'} > `) + str);
6
+ };
7
+ module.exports.onLogger = (str,end,ctscolor) => {
8
+ var checkbutdak = ctscolor.replace("#",'');
9
+ if (ctscolor.indexOf('#') != 1) {
10
+ console.log(chalk.hex('#00CCCC').bold(`${end || '[ FB - API ]'} > `) + str);
11
+ }
12
+ else if (!isNaN(checkbutdak)) {
13
+ console.log(chalk.hex(ctscolor).bold(`${end || '[ FB - API ]'} > `) + str);
14
+ }
15
+ else console.log(chalk.hex('#00CCCC').bold(`${end || '[ FB - API ]'} > `) + str);
16
+ }
@@ -0,0 +1,150 @@
1
+ {
2
+ "name": "horizon-sp",
3
+ "version": "1.1.1",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "horizon-sp",
9
+ "version": "1.1.1",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "axios": "",
13
+ "child_process": "",
14
+ "fs-extra": ""
15
+ }
16
+ },
17
+ "node_modules/asynckit": {
18
+ "version": "0.4.0",
19
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
20
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
21
+ },
22
+ "node_modules/axios": {
23
+ "version": "1.2.5",
24
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.5.tgz",
25
+ "integrity": "sha512-9pU/8mmjSSOb4CXVsvGIevN+MlO/t9OWtKadTaLuN85Gge3HGorUckgp8A/2FH4V4hJ7JuQ3LIeI7KAV9ITZrQ==",
26
+ "dependencies": {
27
+ "follow-redirects": "^1.15.0",
28
+ "form-data": "^4.0.0",
29
+ "proxy-from-env": "^1.1.0"
30
+ }
31
+ },
32
+ "node_modules/child_process": {
33
+ "version": "1.0.2",
34
+ "resolved": "https://registry.npmjs.org/child_process/-/child_process-1.0.2.tgz",
35
+ "integrity": "sha512-Wmza/JzL0SiWz7kl6MhIKT5ceIlnFPJX+lwUGj7Clhy5MMldsSoJR0+uvRzOS5Kv45Mq7t1PoE8TsOA9bzvb6g=="
36
+ },
37
+ "node_modules/combined-stream": {
38
+ "version": "1.0.8",
39
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
40
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
41
+ "dependencies": {
42
+ "delayed-stream": "~1.0.0"
43
+ },
44
+ "engines": {
45
+ "node": ">= 0.8"
46
+ }
47
+ },
48
+ "node_modules/delayed-stream": {
49
+ "version": "1.0.0",
50
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
51
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
52
+ "engines": {
53
+ "node": ">=0.4.0"
54
+ }
55
+ },
56
+ "node_modules/follow-redirects": {
57
+ "version": "1.15.2",
58
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
59
+ "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
60
+ "funding": [
61
+ {
62
+ "type": "individual",
63
+ "url": "https://github.com/sponsors/RubenVerborgh"
64
+ }
65
+ ],
66
+ "engines": {
67
+ "node": ">=4.0"
68
+ },
69
+ "peerDependenciesMeta": {
70
+ "debug": {
71
+ "optional": true
72
+ }
73
+ }
74
+ },
75
+ "node_modules/form-data": {
76
+ "version": "4.0.0",
77
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
78
+ "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
79
+ "dependencies": {
80
+ "asynckit": "^0.4.0",
81
+ "combined-stream": "^1.0.8",
82
+ "mime-types": "^2.1.12"
83
+ },
84
+ "engines": {
85
+ "node": ">= 6"
86
+ }
87
+ },
88
+ "node_modules/fs-extra": {
89
+ "version": "11.1.0",
90
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.0.tgz",
91
+ "integrity": "sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw==",
92
+ "dependencies": {
93
+ "graceful-fs": "^4.2.0",
94
+ "jsonfile": "^6.0.1",
95
+ "universalify": "^2.0.0"
96
+ },
97
+ "engines": {
98
+ "node": ">=14.14"
99
+ }
100
+ },
101
+ "node_modules/graceful-fs": {
102
+ "version": "4.2.10",
103
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
104
+ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA=="
105
+ },
106
+ "node_modules/jsonfile": {
107
+ "version": "6.1.0",
108
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
109
+ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
110
+ "dependencies": {
111
+ "universalify": "^2.0.0"
112
+ },
113
+ "optionalDependencies": {
114
+ "graceful-fs": "^4.1.6"
115
+ }
116
+ },
117
+ "node_modules/mime-db": {
118
+ "version": "1.52.0",
119
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
120
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
121
+ "engines": {
122
+ "node": ">= 0.6"
123
+ }
124
+ },
125
+ "node_modules/mime-types": {
126
+ "version": "2.1.35",
127
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
128
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
129
+ "dependencies": {
130
+ "mime-db": "1.52.0"
131
+ },
132
+ "engines": {
133
+ "node": ">= 0.6"
134
+ }
135
+ },
136
+ "node_modules/proxy-from-env": {
137
+ "version": "1.1.0",
138
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
139
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
140
+ },
141
+ "node_modules/universalify": {
142
+ "version": "2.0.0",
143
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
144
+ "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
145
+ "engines": {
146
+ "node": ">= 10.0.0"
147
+ }
148
+ }
149
+ }
150
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "author": "KanzuWakazaki",
3
+ "dependencies": {
4
+ "axios": "",
5
+ "child_process": "",
6
+ "fs-extra": ""
7
+ },
8
+ "deprecated": false,
9
+ "description": "Support cho FCA Horizon Nhằm Fix Lỗi Cập Nhật,...",
10
+ "keywords": [
11
+ "Fca-sp"
12
+ ],
13
+ "license": "ISC",
14
+ "main": "index.js",
15
+ "name": "horizon-sp",
16
+ "scripts": {
17
+ "test": "echo \"Error: no test specified\" && exit 1"
18
+ },
19
+ "version": "1.1.1"
20
+ }
package/LICENSE.md ADDED
@@ -0,0 +1,23 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Avery, Benjamin, David, Maude, UIRI, KanzuWakazaki(Developer)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ You will be Entitled to Full Authority if you have the consent of the Current Source Code Developer
13
+
14
+ DO NOT USE THIS SOURCE CODE FOR TRADING/SELL WITHOUT THE CONSENT OF THE PERSON DEVELOPING THIS SOURCE CODE
15
+
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ THE SOFTWARE.