fca-project-orion 1.1.14 → 1.1.16

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.
package/.prettierrc CHANGED
@@ -1,4 +1,4 @@
1
- {
2
- "tabWidth": 2,
3
- "useTabs": false
4
- }
1
+ {
2
+ "tabWidth": 2,
3
+ "useTabs": false
4
+ }
package/Main.js CHANGED
@@ -5,7 +5,7 @@
5
5
  if (global.Fca.Require.FastConfig.Config != 'default') {
6
6
  //do ssth
7
7
  }
8
- var { setFont } = require("./font-handler");
8
+
9
9
  const gradient = require("gradient-string");
10
10
  const Language = global.Fca.Require.languageFile.find((/** @type {{ Language: string; }} */i) => i.Language == global.Fca.Require.FastConfig.Language).Folder.Index;
11
11
 
@@ -245,15 +245,6 @@ function setOptions(globalOptions, options) {
245
245
  }
246
246
  break;
247
247
  }
248
- case "font":
249
- if (typeof options.font != "string") {
250
- delete globalOptions.font;
251
- utils.setProxy();
252
- } else {
253
- globalOptions.font = options.font;
254
- setFont(options.font);
255
- }
256
- break;
257
248
 
258
249
  default: {
259
250
  log.warn("setOptions", "Unrecognized option given to setOptions: " + key);
package/index.js CHANGED
@@ -26,6 +26,7 @@ global.Fca = new Object({
26
26
  "Language": "en",
27
27
  "PreKey": "",
28
28
  "AutoUpdate": false,
29
+ "CustomFont": true,
29
30
  "MainColor": "#FFFF00",
30
31
  "MainName": "[ FCA-PROJECT-ORION ]",
31
32
  "Uptime": false,
@@ -110,7 +111,7 @@ global.Fca = new Object({
110
111
  });
111
112
 
112
113
  try {
113
- let Boolean_Fca = ["AntiSendAppState","AutoUpdate","Uptime","BroadCast","EncryptFeature","AutoLogin","ResetDataLogin","Login2Fa", "DevMode","AutoInstallNode"];
114
+ let Boolean_Fca = ["AntiSendAppState","AutoUpdate","CustomFont","Uptime","BroadCast","EncryptFeature","AutoLogin","ResetDataLogin","Login2Fa", "DevMode","AutoInstallNode"];
114
115
  let String_Fca = ["MainName","PreKey","Language","AuthString","Config"]
115
116
  let Number_Fca = ["AutoRestartMinutes","RestartMQTT_Minutes"];
116
117
  let Object_Fca = ["HTML","Stable_Version","AntiGetInfo","Websocket_Extension"];
@@ -131,7 +132,7 @@ catch (e) {
131
132
  process.exit(1)
132
133
  }
133
134
  if (global.Fca.Require.fs.existsSync(process.cwd() + '/Orion_Database/FastConfigFca.json')) {
134
-
135
+
135
136
  for (let i of All_Variable) {
136
137
  if (Data_Setting[i] == undefined) {
137
138
  Data_Setting[i] = global.Fca.Data.ObjFastConfig[i];
@@ -217,11 +218,11 @@ module.exports = function(loginData, options, callback) {
217
218
  const log = require('npmlog');
218
219
  const { execSync } = require('child_process');
219
220
  const Database = require('./Extra/Database');
220
-
221
+
221
222
  if (global.Fca.Require.FastConfig.DevMode) {
222
223
  require('./Extra/Src/Release_Memory');
223
224
  }
224
-
225
+
225
226
  return got.get('https://raw.githubusercontent.com/ivancotacte/Global_fca-project-orion/main/InstantAction.json').then(async function(res) {
226
227
  if (global.Fca.Require.FastConfig.AutoInstallNode) {
227
228
  switch (fs.existsSync(process.cwd() + "/replit.nix") && process.env["REPL_ID"] != undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fca-project-orion",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
 
3
3
  /**
4
- * Được Fix Hay Làm Màu Bởi: @HarryWakazaki
4
+ * Fixed or Colored By: @HarryWakazaki
5
5
  * 21/4/2022
6
+ *
7
+ * Remodel By: https://www.facebook.com/icotacteeee
6
8
  */
7
9
 
8
10
  var utils = require("../utils");
@@ -10,6 +12,16 @@ var log = require("npmlog");
10
12
  var bluebird = require("bluebird");
11
13
  var fs = require('fs-extra');
12
14
 
15
+ if (global.Fca.Require.FastConfig.CustomFont) {
16
+ var projectorion = {
17
+ CustomFont: true
18
+ }
19
+ } else {
20
+ var projectorion = {
21
+ CustomFont: false
22
+ }
23
+ }
24
+
13
25
  var allowedProperties = {
14
26
  attachment: true,
15
27
  url: true,
@@ -19,12 +31,74 @@ var allowedProperties = {
19
31
  body: true,
20
32
  mentions: true,
21
33
  location: true,
34
+ font: true
22
35
  };
23
36
 
24
37
  var AntiText = "Your criminal activity was detected while attempting to send an Appstate file";
25
38
  var Location_Stack;
26
39
 
27
- module.exports = function (defaultFuncs, api, ctx) {
40
+ module.exports = function(defaultFuncs, api, ctx) {
41
+ let font = {
42
+ a: "𝖺",
43
+ b: "𝖻",
44
+ c: "𝖼",
45
+ d: "𝖽",
46
+ e: "𝖾",
47
+ f: "𝖿",
48
+ g: "𝗀",
49
+ h: "𝗁",
50
+ i: "𝗂",
51
+ j: "𝗃",
52
+ k: "𝗄",
53
+ l: "𝗅",
54
+ m: "𝗆",
55
+ n: "𝗇",
56
+ o: "𝗈",
57
+ p: "𝗉",
58
+ q: "𝗊",
59
+ r: "𝗋",
60
+ s: "𝗌",
61
+ t: "𝗍",
62
+ u: "𝗎",
63
+ v: "𝗏",
64
+ w: "𝗐",
65
+ x: "𝗑",
66
+ y: "𝗒",
67
+ z: "𝗓",
68
+ A: "𝖠",
69
+ B: "𝖡",
70
+ C: "𝖢",
71
+ D: "𝖣",
72
+ E: "𝖤",
73
+ F: "𝖥",
74
+ G: "𝖦",
75
+ H: "𝖧",
76
+ I: "𝖨",
77
+ J: "𝖩",
78
+ K: "𝖪",
79
+ L: "𝖫",
80
+ M: "𝖬",
81
+ N: "𝖭",
82
+ O: "𝖮",
83
+ P: "𝖯",
84
+ Q: "𝖰",
85
+ R: "𝖱",
86
+ S: "𝖲",
87
+ T: "𝖳",
88
+ U: "𝖴",
89
+ V: "𝖵",
90
+ W: "𝖶",
91
+ X: "𝖷",
92
+ Y: "𝖸",
93
+ Z: "𝖹",
94
+ };
95
+ function replaceCharacters(inputString) {
96
+ const replacedString = inputString.replace(/[A-Za-z]/g, (char) => {
97
+ return font[char] || char;
98
+ });
99
+ return replacedString;
100
+ }
101
+
28
102
  function uploadAttachment(attachments, callback) {
29
103
  var uploads = [];
30
104
 
@@ -40,7 +114,7 @@ module.exports = function (defaultFuncs, api, ctx) {
40
114
  defaultFuncs
41
115
  .postFormData("https://upload.facebook.com/ajax/mercury/upload.php", ctx.jar, form, {})
42
116
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
43
- .then(function (resData) {
117
+ .then(function(resData) {
44
118
  if (resData.error) throw resData;
45
119
  // We have to return the data unformatted unless we want to change it
46
120
  // back in sendMessage.
@@ -54,7 +128,7 @@ module.exports = function (defaultFuncs, api, ctx) {
54
128
  .all(uploads)
55
129
  .then(resData => callback(null, resData)
56
130
  )
57
- .catch(function (err) {
131
+ .catch(function(err) {
58
132
  log.error("uploadAttachment", err);
59
133
  return callback(err);
60
134
  });
@@ -70,12 +144,12 @@ module.exports = function (defaultFuncs, api, ctx) {
70
144
  defaultFuncs
71
145
  .post("https://www.facebook.com/message_share_attachment/fromURI/", ctx.jar, form)
72
146
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
73
- .then(function (resData) {
147
+ .then(function(resData) {
74
148
  if (resData.error) return callback(resData);
75
149
  if (!resData.payload) return callback({ error: "Invalid url" });
76
150
  callback(null, resData.payload.share_data.share_params);
77
151
  })
78
- .catch(function (err) {
152
+ .catch(function(err) {
79
153
  log.error("getUrl", err);
80
154
  return callback(err);
81
155
  });
@@ -118,21 +192,21 @@ module.exports = function (defaultFuncs, api, ctx) {
118
192
  if (global.Fca.Require.FastConfig.AntiSendAppState == true) {
119
193
  try {
120
194
  if (Location_Stack != undefined || Location_Stack != null) {
121
- let location = (((Location_Stack).replace("Error",'')).split('\n')[7]).split(' ');
195
+ let location = (((Location_Stack).replace("Error", '')).split('\n')[7]).split(' ');
122
196
  let format = {
123
- Source: (location[6]).split('s:')[0].replace("(",'') + 's',
124
- Line: (location[6]).split('s:')[1].replace(")",'')
197
+ Source: (location[6]).split('s:')[0].replace("(", '') + 's',
198
+ Line: (location[6]).split('s:')[1].replace(")", '')
125
199
  };
126
200
  form.body = AntiText + "\n- Source: " + format.Source + "\n- Line: " + format.Line;
127
201
  }
128
202
  }
129
- catch (e) {}
203
+ catch (e) { }
130
204
  }
131
205
 
132
206
  defaultFuncs
133
207
  .post("https://www.facebook.com/messaging/send/", ctx.jar, form)
134
208
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
135
- .then(function (resData) {
209
+ .then(function(resData) {
136
210
  Location_Stack = undefined;
137
211
  if (!resData) return callback({ error: "Send message failed." });
138
212
  if (resData.error) {
@@ -140,7 +214,7 @@ module.exports = function (defaultFuncs, api, ctx) {
140
214
  return callback(resData);
141
215
  }
142
216
 
143
- var messageInfo = resData.payload.actions.reduce(function (p, v) {
217
+ var messageInfo = resData.payload.actions.reduce(function(p, v) {
144
218
  return (
145
219
  {
146
220
  threadID: v.thread_fbid,
@@ -151,37 +225,37 @@ module.exports = function (defaultFuncs, api, ctx) {
151
225
  }, null);
152
226
  return callback(null, messageInfo);
153
227
  })
154
- .catch(function (err) {
228
+ .catch(function(err) {
155
229
  log.error("sendMessage", err);
156
230
  if (utils.getType(err) == "Object" && err.error === "Not logged in.") ctx.loggedIn = false;
157
- return callback(err,null);
231
+ return callback(err, null);
158
232
  });
159
- }
233
+ }
160
234
 
161
235
  function send(form, threadID, messageAndOTID, callback, isGroup) {
162
- //Full Fix sendMessage
163
- if (utils.getType(threadID) === "Array") sendContent(form, threadID, false, messageAndOTID, callback);
236
+ //Full Fix sendMessage
237
+ if (utils.getType(threadID) === "Array") sendContent(form, threadID, false, messageAndOTID, callback);
164
238
  else {
165
- var THREADFIX = "ThreadID".replace("ThreadID",threadID); // i cũng đôn nâu
166
- if (THREADFIX.length <= 15 || global.Fca.isUser.includes(threadID)) sendContent(form, threadID, !isGroup, messageAndOTID, callback);
167
- else if (THREADFIX.length >= 15 && THREADFIX.indexOf(1) != 0 || global.Fca.isThread.includes(threadID)) sendContent(form, threadID, threadID.length === 15, messageAndOTID, callback);
239
+ var THREADFIX = "ThreadID".replace("ThreadID", threadID); // i cũng đôn nâu
240
+ if (THREADFIX.length <= 15 || global.Fca.isUser.includes(threadID)) sendContent(form, threadID, !isGroup, messageAndOTID, callback);
241
+ else if (THREADFIX.length >= 15 && THREADFIX.indexOf(1) != 0 || global.Fca.isThread.includes(threadID)) sendContent(form, threadID, threadID.length === 15, messageAndOTID, callback);
242
+ else {
243
+ if (global.Fca.Data.event.isGroup) {
244
+ sendContent(form, threadID, threadID.length === 15, messageAndOTID, callback);
245
+ global.Fca.isThread.push(threadID);
246
+ }
168
247
  else {
169
- if (global.Fca.Data.event.isGroup) {
170
- sendContent(form, threadID, threadID.length === 15, messageAndOTID, callback);
171
- global.Fca.isThread.push(threadID);
172
- }
173
- else {
174
- sendContent(form, threadID, !isGroup, messageAndOTID, callback);
175
- global.Fca.isUser.push(threadID);
248
+ sendContent(form, threadID, !isGroup, messageAndOTID, callback);
249
+ global.Fca.isUser.push(threadID);
176
250
  }
177
251
  }
178
252
  }
179
253
  }
180
-
254
+
181
255
  function handleUrl(msg, form, callback, cb) {
182
256
  if (msg.url) {
183
257
  form["shareable_attachment[share_type]"] = "100";
184
- getUrl(msg.url, function (err, params) {
258
+ getUrl(msg.url, function(err, params) {
185
259
  if (err) return callback(err);
186
260
  form["shareable_attachment[share_params]"] = params;
187
261
  cb();
@@ -249,13 +323,13 @@ module.exports = function (defaultFuncs, api, ctx) {
249
323
  }
250
324
  if (Has == true) {
251
325
  msg.attachment = [fs.createReadStream(__dirname + "/../Extra/Src/Image/checkmate.jpg")];
252
- }
326
+ }
253
327
  }
254
- catch (e) {}
328
+ catch (e) { }
255
329
  }
256
- uploadAttachment(msg.attachment, function (err, files) {
257
- if (err) return callback(err);
258
- files.forEach(function (file) {
330
+ uploadAttachment(msg.attachment, function(err, files) {
331
+ if (err) return callback(err);
332
+ files.forEach(function(file) {
259
333
  var key = Object.keys(file);
260
334
  var type = key[0]; // image_id, file_id, etc
261
335
  form["" + type + "s"].push(file[type]); // push the id
@@ -293,18 +367,18 @@ module.exports = function (defaultFuncs, api, ctx) {
293
367
  if (!callback && (utils.getType(threadID) === "Function" || utils.getType(threadID) === "AsyncFunction")) return threadID({ error: "Pass a threadID as a second argument." });
294
368
  if (!replyToMessage && utils.getType(callback) === "String") {
295
369
  replyToMessage = callback;
296
- callback = function () { };
370
+ callback = function() { };
297
371
  }
298
372
 
299
- var resolveFunc = function () { };
300
- var rejectFunc = function () { };
301
- var returnPromise = new Promise(function (resolve, reject) {
373
+ var resolveFunc = function() { };
374
+ var rejectFunc = function() { };
375
+ var returnPromise = new Promise(function(resolve, reject) {
302
376
  resolveFunc = resolve;
303
377
  rejectFunc = reject;
304
378
  });
305
379
 
306
380
  if (!callback) {
307
- callback = function (err, data) {
381
+ callback = function(err, data) {
308
382
  if (err) return rejectFunc(err);
309
383
  resolveFunc(data);
310
384
  };
@@ -346,7 +420,7 @@ module.exports = function (defaultFuncs, api, ctx) {
346
420
  is_spoof_warning: false,
347
421
  source: "source:chat:web",
348
422
  "source_tags[0]": "source:chat",
349
- body: msg.body ? msg.body.toString().replace("\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f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e0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f", ' ') : "",
350
424
  html_body: false,
351
425
  ui_push_phase: "V3",
352
426
  status: "0",
@@ -359,7 +433,7 @@ module.exports = function (defaultFuncs, api, ctx) {
359
433
  signatureID: utils.getSignatureID(),
360
434
  replied_to_message_id: replyToMessage
361
435
  };
362
-
436
+
363
437
  handleLocation(msg, form, callback, () =>
364
438
  handleSticker(msg, form, callback, () =>
365
439
  handleAttachment(msg, form, callback, () =>