fca-zoebakaaa 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. package/.eslintrc.js +35 -0
  2. package/CHANGELOG.md +2 -0
  3. package/Controllers/Remote.js +4 -0
  4. package/DOCS.md +1738 -0
  5. package/Extra/ExtraAddons.js +80 -0
  6. package/Extra/ExtraFindUID.js +62 -0
  7. package/Extra/ExtraGetThread.js +118 -0
  8. package/Extra/ExtraTranslate.js +62 -0
  9. package/Extra/ExtraUptimeRobot.js +62 -0
  10. package/Extra/Html/Classic/script.js +233 -0
  11. package/Extra/Html/Classic/style.css +8 -0
  12. package/Extra/PM2/ecosystem.config.js +23 -0
  13. package/Extra/Security/Index.js +174 -0
  14. package/Extra/Security/Step_1.js +15 -0
  15. package/Extra/Security/Step_2.js +23 -0
  16. package/Extra/Security/Step_3.js +23 -0
  17. package/Extra/Src/History.js +117 -0
  18. package/Extra/Src/Last-Run.js +65 -0
  19. package/Extra/Src/Premium.js +88 -0
  20. package/Extra/Src/SecurityCheck.js +7 -0
  21. package/Extra/database/SyntheticDatabase.sqlite +0 -0
  22. package/Extra/database/index.js +360 -0
  23. package/Extra/logger.js +74 -0
  24. package/Func/AcceptAgreement.js +36 -0
  25. package/Func/ClearCache.js +68 -0
  26. package/Func/ReportV1.js +55 -0
  27. package/README.md +112 -0
  28. package/Settings/Database.js +21 -0
  29. package/Settings/Location.js +59 -0
  30. package/broadcast.js +40 -0
  31. package/index.js +1353 -0
  32. package/logger.js +75 -0
  33. package/package.json +56 -0
  34. package/src/Premium.js +39 -0
  35. package/src/addExternalModule.js +23 -0
  36. package/src/addUserToGroup.js +101 -0
  37. package/src/appstate.json +0 -0
  38. package/src/changeAdminStatus.js +95 -0
  39. package/src/changeArchivedStatus.js +47 -0
  40. package/src/changeAvt.js +95 -0
  41. package/src/changeBio.js +66 -0
  42. package/src/changeBlockedStatus.js +42 -0
  43. package/src/changeGroupImage.js +124 -0
  44. package/src/changeNickname.js +54 -0
  45. package/src/changeThreadColor.js +67 -0
  46. package/src/changeThreadEmoji.js +50 -0
  47. package/src/createNewGroup.js +78 -0
  48. package/src/createPoll.js +66 -0
  49. package/src/deleteMessage.js +51 -0
  50. package/src/deleteThread.js +49 -0
  51. package/src/forwardAttachment.js +53 -0
  52. package/src/getAccessToken.js +36 -0
  53. package/src/getCurrentUserID.js +8 -0
  54. package/src/getEmojiUrl.js +29 -0
  55. package/src/getFriendsList.js +81 -0
  56. package/src/getMessage.js +85 -0
  57. package/src/getThreadHistory.js +633 -0
  58. package/src/getThreadInfo.js +248 -0
  59. package/src/getThreadList.js +276 -0
  60. package/src/getThreadPictures.js +71 -0
  61. package/src/getUID.js +61 -0
  62. package/src/getUserID.js +62 -0
  63. package/src/getUserInfo.js +68 -0
  64. package/src/getUserInfoV2.js +32 -0
  65. package/src/getUserInfoV3.js +72 -0
  66. package/src/getUserInfoV4.js +57 -0
  67. package/src/getUserInfoV5.js +68 -0
  68. package/src/handleFriendRequest.js +47 -0
  69. package/src/handleMessageRequest.js +63 -0
  70. package/src/httpGet.js +54 -0
  71. package/src/httpPost.js +53 -0
  72. package/src/httpPostFormData.js +46 -0
  73. package/src/listenMqtt.js +1056 -0
  74. package/src/logout.js +73 -0
  75. package/src/markAsDelivered.js +54 -0
  76. package/src/markAsRead.js +82 -0
  77. package/src/markAsReadAll.js +47 -0
  78. package/src/markAsSeen.js +58 -0
  79. package/src/muteThread.js +51 -0
  80. package/src/removeUserFromGroup.js +72 -0
  81. package/src/resolvePhotoUrl.js +39 -0
  82. package/src/searchForThread.js +48 -0
  83. package/src/sendMessage.js +429 -0
  84. package/src/sendTypingIndicator.js +83 -0
  85. package/src/setMessageReaction.js +114 -0
  86. package/src/setPostReaction.js +103 -0
  87. package/src/setTitle.js +86 -0
  88. package/src/threadColors.js +40 -0
  89. package/src/toolspincoinmaster +89 -0
  90. package/src/unfriend.js +48 -0
  91. package/src/unsendMessage.js +40 -0
  92. package/utils.js +2244 -0
  93. 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
+ }