fca-priyansh 10.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.gitattributes +2 -0
- package/.github/workflows/publish.yml +20 -0
- package/Extra/Database/index.js +360 -0
- package/Extra/ExtraAddons.js +80 -0
- package/Extra/ExtraFindUID.js +60 -0
- package/Extra/ExtraGetThread.js +118 -0
- package/Extra/ExtraScreenShot.js +430 -0
- package/Extra/ExtraUptimeRobot.js +26 -0
- package/Extra/Html/Classic/script.js +119 -0
- package/Extra/Html/Classic/style.css +8 -0
- package/Extra/Security/Index.js +146 -0
- package/Extra/Security/Step_1.js +11 -0
- package/Extra/Security/Step_2.js +20 -0
- package/Extra/Security/Step_3.js +20 -0
- package/Extra/Src/Change_Environment.js +24 -0
- package/Extra/Src/History.js +115 -0
- package/Extra/Src/Last-Run.js +65 -0
- package/Extra/Src/Premium.js +84 -0
- package/Extra/Src/uuid.js +137 -0
- package/Func/AcceptAgreement.js +32 -0
- package/Func/ClearCache.js +64 -0
- package/Func/ReportV1.js +54 -0
- package/LICENSE +24 -0
- package/Language/index.json +177 -0
- package/README.md +1 -0
- package/SECURITY.md +17 -0
- package/broadcast.js +38 -0
- package/gitattributes +2 -0
- package/gitignore.txt +10 -0
- package/index.js +1364 -0
- package/logger.js +66 -0
- package/package.json +91 -0
- package/src/Dev_Horizon_Data.js +125 -0
- package/src/Premium.js +30 -0
- package/src/Screenshot.js +85 -0
- package/src/addExternalModule.js +16 -0
- package/src/addUserToGroup.js +79 -0
- package/src/changeAdminStatus.js +79 -0
- package/src/changeArchivedStatus.js +41 -0
- package/src/changeAvt.js +85 -0
- package/src/changeBio.js +65 -0
- package/src/changeBlockedStatus.js +36 -0
- package/src/changeGroupImage.js +106 -0
- package/src/changeNickname.js +45 -0
- package/src/changeThreadColor.js +62 -0
- package/src/changeThreadEmoji.js +42 -0
- package/src/createNewGroup.js +70 -0
- package/src/createPoll.js +60 -0
- package/src/deleteMessage.js +45 -0
- package/src/deleteThread.js +43 -0
- package/src/forwardAttachment.js +48 -0
- package/src/getAccessToken.js +32 -0
- package/src/getCurrentUserID.js +7 -0
- package/src/getEmojiUrl.js +27 -0
- package/src/getFriendsList.js +73 -0
- package/src/getMessage.js +80 -0
- package/src/getThreadHistory.js +537 -0
- package/src/getThreadInfo.js +348 -0
- package/src/getThreadList.js +213 -0
- package/src/getThreadMain.js +220 -0
- package/src/getThreadPictures.js +59 -0
- package/src/getUID.js +59 -0
- package/src/getUserID.js +62 -0
- package/src/getUserInfo.js +129 -0
- package/src/getUserInfoMain.js +65 -0
- package/src/getUserInfoV2.js +36 -0
- package/src/getUserInfoV3.js +63 -0
- package/src/getUserInfoV4.js +55 -0
- package/src/getUserInfoV5.js +61 -0
- package/src/handleFriendRequest.js +46 -0
- package/src/handleMessageRequest.js +49 -0
- package/src/httpGet.js +49 -0
- package/src/httpPost.js +48 -0
- package/src/httpPostFormData.js +41 -0
- package/src/listenMqtt.js +676 -0
- package/src/logout.js +68 -0
- package/src/markAsDelivered.js +48 -0
- package/src/markAsRead.js +70 -0
- package/src/markAsReadAll.js +43 -0
- package/src/markAsSeen.js +51 -0
- package/src/muteThread.js +47 -0
- package/src/removeUserFromGroup.js +49 -0
- package/src/resolvePhotoUrl.js +37 -0
- package/src/searchForThread.js +43 -0
- package/src/sendMessage.js +334 -0
- package/src/sendTypingIndicator.js +80 -0
- package/src/setMessageReaction.js +109 -0
- package/src/setPostReaction.js +102 -0
- package/src/setTitle.js +74 -0
- package/src/threadColors.js +39 -0
- package/src/unfriend.js +43 -0
- package/src/unsendMessage.js +40 -0
- package/test/data/shareAttach.js +146 -0
- package/test/data/something.mov +0 -0
- package/test/data/test.png +0 -0
- package/test/data/test.txt +7 -0
- package/test/env/.env +0 -0
- package/test/example-config.json +18 -0
- package/test/test-page.js +140 -0
- package/test/test.js +385 -0
- package/test/testv2.js +3 -0
- package/utils.js +1648 -0
@@ -0,0 +1,55 @@
|
|
1
|
+
/* eslint-disable linebreak-style */
|
2
|
+
"use strict";
|
3
|
+
|
4
|
+
var utils = require("../utils");
|
5
|
+
var log = require("npmlog");
|
6
|
+
|
7
|
+
|
8
|
+
module.exports = function (defaultFuncs, api, ctx) {
|
9
|
+
return function getUserInfoV4(id, callback) {
|
10
|
+
var resolveFunc = function () { };
|
11
|
+
var rejectFunc = function () { };
|
12
|
+
var returnPromise = new Promise(function (resolve, reject) {
|
13
|
+
resolveFunc = resolve;
|
14
|
+
rejectFunc = reject;
|
15
|
+
});
|
16
|
+
|
17
|
+
if (!callback) {
|
18
|
+
callback = function (err, userInfo) {
|
19
|
+
if (err) return rejectFunc(err);
|
20
|
+
resolveFunc(userInfo);
|
21
|
+
};
|
22
|
+
}
|
23
|
+
|
24
|
+
if (utils.getType(id) !== "Array") id = [id];
|
25
|
+
|
26
|
+
var form = {
|
27
|
+
av: ctx.userID,
|
28
|
+
fb_api_caller_class: "RelayModern",
|
29
|
+
fb_api_req_friendly_name: "PresenceStatusProviderSubscription_ContactProfilesQuery",
|
30
|
+
variables: JSON.stringify({
|
31
|
+
ids: id
|
32
|
+
}),
|
33
|
+
doc_id: 7188178894556645
|
34
|
+
};
|
35
|
+
console.log(form)
|
36
|
+
try {
|
37
|
+
defaultFuncs
|
38
|
+
.post("https://www.facebook.com/api/graphql/", ctx.jar, form)
|
39
|
+
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
40
|
+
.then(function (resData) {
|
41
|
+
if (resData.error) throw resData;
|
42
|
+
callback(null,resData.data.viewer.chat_sidebar_contact_nodes[0])
|
43
|
+
})
|
44
|
+
.catch(function (err) {
|
45
|
+
console.log(err)
|
46
|
+
log.error("getUserInfo", "Error: getUserInfo Maybe You Spam Too Much!,Try Again !");
|
47
|
+
return callback(err);
|
48
|
+
});
|
49
|
+
}
|
50
|
+
catch (e) {
|
51
|
+
return callback(null, e);
|
52
|
+
}
|
53
|
+
return returnPromise;
|
54
|
+
};
|
55
|
+
};
|
@@ -0,0 +1,61 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var utils = require("../utils");
|
4
|
+
var log = require("npmlog");
|
5
|
+
|
6
|
+
|
7
|
+
module.exports = function(defaultFuncs, api, ctx) {
|
8
|
+
|
9
|
+
return function getUserInfoV5GraphQL(id, callback) {
|
10
|
+
var resolveFunc = function(){};
|
11
|
+
var rejectFunc = function(){};
|
12
|
+
var returnPromise = new Promise(function (resolve, reject) {
|
13
|
+
resolveFunc = resolve;
|
14
|
+
rejectFunc = reject;
|
15
|
+
});
|
16
|
+
|
17
|
+
if (utils.getType(callback) != "Function" && utils.getType(callback) != "AsyncFunction") {
|
18
|
+
callback = function (err, data) {
|
19
|
+
if (err) {
|
20
|
+
return rejectFunc(err);
|
21
|
+
}
|
22
|
+
resolveFunc(data);
|
23
|
+
};
|
24
|
+
}
|
25
|
+
|
26
|
+
// `queries` has to be a string. I couldn't tell from the dev console. This
|
27
|
+
// took me a really long time to figure out. I deserve a cookie for this.
|
28
|
+
var form = {
|
29
|
+
queries: JSON.stringify({
|
30
|
+
o0: {
|
31
|
+
// This doc_id is valid as of July 20th, 2020
|
32
|
+
doc_id: "5009315269112105",
|
33
|
+
query_params: {
|
34
|
+
ids: [id]
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}),
|
38
|
+
batch_name: "MessengerParticipantsFetcher"
|
39
|
+
};
|
40
|
+
defaultFuncs
|
41
|
+
.post("https://www.facebook.com/api/graphqlbatch/", ctx.jar, form)
|
42
|
+
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
43
|
+
.then(function(resData) {
|
44
|
+
if (resData.error) {
|
45
|
+
throw resData;
|
46
|
+
}
|
47
|
+
// This returns us an array of things. The last one is the success /
|
48
|
+
// failure one.
|
49
|
+
// @TODO What do we do in this case?
|
50
|
+
if (resData[resData.length - 1].error_results !== 0) {
|
51
|
+
console.error("GetThreadInfo", "You're Getting Paid For Using Too Much !");
|
52
|
+
}
|
53
|
+
callback(null, resData);
|
54
|
+
})
|
55
|
+
.catch(function(err) {
|
56
|
+
log.error("getThreadInfoGraphQL", "Error: getThreadInfoGraphQL Maybe You Spam Too Much, Please Try Again !");
|
57
|
+
return callback(err);
|
58
|
+
});
|
59
|
+
return returnPromise;
|
60
|
+
}
|
61
|
+
};
|
@@ -0,0 +1,46 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var utils = require("../utils");
|
4
|
+
var log = require("npmlog");
|
5
|
+
|
6
|
+
module.exports = function (defaultFuncs, api, ctx) {
|
7
|
+
return function handleFriendRequest(userID, accept, callback) {
|
8
|
+
if (utils.getType(accept) !== "Boolean") throw { error: "Please pass a boolean as a second argument." };
|
9
|
+
|
10
|
+
var resolveFunc = function () { };
|
11
|
+
var rejectFunc = function () { };
|
12
|
+
var returnPromise = new Promise(function (resolve, reject) {
|
13
|
+
resolveFunc = resolve;
|
14
|
+
rejectFunc = reject;
|
15
|
+
});
|
16
|
+
|
17
|
+
if (!callback) {
|
18
|
+
callback = function (err, data) {
|
19
|
+
if (err) return rejectFunc(err);
|
20
|
+
resolveFunc(data);
|
21
|
+
};
|
22
|
+
}
|
23
|
+
|
24
|
+
var form = {
|
25
|
+
viewer_id: userID,
|
26
|
+
"frefs[0]": "jwl",
|
27
|
+
floc: "friend_center_requests",
|
28
|
+
ref: "/reqs.php",
|
29
|
+
action: (accept ? "confirm" : "reject")
|
30
|
+
};
|
31
|
+
|
32
|
+
defaultFuncs
|
33
|
+
.post("https://www.facebook.com/requests/friends/ajax/", ctx.jar, form)
|
34
|
+
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
35
|
+
.then(function (resData) {
|
36
|
+
if (resData.payload.err) throw { err: resData.payload.err };
|
37
|
+
return callback();
|
38
|
+
})
|
39
|
+
.catch(function (err) {
|
40
|
+
log.error("handleFriendRequest", err);
|
41
|
+
return callback(err);
|
42
|
+
});
|
43
|
+
|
44
|
+
return returnPromise;
|
45
|
+
};
|
46
|
+
};
|
@@ -0,0 +1,49 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var utils = require("../utils");
|
4
|
+
var log = require("npmlog");
|
5
|
+
|
6
|
+
module.exports = function (/** @type {{ post: any; postFormData?: (arg0: string, arg1: any, arg2: any, arg3: {}) => any; get?: (arg0: any, arg1: any) => Promise<any>; }} */ defaultFuncs, /** @type {any} */ api, /** @type {{ jar: any; fb_dtsg?: string; ttstamp?: string; }} */ ctx) {
|
7
|
+
return function handleMessageRequest(/** @type {string | any[]} */ threadID, /** @type {any} */ accept, /** @type {((err: any, data: any) => void) | ((arg0: undefined) => any)} */ callback) {
|
8
|
+
if (utils.getType(accept) !== "Boolean") throw { error: "Please pass a boolean as a second argument." };
|
9
|
+
|
10
|
+
var resolveFunc = function () { };
|
11
|
+
var rejectFunc = function () { };
|
12
|
+
var returnPromise = new Promise(function (resolve, reject) {
|
13
|
+
resolveFunc = resolve;
|
14
|
+
rejectFunc = reject;
|
15
|
+
});
|
16
|
+
|
17
|
+
if (!callback) {
|
18
|
+
callback = function (/** @type {any} */ err, /** @type {any} */ data) {
|
19
|
+
if (err) return rejectFunc(err);
|
20
|
+
resolveFunc(data);
|
21
|
+
};
|
22
|
+
}
|
23
|
+
|
24
|
+
var form = {
|
25
|
+
client: "mercury"
|
26
|
+
};
|
27
|
+
|
28
|
+
if (utils.getType(threadID) !== "Array") threadID = [threadID];
|
29
|
+
|
30
|
+
var messageBox = accept ? "inbox" : "other";
|
31
|
+
|
32
|
+
for (var i = 0; i < threadID.length; i++) form[messageBox + "[" + i + "]"] = threadID[i];
|
33
|
+
|
34
|
+
defaultFuncs
|
35
|
+
.post("https://www.facebook.com/ajax/mercury/move_thread.php", ctx.jar, form)
|
36
|
+
.then(utils.parseAndCheckLogin(ctx, defaultFuncs))
|
37
|
+
.then(function (/** @type {{ error: any; }} */ resData) {
|
38
|
+
if (resData.error) throw resData;
|
39
|
+
|
40
|
+
return callback();
|
41
|
+
})
|
42
|
+
.catch(function (/** @type {string} */ err) {
|
43
|
+
log.error("handleMessageRequest", err);
|
44
|
+
return callback(err);
|
45
|
+
});
|
46
|
+
|
47
|
+
return returnPromise;
|
48
|
+
};
|
49
|
+
};
|
package/src/httpGet.js
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var utils = require("../utils");
|
4
|
+
var log = require("npmlog");
|
5
|
+
|
6
|
+
module.exports = function (defaultFuncs, api, ctx) {
|
7
|
+
return function httpGet(url, form, callback, notAPI) {
|
8
|
+
var resolveFunc = function () { };
|
9
|
+
var rejectFunc = function () { };
|
10
|
+
|
11
|
+
var returnPromise = new Promise(function (resolve, reject) {
|
12
|
+
resolveFunc = resolve;
|
13
|
+
rejectFunc = reject;
|
14
|
+
});
|
15
|
+
|
16
|
+
if (!callback && (utils.getType(form) == "Function" || utils.getType(form) == "AsyncFunction")) {
|
17
|
+
callback = form;
|
18
|
+
form = {};
|
19
|
+
}
|
20
|
+
|
21
|
+
form = form || {};
|
22
|
+
|
23
|
+
callback = callback || function (err, data) {
|
24
|
+
if (err) return rejectFunc(err);
|
25
|
+
resolveFunc(data);
|
26
|
+
};
|
27
|
+
|
28
|
+
if (notAPI) {
|
29
|
+
utils
|
30
|
+
.get(url, ctx.jar, form, ctx.globalOptions)
|
31
|
+
.then(resData => callback(null, resData.body.toString()))
|
32
|
+
.catch(function (err) {
|
33
|
+
log.error("httpGet", err);
|
34
|
+
return callback(err);
|
35
|
+
});
|
36
|
+
}
|
37
|
+
else {
|
38
|
+
defaultFuncs
|
39
|
+
.get(url, ctx.jar, form)
|
40
|
+
.then(resData => callback(null, resData.body.toString()))
|
41
|
+
.catch(function (err) {
|
42
|
+
log.error("httpGet", err);
|
43
|
+
return callback(err);
|
44
|
+
});
|
45
|
+
}
|
46
|
+
|
47
|
+
return returnPromise;
|
48
|
+
};
|
49
|
+
};
|
package/src/httpPost.js
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var utils = require("../utils");
|
4
|
+
var log = require("npmlog");
|
5
|
+
|
6
|
+
module.exports = function (defaultFuncs, api, ctx) {
|
7
|
+
return function httpGet(url, form, callback, notAPI) {
|
8
|
+
var resolveFunc = function () { };
|
9
|
+
var rejectFunc = function () { };
|
10
|
+
|
11
|
+
var returnPromise = new Promise(function (resolve, reject) {
|
12
|
+
resolveFunc = resolve;
|
13
|
+
rejectFunc = reject;
|
14
|
+
});
|
15
|
+
|
16
|
+
if (!callback && (utils.getType(form) == "Function" || utils.getType(form) == "AsyncFunction")) {
|
17
|
+
callback = form;
|
18
|
+
form = {};
|
19
|
+
}
|
20
|
+
|
21
|
+
form = form || {};
|
22
|
+
|
23
|
+
callback = callback || function (err, data) {
|
24
|
+
if (err) return rejectFunc(err);
|
25
|
+
resolveFunc(data);
|
26
|
+
};
|
27
|
+
|
28
|
+
if (notAPI) {
|
29
|
+
utils
|
30
|
+
.post(url, ctx.jar, form, ctx.globalOptions)
|
31
|
+
.then(resData => callback(null, resData.body.toString()))
|
32
|
+
.catch(function (err) {
|
33
|
+
log.error("httpPost", err);
|
34
|
+
return callback(err);
|
35
|
+
});
|
36
|
+
}
|
37
|
+
else {
|
38
|
+
defaultFuncs
|
39
|
+
.post(url, ctx.jar, form, {})
|
40
|
+
.then(resData => callback(null, resData.body.toString()))
|
41
|
+
.catch(function (err) {
|
42
|
+
log.error("httpPost", err);
|
43
|
+
return callback(err);
|
44
|
+
});
|
45
|
+
}
|
46
|
+
return returnPromise;
|
47
|
+
};
|
48
|
+
};
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var utils = require("../utils");
|
4
|
+
var log = require("npmlog");
|
5
|
+
|
6
|
+
module.exports = function(defaultFuncs, api, ctx) {
|
7
|
+
return function httpPostFormData(url, form, callback) {
|
8
|
+
var resolveFunc = function(){};
|
9
|
+
var rejectFunc = function(){};
|
10
|
+
|
11
|
+
var returnPromise = new Promise(function (resolve, reject) {
|
12
|
+
resolveFunc = resolve;
|
13
|
+
rejectFunc = reject;
|
14
|
+
});
|
15
|
+
|
16
|
+
if (!callback && (utils.getType(form) == "Function" || utils.getType(form) == "AsyncFunction")) {
|
17
|
+
callback = form;
|
18
|
+
form = {};
|
19
|
+
}
|
20
|
+
|
21
|
+
form = form || {};
|
22
|
+
|
23
|
+
|
24
|
+
callback = callback || function(err, data) {
|
25
|
+
if (err) return rejectFunc(err);
|
26
|
+
resolveFunc(data);
|
27
|
+
};
|
28
|
+
|
29
|
+
defaultFuncs
|
30
|
+
.postFormData(url, ctx.jar, form)
|
31
|
+
.then(function(resData) {
|
32
|
+
callback(null, resData.body.toString());
|
33
|
+
})
|
34
|
+
.catch(function(err) {
|
35
|
+
log.error("httpPostFormData", err);
|
36
|
+
return callback(err);
|
37
|
+
});
|
38
|
+
|
39
|
+
return returnPromise;
|
40
|
+
};
|
41
|
+
};
|