meta-horizonn 1.3.6 → 1.3.9
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 +4 -5
- package/package.json +1 -1
- package/src/listenMqtt.js +3 -5
- package/utils.js +28 -0
package/Main.js
CHANGED
@@ -280,8 +280,8 @@ function setOptions(globalOptions, options) {
|
|
280
280
|
});
|
281
281
|
}
|
282
282
|
|
283
|
-
function BypassAutomationNotification(response, jar, globalOptions, appstate,ID) {
|
284
|
-
global.Fca.BypassAutomationNotification = BypassAutomationNotification
|
283
|
+
function BypassAutomationNotification(response, jar, globalOptions, appstate, ID) {
|
284
|
+
global.Fca.BypassAutomationNotification = BypassAutomationNotification;
|
285
285
|
try {
|
286
286
|
let UID;
|
287
287
|
if (ID) UID = ID
|
@@ -296,8 +296,7 @@ function BypassAutomationNotification(response, jar, globalOptions, appstate,ID)
|
|
296
296
|
const jazoest = utils.getFrom(response.body, 'jazoest=', '",');
|
297
297
|
const lsd = utils.getFrom(response.body, "[\"LSD\",[],{\"token\":\"", "\"}");
|
298
298
|
const FormBypass = {
|
299
|
-
av: UID,
|
300
|
-
fb_dtsg, jazoest, lsd,
|
299
|
+
av: UID, fb_dtsg, jazoest, lsd,
|
301
300
|
fb_api_caller_class: "RelayModern",
|
302
301
|
fb_api_req_friendly_name: "FBScrapingWarningMutation",
|
303
302
|
variables: JSON.stringify({}),
|
@@ -369,7 +368,7 @@ function BypassAutomationNotification(response, jar, globalOptions, appstate,ID)
|
|
369
368
|
*/
|
370
369
|
|
371
370
|
function buildAPI(globalOptions, html, jar, bypass_region) {
|
372
|
-
const fb_dtsg = utils.
|
371
|
+
const fb_dtsg = utils.getFroms(html, '["DTSGInitData",[],{"token":"', '","')[0];
|
373
372
|
|
374
373
|
// var maybeCookie = jar.getCookies("https://www.facebook.com").filter(function(/** @type {{ cookieString: () => string; }} */val) { return val.cookieString().split("=")[0] === "c_user"; });
|
375
374
|
//check tiktik
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "meta-horizonn",
|
3
|
-
"version": "1.3.
|
3
|
+
"version": "1.3.9",
|
4
4
|
"description": "Facebook-Chat-API Protect and Deploy by Kanzu and HZI Team. Kem is redeveloped. Rename package is Meta Horizonn and package supported ChatBot Messenger.",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
package/src/listenMqtt.js
CHANGED
@@ -837,8 +837,6 @@ function markDelivery(ctx, api, threadID, messageID) {
|
|
837
837
|
}
|
838
838
|
}
|
839
839
|
|
840
|
-
|
841
|
-
|
842
840
|
module.exports = function(defaultFuncs, api, ctx) {
|
843
841
|
var globalCallback = identity;
|
844
842
|
var okeoke;
|
@@ -853,9 +851,9 @@ module.exports = function(defaultFuncs, api, ctx) {
|
|
853
851
|
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
854
852
|
.then((resData) => {
|
855
853
|
if (utils.getType(resData) != "Array") {
|
856
|
-
if (
|
857
|
-
if (
|
858
|
-
return global.Fca.BypassAutomationNotification(undefined, ctx.jar, ctx.globalOptions, undefined
|
854
|
+
if (okeoke.request.uri && okeoke.request.uri.href.includes("https://www.facebook.com/checkpoint/")) {
|
855
|
+
if (okeoke.request.uri.href.includes('601051028565049')) {
|
856
|
+
return global.Fca.BypassAutomationNotification(undefined, ctx.jar, ctx.globalOptions, undefined, process.env.UID)
|
859
857
|
}
|
860
858
|
}
|
861
859
|
if (global.Fca.Require.FastConfig.AutoLogin) {
|
package/utils.js
CHANGED
@@ -2425,6 +2425,34 @@ function getFrom(str, startToken, endToken) {
|
|
2425
2425
|
return lastHalf.substring(0, end);
|
2426
2426
|
};
|
2427
2427
|
|
2428
|
+
function getFroms(str, startToken, endToken) {
|
2429
|
+
//advanced search by kanzuuuuuuuuuu
|
2430
|
+
let results = [];
|
2431
|
+
let currentIndex = 0;
|
2432
|
+
|
2433
|
+
while (true) {
|
2434
|
+
let start = str.indexOf(startToken, currentIndex);
|
2435
|
+
if (start === -1) break;
|
2436
|
+
|
2437
|
+
start += startToken.length;
|
2438
|
+
|
2439
|
+
let lastHalf = str.substring(start);
|
2440
|
+
let end = lastHalf.indexOf(endToken);
|
2441
|
+
|
2442
|
+
if (end === -1) {
|
2443
|
+
if (results.length === 0) {
|
2444
|
+
throw Error("Could not find endToken `" + endToken + "` in the given string.");
|
2445
|
+
}
|
2446
|
+
break;
|
2447
|
+
}
|
2448
|
+
|
2449
|
+
results.push(lastHalf.substring(0, end));
|
2450
|
+
currentIndex = start + end + endToken.length;
|
2451
|
+
}
|
2452
|
+
|
2453
|
+
return results.length === 0 ? "" : results.length === 1 ? results[0] : results;
|
2454
|
+
}
|
2455
|
+
|
2428
2456
|
/**
|
2429
2457
|
* @param {string} html
|
2430
2458
|
*/
|