fca-zoebakaaa 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.eslintrc.js +35 -0
- package/CHANGELOG.md +2 -0
- package/Controllers/Remote.js +4 -0
- package/DOCS.md +1738 -0
- package/Extra/ExtraAddons.js +80 -0
- package/Extra/ExtraFindUID.js +62 -0
- package/Extra/ExtraGetThread.js +118 -0
- package/Extra/ExtraTranslate.js +62 -0
- package/Extra/ExtraUptimeRobot.js +62 -0
- package/Extra/Html/Classic/script.js +233 -0
- package/Extra/Html/Classic/style.css +8 -0
- package/Extra/PM2/ecosystem.config.js +23 -0
- package/Extra/Security/Index.js +174 -0
- package/Extra/Security/Step_1.js +15 -0
- package/Extra/Security/Step_2.js +23 -0
- package/Extra/Security/Step_3.js +23 -0
- package/Extra/Src/History.js +117 -0
- package/Extra/Src/Last-Run.js +65 -0
- package/Extra/Src/Premium.js +88 -0
- package/Extra/Src/SecurityCheck.js +7 -0
- package/Extra/database/SyntheticDatabase.sqlite +0 -0
- package/Extra/database/index.js +360 -0
- package/Extra/logger.js +74 -0
- package/Func/AcceptAgreement.js +36 -0
- package/Func/ClearCache.js +68 -0
- package/Func/ReportV1.js +55 -0
- package/README.md +112 -0
- package/Settings/Database.js +21 -0
- package/Settings/Location.js +59 -0
- package/broadcast.js +40 -0
- package/index.js +1353 -0
- package/logger.js +75 -0
- package/package.json +56 -0
- package/src/Premium.js +39 -0
- package/src/addExternalModule.js +23 -0
- package/src/addUserToGroup.js +101 -0
- package/src/appstate.json +0 -0
- package/src/changeAdminStatus.js +95 -0
- package/src/changeArchivedStatus.js +47 -0
- package/src/changeAvt.js +95 -0
- package/src/changeBio.js +66 -0
- package/src/changeBlockedStatus.js +42 -0
- package/src/changeGroupImage.js +124 -0
- package/src/changeNickname.js +54 -0
- package/src/changeThreadColor.js +67 -0
- package/src/changeThreadEmoji.js +50 -0
- package/src/createNewGroup.js +78 -0
- package/src/createPoll.js +66 -0
- package/src/deleteMessage.js +51 -0
- package/src/deleteThread.js +49 -0
- package/src/forwardAttachment.js +53 -0
- package/src/getAccessToken.js +36 -0
- package/src/getCurrentUserID.js +8 -0
- package/src/getEmojiUrl.js +29 -0
- package/src/getFriendsList.js +81 -0
- package/src/getMessage.js +85 -0
- package/src/getThreadHistory.js +633 -0
- package/src/getThreadInfo.js +248 -0
- package/src/getThreadList.js +276 -0
- package/src/getThreadPictures.js +71 -0
- package/src/getUID.js +61 -0
- package/src/getUserID.js +62 -0
- package/src/getUserInfo.js +68 -0
- package/src/getUserInfoV2.js +32 -0
- package/src/getUserInfoV3.js +72 -0
- package/src/getUserInfoV4.js +57 -0
- package/src/getUserInfoV5.js +68 -0
- package/src/handleFriendRequest.js +47 -0
- package/src/handleMessageRequest.js +63 -0
- package/src/httpGet.js +54 -0
- package/src/httpPost.js +53 -0
- package/src/httpPostFormData.js +46 -0
- package/src/listenMqtt.js +1056 -0
- package/src/logout.js +73 -0
- package/src/markAsDelivered.js +54 -0
- package/src/markAsRead.js +82 -0
- package/src/markAsReadAll.js +47 -0
- package/src/markAsSeen.js +58 -0
- package/src/muteThread.js +51 -0
- package/src/removeUserFromGroup.js +72 -0
- package/src/resolvePhotoUrl.js +39 -0
- package/src/searchForThread.js +48 -0
- package/src/sendMessage.js +429 -0
- package/src/sendTypingIndicator.js +83 -0
- package/src/setMessageReaction.js +114 -0
- package/src/setPostReaction.js +103 -0
- package/src/setTitle.js +86 -0
- package/src/threadColors.js +40 -0
- package/src/toolspincoinmaster +89 -0
- package/src/unfriend.js +48 -0
- package/src/unsendMessage.js +40 -0
- package/utils.js +2244 -0
- package/zoebaka.code-workspace +8 -0
@@ -0,0 +1,81 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
//var cheerio = require("cheerio");
|
4
|
+
import { formatID, parseAndCheckLogin } from "../utils";
|
5
|
+
import { error as _error } from "npmlog";
|
6
|
+
|
7
|
+
// [almost] copy pasted from one of FB's minified file (GenderConst)
|
8
|
+
var GENDERS = {
|
9
|
+
0: "unknown",
|
10
|
+
1: "female_singular",
|
11
|
+
2: "male_singular",
|
12
|
+
3: "female_singular_guess",
|
13
|
+
4: "male_singular_guess",
|
14
|
+
5: "mixed",
|
15
|
+
6: "neuter_singular",
|
16
|
+
7: "unknown_singular",
|
17
|
+
8: "female_plural",
|
18
|
+
9: "male_plural",
|
19
|
+
10: "neuter_plural",
|
20
|
+
11: "unknown_plural",
|
21
|
+
};
|
22
|
+
|
23
|
+
function formatData(obj) {
|
24
|
+
return Object.keys(obj).map(function (key) {
|
25
|
+
var user = obj[key];
|
26
|
+
return {
|
27
|
+
alternateName: user.alternateName,
|
28
|
+
firstName: user.firstName,
|
29
|
+
gender: GENDERS[user.gender],
|
30
|
+
userID: formatID(user.id.toString()),
|
31
|
+
isFriend: user.is_friend != null && user.is_friend ? true : false,
|
32
|
+
fullName: user.name,
|
33
|
+
profilePicture: user.thumbSrc,
|
34
|
+
type: user.type,
|
35
|
+
profileUrl: user.uri,
|
36
|
+
vanity: user.vanity,
|
37
|
+
isBirthday: !!user.is_birthday,
|
38
|
+
};
|
39
|
+
});
|
40
|
+
}
|
41
|
+
|
42
|
+
export default function (defaultFuncs, api, ctx) {
|
43
|
+
return function getFriendsList(callback) {
|
44
|
+
var resolveFunc = function () {};
|
45
|
+
var rejectFunc = function () {};
|
46
|
+
var returnPromise = new Promise(function (resolve, reject) {
|
47
|
+
resolveFunc = resolve;
|
48
|
+
rejectFunc = reject;
|
49
|
+
});
|
50
|
+
|
51
|
+
if (!callback) {
|
52
|
+
callback = function (err, friendList) {
|
53
|
+
if (err) return rejectFunc(err);
|
54
|
+
resolveFunc(friendList);
|
55
|
+
};
|
56
|
+
}
|
57
|
+
|
58
|
+
defaultFuncs
|
59
|
+
.postFormData(
|
60
|
+
"https://www.facebook.com/chat/user_info_all",
|
61
|
+
ctx.jar,
|
62
|
+
{},
|
63
|
+
{ viewer: ctx.userID },
|
64
|
+
)
|
65
|
+
.then(parseAndCheckLogin(ctx, defaultFuncs))
|
66
|
+
.then(function (resData) {
|
67
|
+
if (!resData) throw { error: "getFriendsList returned empty object." };
|
68
|
+
if (resData.error) throw resData;
|
69
|
+
callback(null, formatData(resData.payload));
|
70
|
+
})
|
71
|
+
.catch(function (err) {
|
72
|
+
_error(
|
73
|
+
"getFriendsList",
|
74
|
+
"Lỗi getFriendsList Có Thể Do Bạn Spam Quá Nhiều ! Hãy Hạn Chế !",
|
75
|
+
);
|
76
|
+
return callback(err);
|
77
|
+
});
|
78
|
+
|
79
|
+
return returnPromise;
|
80
|
+
};
|
81
|
+
}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
2
|
+
/* eslint-disable linebreak-style */
|
3
|
+
"use strict";
|
4
|
+
|
5
|
+
import { parseAndCheckLogin, _formatAttachment } from "../utils";
|
6
|
+
import { error as _error } from "npmlog";
|
7
|
+
|
8
|
+
export default function (defaultFuncs, api, ctx) {
|
9
|
+
return function getMessage(threadID, messageID, callback) {
|
10
|
+
if (!callback) {
|
11
|
+
return callback({ error: "getMessage: need callback" });
|
12
|
+
}
|
13
|
+
|
14
|
+
if (!threadID || !messageID) {
|
15
|
+
return callback({ error: "getMessage: need threadID and messageID" });
|
16
|
+
}
|
17
|
+
|
18
|
+
const form = {
|
19
|
+
av: ctx.globalOptions.pageID,
|
20
|
+
queries: JSON.stringify({
|
21
|
+
o0: {
|
22
|
+
//This doc_id is valid as of ? (prob January 18, 2020)
|
23
|
+
doc_id: "1768656253222505",
|
24
|
+
query_params: {
|
25
|
+
thread_and_message_id: {
|
26
|
+
thread_id: threadID,
|
27
|
+
message_id: messageID,
|
28
|
+
},
|
29
|
+
},
|
30
|
+
},
|
31
|
+
}),
|
32
|
+
};
|
33
|
+
|
34
|
+
defaultFuncs
|
35
|
+
.post("https://www.facebook.com/api/graphqlbatch/", ctx.jar, form)
|
36
|
+
.then(parseAndCheckLogin(ctx, defaultFuncs))
|
37
|
+
.then((resData) => {
|
38
|
+
if (resData[resData.length - 1].error_results > 0) {
|
39
|
+
throw resData[0].o0.errors;
|
40
|
+
}
|
41
|
+
|
42
|
+
if (resData[resData.length - 1].successful_results === 0) {
|
43
|
+
throw {
|
44
|
+
error: "getMessage: there was no successful_results",
|
45
|
+
res: resData,
|
46
|
+
};
|
47
|
+
}
|
48
|
+
|
49
|
+
var fetchData = resData[0].o0.data.message;
|
50
|
+
if (fetchData) {
|
51
|
+
(!ctx.globalOptions.selfListen &&
|
52
|
+
fetchData.message_sender.id.toString() === ctx.userID) ||
|
53
|
+
!ctx.loggedIn
|
54
|
+
? undefined
|
55
|
+
: (function () {
|
56
|
+
callback(null, {
|
57
|
+
threadID: threadID,
|
58
|
+
messageID: fetchData.message_id,
|
59
|
+
senderID: fetchData.message_sender.id,
|
60
|
+
attachments: fetchData.blob_attachments.map((att) => {
|
61
|
+
var x;
|
62
|
+
try {
|
63
|
+
x = _formatAttachment(att);
|
64
|
+
} catch (ex) {
|
65
|
+
x = att;
|
66
|
+
x.error = ex;
|
67
|
+
x.type = "unknown";
|
68
|
+
}
|
69
|
+
return x;
|
70
|
+
}),
|
71
|
+
body: fetchData.message.text,
|
72
|
+
mentions: fetchData.message.ranges,
|
73
|
+
timestamp: fetchData.timestamp_precise,
|
74
|
+
messageReply: fetchData.replied_to_message,
|
75
|
+
raw: fetchData,
|
76
|
+
});
|
77
|
+
})();
|
78
|
+
}
|
79
|
+
})
|
80
|
+
.catch((err) => {
|
81
|
+
_error("getMessage", err);
|
82
|
+
callback(err);
|
83
|
+
});
|
84
|
+
};
|
85
|
+
}
|