fca-smart-shankar 18.0.0 → 19.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.
- package/index.js +22 -22
- package/package.json +1 -1
- package/utils.js +51 -17
- package/.cache/typescript/5.5/package.json +0 -1
package/index.js
CHANGED
@@ -22,12 +22,12 @@ global.Fca = new Object({
|
|
22
22
|
return Main;
|
23
23
|
},
|
24
24
|
Data: new Object({
|
25
|
-
|
25
|
+
ObjPriyansh: {
|
26
26
|
"Language": "en",
|
27
27
|
"PreKey": "",
|
28
28
|
"AutoUpdate": true,
|
29
29
|
"MainColor": "#9900FF",
|
30
|
-
"MainName": "[ FCA-SHANKAR ]",
|
30
|
+
"MainName": "[ FCA-SMART-SHANKAR ]",
|
31
31
|
"Uptime": false,
|
32
32
|
"Config": "default",
|
33
33
|
"DevMode": false,
|
@@ -166,25 +166,25 @@ try {
|
|
166
166
|
let All_Variable = Boolean_Fca.concat(String_Fca,Number_Fca,Object_Fca);
|
167
167
|
|
168
168
|
|
169
|
-
if (!global.Fca.Require.fs.existsSync(process.cwd() + '/
|
170
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
169
|
+
if (!global.Fca.Require.fs.existsSync(process.cwd() + '/ShankarFca.json')) {
|
170
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/ShankarFca.json", JSON.stringify(global.Fca.Data.ObjShankar, null, "\t"));
|
171
171
|
process.exit(1);
|
172
172
|
}
|
173
173
|
|
174
174
|
try {
|
175
|
-
var Data_Setting = require(process.cwd() + "/
|
175
|
+
var Data_Setting = require(process.cwd() + "/ShankarFca.json");
|
176
176
|
}
|
177
177
|
catch (e) {
|
178
|
-
global.Fca.Require.logger.Error('Detect Your
|
179
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
178
|
+
global.Fca.Require.logger.Error('Detect Your ShankarFca Settings Invalid!, Carry out default restoration');
|
179
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/ShankarFca.json", JSON.stringify(global.Fca.Data.ObjShankar, null, "\t"));
|
180
180
|
process.exit(1)
|
181
181
|
}
|
182
|
-
if (global.Fca.Require.fs.existsSync(process.cwd() + '/
|
183
|
-
|
182
|
+
if (global.Fca.Require.fs.existsSync(process.cwd() + '/ShankarhFca.json')) {
|
183
|
+
|
184
184
|
for (let i of All_Variable) {
|
185
185
|
if (Data_Setting[i] == undefined) {
|
186
|
-
Data_Setting[i] = global.Fca.Data.
|
187
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
186
|
+
Data_Setting[i] = global.Fca.Data.ObjShankar[i];
|
187
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/ShankarFca.json", JSON.stringify(Data_Setting, null, "\t"));
|
188
188
|
}
|
189
189
|
else continue;
|
190
190
|
} //Check Variable
|
@@ -204,28 +204,28 @@ catch (e) {
|
|
204
204
|
}
|
205
205
|
else if (Object_Fca.includes(i)) {
|
206
206
|
if (global.Fca.Require.utils.getType(Data_Setting[i]) != "Object") {
|
207
|
-
Data_Setting[i] = global.Fca.Data.
|
208
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
207
|
+
Data_Setting[i] = global.Fca.Data.ObjShankar[i];
|
208
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/ShankarFca.json", JSON.stringify(Data_Setting, null, "\t"));
|
209
209
|
}
|
210
210
|
else continue;
|
211
211
|
}
|
212
212
|
}
|
213
213
|
|
214
214
|
for (let i of Object_Fca) {
|
215
|
-
const All_Paths = utils.getPaths(global.Fca.Data.
|
215
|
+
const All_Paths = utils.getPaths(global.Fca.Data.ObjShankar[i]);
|
216
216
|
const Mission = { Main_Path: i, Data_Path: All_Paths }
|
217
217
|
for (let i of Mission.Data_Path) {
|
218
218
|
if (Data_Setting[Mission.Main_Path] == undefined) {
|
219
|
-
Data_Setting[Mission.Main_Path] = global.Fca.Data.
|
220
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
219
|
+
Data_Setting[Mission.Main_Path] = global.Fca.Data.ObjShankar[Mission.Main_Path];
|
220
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/ShankarFca.json", JSON.stringify(Data_Setting, null, "\t"));
|
221
221
|
}
|
222
222
|
const User_Data = (utils.getData_Path(Data_Setting[Mission.Main_Path], i, 0))
|
223
223
|
const User_Data_Type = utils.getType(User_Data);
|
224
224
|
if (User_Data_Type == "Number") {
|
225
225
|
const Mission_Path = User_Data == 0 ? i : i.slice(0, User_Data);
|
226
|
-
const Mission_Obj = utils.getData_Path(global.Fca.Data.
|
226
|
+
const Mission_Obj = utils.getData_Path(global.Fca.Data.ObjShankar[Mission.Main_Path], Mission_Path, 0);
|
227
227
|
Data_Setting[Mission.Main_Path] = utils.setData_Path(Data_Setting[Mission.Main_Path], Mission_Path, Mission_Obj)
|
228
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
228
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/ShankarFca.json", JSON.stringify(Data_Setting, null, "\t"));
|
229
229
|
}
|
230
230
|
}
|
231
231
|
}
|
@@ -236,7 +236,7 @@ catch (e) {
|
|
236
236
|
}
|
237
237
|
global.Fca.Require.Language = global.Fca.Require.languageFile.find((/** @type {{ Language: string; }} */i) => i.Language == Data_Setting.Language).Folder;
|
238
238
|
} else process.exit(1);
|
239
|
-
global.Fca.Require.
|
239
|
+
global.Fca.Require.Shankar = Data_Setting;
|
240
240
|
}
|
241
241
|
catch (e) {
|
242
242
|
console.log(e);
|
@@ -274,7 +274,7 @@ module.exports = function(loginData, options, callback) {
|
|
274
274
|
//const log = require('npmlog');
|
275
275
|
//const { execSync } = require('child_process');
|
276
276
|
require('./Extra/Database');
|
277
|
-
|
277
|
+
|
278
278
|
/*
|
279
279
|
return got.get('https://github.com/KanzuXHorizon/Global_Horizon/raw/main/InstantAction.json').then(async function(res) {
|
280
280
|
if (global.Fca.Require.FastConfig.AutoInstallNode) {
|
@@ -410,7 +410,7 @@ module.exports = function(loginData, options, callback) {
|
|
410
410
|
else {
|
411
411
|
log.warn("[ FCA-UPDATE ] •", "Error Stable Version, Please Check Your Stable Version in FastConfig.json, Automatically turn off Stable Version!");
|
412
412
|
global.Fca.Require.FastConfig.Stable_Version.Accept = false;
|
413
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
413
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/PriyanshFca.json", JSON.stringify(global.Fca.Require.FastConfig, null, "\t"));
|
414
414
|
process.exit(1);
|
415
415
|
}
|
416
416
|
}
|
@@ -445,4 +445,4 @@ module.exports = function(loginData, options, callback) {
|
|
445
445
|
catch (e) {
|
446
446
|
console.log(e)
|
447
447
|
}
|
448
|
-
};
|
448
|
+
};
|
package/package.json
CHANGED
package/utils.js
CHANGED
@@ -1,8 +1,3 @@
|
|
1
|
-
// @ts-nocheck
|
2
|
-
/* eslint-disable no-undef */
|
3
|
-
|
4
|
-
/* eslint-disable no-prototype-builtins */
|
5
|
-
|
6
1
|
"use strict";
|
7
2
|
var url = require("url");
|
8
3
|
var log = require("npmlog");
|
@@ -2405,13 +2400,41 @@ function formatRead(event) {
|
|
2405
2400
|
function getFrom(str, startToken, endToken) {
|
2406
2401
|
var start = str.indexOf(startToken) + startToken.length;
|
2407
2402
|
if (start < startToken.length) return "";
|
2408
|
-
|
2409
2403
|
var lastHalf = str.substring(start);
|
2410
2404
|
var end = lastHalf.indexOf(endToken);
|
2411
|
-
if (end === -1) throw Error("Could not find endTime
|
2405
|
+
if (end === -1) throw Error("Could not find endTime " + endToken + " in the given string.");
|
2412
2406
|
return lastHalf.substring(0, end);
|
2413
2407
|
}
|
2414
2408
|
|
2409
|
+
|
2410
|
+
function getFroms(str, startToken, endToken) {
|
2411
|
+
//advanced search by kanzuuuuuuuuuu
|
2412
|
+
let results = [];
|
2413
|
+
let currentIndex = 0;
|
2414
|
+
|
2415
|
+
while (true) {
|
2416
|
+
let start = str.indexOf(startToken, currentIndex);
|
2417
|
+
if (start === -1) break;
|
2418
|
+
|
2419
|
+
start += startToken.length;
|
2420
|
+
|
2421
|
+
let lastHalf = str.substring(start);
|
2422
|
+
let end = lastHalf.indexOf(endToken);
|
2423
|
+
|
2424
|
+
if (end === -1) {
|
2425
|
+
if (results.length === 0) {
|
2426
|
+
throw Error("Could not find endToken `" + endToken + "` in the given string.");
|
2427
|
+
}
|
2428
|
+
break;
|
2429
|
+
}
|
2430
|
+
|
2431
|
+
results.push(lastHalf.substring(0, end));
|
2432
|
+
currentIndex = start + end + endToken.length;
|
2433
|
+
}
|
2434
|
+
|
2435
|
+
return results.length === 0 ? "" : results.length === 1 ? results[0] : results;
|
2436
|
+
}
|
2437
|
+
|
2415
2438
|
/**
|
2416
2439
|
* @param {string} html
|
2417
2440
|
*/
|
@@ -2659,12 +2682,17 @@ function parseAndCheckLogin(ctx, defaultFuncs, retryCount) {
|
|
2659
2682
|
}
|
2660
2683
|
|
2661
2684
|
if (res.error === 1357001) {
|
2662
|
-
if (global.Fca.Require.
|
2685
|
+
if (global.Fca.Require.Priyansh.AutoLogin && global.Fca.Require.Priyansh.CheckPointBypass['956'].Allow) {
|
2663
2686
|
return global.Fca.Require.logger.Warning(global.Fca.Require.Language.Index.Bypass_956, async function() {
|
2664
2687
|
const Check = () => new Promise((re) => {
|
2665
2688
|
defaultFuncs.get('https://facebook.com', ctx.jar).then(function(res) {
|
2666
2689
|
if (res.headers.location && res.headers.location.includes('https://www.facebook.com/checkpoint/')) {
|
2667
|
-
if (res.headers.includes('828281030927956')) return global.Fca.Action('Bypass', ctx, "956", defaultFuncs)
|
2690
|
+
if (res.headers.location.includes('828281030927956')) return global.Fca.Action('Bypass', ctx, "956", defaultFuncs)
|
2691
|
+
else if (res.request.uri && res.request.uri.href.includes("https://www.facebook.com/checkpoint/")) {
|
2692
|
+
if (res.request.uri.href.includes('601051028565049')) {
|
2693
|
+
return global.Fca.BypassAutomationNotification(undefined, ctx.jar, ctx.globalOptions, undefined ,process.env.UID)
|
2694
|
+
}
|
2695
|
+
}
|
2668
2696
|
else return global.Fca.Require.logger.Error(global.Fca.Require.Language.Index.ErrAppState);
|
2669
2697
|
}
|
2670
2698
|
else return global.Fca.Require.logger.Warning(global.Fca.Require.Language.Index.AutoLogin, function() {
|
@@ -2675,12 +2703,17 @@ function parseAndCheckLogin(ctx, defaultFuncs, retryCount) {
|
|
2675
2703
|
await Check();
|
2676
2704
|
});
|
2677
2705
|
}
|
2678
|
-
if (
|
2706
|
+
if (res.request.uri && res.request.uri.href.includes("https://www.facebook.com/checkpoint/")) {
|
2707
|
+
if (res.request.uri.href.includes('601051028565049')) {
|
2708
|
+
return global.Fca.BypassAutomationNotification(undefined, ctx.jar, ctx.globalOptions, undefined ,process.env.UID)
|
2709
|
+
}
|
2710
|
+
}
|
2711
|
+
if (global.Fca.Require.Priyansh.AutoLogin) {
|
2679
2712
|
return global.Fca.Require.logger.Warning(global.Fca.Require.Language.Index.AutoLogin, function() {
|
2680
2713
|
return global.Fca.Action('AutoLogin');
|
2681
2714
|
});
|
2682
2715
|
}
|
2683
|
-
else if (!global.Fca.Require.
|
2716
|
+
else if (!global.Fca.Require.Priyansh.AutoLogin) {
|
2684
2717
|
return global.Fca.Require.logger.Error(global.Fca.Require.Language.Index.ErrAppState);
|
2685
2718
|
}
|
2686
2719
|
return;
|
@@ -2883,9 +2916,9 @@ function getAppState(jar, Encode) {
|
|
2883
2916
|
var Security = require("./Extra/Security/Base");
|
2884
2917
|
var appstate = jar.getCookies("https://www.facebook.com").concat(jar.getCookies("https://facebook.com")).concat(jar.getCookies("https://www.messenger.com"));
|
2885
2918
|
var logger = require('./logger'),languageFile = require('./Language/index.json');
|
2886
|
-
var Language = languageFile.find(i => i.Language == globalThis.Fca.Require.
|
2919
|
+
var Language = languageFile.find(i => i.Language == globalThis.Fca.Require.Priyansh.Language).Folder.Index;
|
2887
2920
|
var data;
|
2888
|
-
switch (require(process.cwd() + "/
|
2921
|
+
switch (require(process.cwd() + "/PriyanshFca.json").EncryptFeature) {
|
2889
2922
|
case true: {
|
2890
2923
|
if (Encode == undefined) Encode = true;
|
2891
2924
|
if (process.env['FBKEY'] != undefined && Encode) {
|
@@ -2900,7 +2933,7 @@ function getAppState(jar, Encode) {
|
|
2900
2933
|
}
|
2901
2934
|
break;
|
2902
2935
|
default: {
|
2903
|
-
logger.Normal(getText(Language.IsNotABoolean,require(process.cwd() + "/
|
2936
|
+
logger.Normal(getText(Language.IsNotABoolean,require(process.cwd() + "/PriyanshFca.json").EncryptFeature));
|
2904
2937
|
data = appstate;
|
2905
2938
|
}
|
2906
2939
|
}
|
@@ -2959,7 +2992,7 @@ function getPaths(obj, parentPath = []) {
|
|
2959
2992
|
}
|
2960
2993
|
return paths;
|
2961
2994
|
}
|
2962
|
-
|
2995
|
+
|
2963
2996
|
function cleanHTML (text) {
|
2964
2997
|
text = text.replace(/(<br>)|(<\/?i>)|(<\/?em>)|(<\/?b>)|(!?~)|(&)|(')|(<)|(>)|(")/g, (match) => {
|
2965
2998
|
switch (match) {
|
@@ -3034,5 +3067,6 @@ module.exports = {
|
|
3034
3067
|
decodeClientPayload,
|
3035
3068
|
getAppState,
|
3036
3069
|
getAdminTextMessageType,
|
3037
|
-
setProxy
|
3038
|
-
|
3070
|
+
setProxy,
|
3071
|
+
getFroms
|
3072
|
+
};
|
@@ -1 +0,0 @@
|
|
1
|
-
{"private":true,"dependencies":{"types-registry":"^0.1.696"},"devDependencies":{"@types/aes-js":"^3.1.4","@types/assert":"^1.5.11","@types/better-sqlite3":"^7.6.12","@types/bluebird":"^3.5.42","@types/cheerio":"^0.22.35","@types/crypto-js":"^4.2.2","@types/deasync":"^0.1.5","@types/duplexify":"^3.6.4","@types/express":"^5.0.0","@types/figlet":"^1.7.0","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.13","@types/mocha":"^10.0.10","@types/node":"^22.9.3","@types/npmlog":"^7.0.0","@types/readable-stream":"^4.0.18","@types/request":"^2.48.12","@types/speakeasy":"^2.0.10","@types/sqlite3":"^3.1.11","@types/totp-generator":"^0.0.8","@types/uuid":"^10.0.0","@types/ws":"^8.5.13"}}
|