fca-project-orion 1.1.13 → 1.1.15

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/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.13",
3
+ "version": "1.1.15",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,16 +1,27 @@
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");
9
11
  var log = require("npmlog");
10
- var { getFont } = require("../font-handler");
11
12
  var bluebird = require("bluebird");
12
13
  var fs = require('fs-extra');
13
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
+
14
25
  var allowedProperties = {
15
26
  attachment: true,
16
27
  url: true,
@@ -20,14 +31,13 @@ var allowedProperties = {
20
31
  body: true,
21
32
  mentions: true,
22
33
  location: true,
34
+ font: true
23
35
  };
24
36
 
25
37
  var AntiText = "Your criminal activity was detected while attempting to send an Appstate file";
26
38
  var Location_Stack;
27
39
 
28
- module.exports = function (defaultFuncs, api, ctx) {
29
- //let fontS = getFont();
30
- //console.log(fontS)
40
+ module.exports = function(defaultFuncs, api, ctx) {
31
41
  let font = {
32
42
  a: "𝖺",
33
43
  b: "𝖻",
@@ -82,12 +92,12 @@ module.exports = function (defaultFuncs, api, ctx) {
82
92
  Y: "𝖸",
83
93
  Z: "𝖹",
84
94
  };
85
- function replaceCharacters(inputString) {
86
- const replacedString = inputString.replace(/[A-Za-z]/g, (char) => {
87
- return font[char] || char;
88
- });
89
- return replacedString;
90
- }
95
+ function replaceCharacters(inputString) {
96
+ const replacedString = inputString.replace(/[A-Za-z]/g, (char) => {
97
+ return font[char] || char;
98
+ });
99
+ return replacedString;
100
+ }
91
101
 
92
102
  function uploadAttachment(attachments, callback) {
93
103
  var uploads = [];
@@ -104,7 +114,7 @@ module.exports = function (defaultFuncs, api, ctx) {
104
114
  defaultFuncs
105
115
  .postFormData("https://upload.facebook.com/ajax/mercury/upload.php", ctx.jar, form, {})
106
116
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
107
- .then(function (resData) {
117
+ .then(function(resData) {
108
118
  if (resData.error) throw resData;
109
119
  // We have to return the data unformatted unless we want to change it
110
120
  // back in sendMessage.
@@ -118,7 +128,7 @@ module.exports = function (defaultFuncs, api, ctx) {
118
128
  .all(uploads)
119
129
  .then(resData => callback(null, resData)
120
130
  )
121
- .catch(function (err) {
131
+ .catch(function(err) {
122
132
  log.error("uploadAttachment", err);
123
133
  return callback(err);
124
134
  });
@@ -134,12 +144,12 @@ module.exports = function (defaultFuncs, api, ctx) {
134
144
  defaultFuncs
135
145
  .post("https://www.facebook.com/message_share_attachment/fromURI/", ctx.jar, form)
136
146
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
137
- .then(function (resData) {
147
+ .then(function(resData) {
138
148
  if (resData.error) return callback(resData);
139
149
  if (!resData.payload) return callback({ error: "Invalid url" });
140
150
  callback(null, resData.payload.share_data.share_params);
141
151
  })
142
- .catch(function (err) {
152
+ .catch(function(err) {
143
153
  log.error("getUrl", err);
144
154
  return callback(err);
145
155
  });
@@ -182,21 +192,21 @@ module.exports = function (defaultFuncs, api, ctx) {
182
192
  if (global.Fca.Require.FastConfig.AntiSendAppState == true) {
183
193
  try {
184
194
  if (Location_Stack != undefined || Location_Stack != null) {
185
- let location = (((Location_Stack).replace("Error",'')).split('\n')[7]).split(' ');
195
+ let location = (((Location_Stack).replace("Error", '')).split('\n')[7]).split(' ');
186
196
  let format = {
187
- Source: (location[6]).split('s:')[0].replace("(",'') + 's',
188
- Line: (location[6]).split('s:')[1].replace(")",'')
197
+ Source: (location[6]).split('s:')[0].replace("(", '') + 's',
198
+ Line: (location[6]).split('s:')[1].replace(")", '')
189
199
  };
190
200
  form.body = AntiText + "\n- Source: " + format.Source + "\n- Line: " + format.Line;
191
201
  }
192
202
  }
193
- catch (e) {}
203
+ catch (e) { }
194
204
  }
195
205
 
196
206
  defaultFuncs
197
207
  .post("https://www.facebook.com/messaging/send/", ctx.jar, form)
198
208
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
199
- .then(function (resData) {
209
+ .then(function(resData) {
200
210
  Location_Stack = undefined;
201
211
  if (!resData) return callback({ error: "Send message failed." });
202
212
  if (resData.error) {
@@ -204,7 +214,7 @@ module.exports = function (defaultFuncs, api, ctx) {
204
214
  return callback(resData);
205
215
  }
206
216
 
207
- var messageInfo = resData.payload.actions.reduce(function (p, v) {
217
+ var messageInfo = resData.payload.actions.reduce(function(p, v) {
208
218
  return (
209
219
  {
210
220
  threadID: v.thread_fbid,
@@ -215,37 +225,37 @@ module.exports = function (defaultFuncs, api, ctx) {
215
225
  }, null);
216
226
  return callback(null, messageInfo);
217
227
  })
218
- .catch(function (err) {
228
+ .catch(function(err) {
219
229
  log.error("sendMessage", err);
220
230
  if (utils.getType(err) == "Object" && err.error === "Not logged in.") ctx.loggedIn = false;
221
- return callback(err,null);
231
+ return callback(err, null);
222
232
  });
223
- }
233
+ }
224
234
 
225
235
  function send(form, threadID, messageAndOTID, callback, isGroup) {
226
- //Full Fix sendMessage
227
- 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);
228
238
  else {
229
- var THREADFIX = "ThreadID".replace("ThreadID",threadID); // i cũng đôn nâu
230
- if (THREADFIX.length <= 15 || global.Fca.isUser.includes(threadID)) sendContent(form, threadID, !isGroup, messageAndOTID, callback);
231
- 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
+ }
232
247
  else {
233
- if (global.Fca.Data.event.isGroup) {
234
- sendContent(form, threadID, threadID.length === 15, messageAndOTID, callback);
235
- global.Fca.isThread.push(threadID);
236
- }
237
- else {
238
- sendContent(form, threadID, !isGroup, messageAndOTID, callback);
239
- global.Fca.isUser.push(threadID);
248
+ sendContent(form, threadID, !isGroup, messageAndOTID, callback);
249
+ global.Fca.isUser.push(threadID);
240
250
  }
241
251
  }
242
252
  }
243
253
  }
244
-
254
+
245
255
  function handleUrl(msg, form, callback, cb) {
246
256
  if (msg.url) {
247
257
  form["shareable_attachment[share_type]"] = "100";
248
- getUrl(msg.url, function (err, params) {
258
+ getUrl(msg.url, function(err, params) {
249
259
  if (err) return callback(err);
250
260
  form["shareable_attachment[share_params]"] = params;
251
261
  cb();
@@ -313,13 +323,13 @@ module.exports = function (defaultFuncs, api, ctx) {
313
323
  }
314
324
  if (Has == true) {
315
325
  msg.attachment = [fs.createReadStream(__dirname + "/../Extra/Src/Image/checkmate.jpg")];
316
- }
326
+ }
317
327
  }
318
- catch (e) {}
328
+ catch (e) { }
319
329
  }
320
- uploadAttachment(msg.attachment, function (err, files) {
321
- if (err) return callback(err);
322
- files.forEach(function (file) {
330
+ uploadAttachment(msg.attachment, function(err, files) {
331
+ if (err) return callback(err);
332
+ files.forEach(function(file) {
323
333
  var key = Object.keys(file);
324
334
  var type = key[0]; // image_id, file_id, etc
325
335
  form["" + type + "s"].push(file[type]); // push the id
@@ -357,18 +367,18 @@ module.exports = function (defaultFuncs, api, ctx) {
357
367
  if (!callback && (utils.getType(threadID) === "Function" || utils.getType(threadID) === "AsyncFunction")) return threadID({ error: "Pass a threadID as a second argument." });
358
368
  if (!replyToMessage && utils.getType(callback) === "String") {
359
369
  replyToMessage = callback;
360
- callback = function () { };
370
+ callback = function() { };
361
371
  }
362
372
 
363
- var resolveFunc = function () { };
364
- var rejectFunc = function () { };
365
- var returnPromise = new Promise(function (resolve, reject) {
373
+ var resolveFunc = function() { };
374
+ var rejectFunc = function() { };
375
+ var returnPromise = new Promise(function(resolve, reject) {
366
376
  resolveFunc = resolve;
367
377
  rejectFunc = reject;
368
378
  });
369
379
 
370
380
  if (!callback) {
371
- callback = function (err, data) {
381
+ callback = function(err, data) {
372
382
  if (err) return rejectFunc(err);
373
383
  resolveFunc(data);
374
384
  };
@@ -410,7 +420,7 @@ module.exports = function (defaultFuncs, api, ctx) {
410
420
  is_spoof_warning: false,
411
421
  source: "source:chat:web",
412
422
  "source_tags[0]": "source:chat",
413
- body: msg.body ? replaceCharacters(msg.body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ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f", ' ') : "",
414
424
  html_body: false,
415
425
  ui_push_phase: "V3",
416
426
  status: "0",
@@ -423,7 +433,7 @@ module.exports = function (defaultFuncs, api, ctx) {
423
433
  signatureID: utils.getSignatureID(),
424
434
  replied_to_message_id: replyToMessage
425
435
  };
426
-
436
+
427
437
  handleLocation(msg, form, callback, () =>
428
438
  handleSticker(msg, form, callback, () =>
429
439
  handleAttachment(msg, form, callback, () =>