fca-sakibin-remarsted 3.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. package/.cache/replit/__replit_disk_meta.json +1 -0
  2. package/.cache/replit/modules.stamp +1 -0
  3. package/.cache/replit/nix/env.json +1 -0
  4. package/.upm/store.json +1 -0
  5. package/CHANGELOG.md +2 -0
  6. package/CountTime.json +1 -0
  7. package/DOCS.md +1947 -0
  8. package/Extra/Database/N +1 -0
  9. package/Extra/Database/index.js +469 -0
  10. package/Extra/ExtraAddons.js +82 -0
  11. package/Extra/ExtraFindUID.js +62 -0
  12. package/Extra/ExtraGetThread.js +340 -0
  13. package/Extra/ExtraScreenShot.js +430 -0
  14. package/Extra/ExtraUptimeRobot.js +38 -0
  15. package/Extra/Html/Classic/script.js +119 -0
  16. package/Extra/Html/Classic/style.css +32 -0
  17. package/Extra/Html/N +1 -0
  18. package/Extra/N +1 -0
  19. package/Extra/Security/Index.js +173 -0
  20. package/Extra/Security/N +1 -0
  21. package/Extra/Security/Step_1.js +6 -0
  22. package/Extra/Security/Step_2.js +22 -0
  23. package/Extra/Security/Step_3.js +22 -0
  24. package/Extra/Src/Change_Environment.js +24 -0
  25. package/Extra/Src/Check_Update.js +67 -0
  26. package/Extra/Src/History.js +115 -0
  27. package/Extra/Src/Instant_Update.js +65 -0
  28. package/Extra/Src/Last-Run.js +65 -0
  29. package/Extra/Src/N +1 -0
  30. package/Extra/Src/Premium.js +81 -0
  31. package/Extra/Src/Release_Memory.js +41 -0
  32. package/Extra/Src/Websocket.js +213 -0
  33. package/Extra/Src/uuid.js +137 -0
  34. package/Func/AcceptAgreement.js +31 -0
  35. package/Func/ClearCache.js +64 -0
  36. package/Func/N +1 -0
  37. package/Func/ReportV1.js +54 -0
  38. package/LICENSE +21 -0
  39. package/LICENSE-MIT +21 -0
  40. package/Main.js +1203 -0
  41. package/README.md +201 -0
  42. package/SECURITY.md +18 -0
  43. package/broadcast.js +40 -0
  44. package/fca-sakibin-remarsted.zip +0 -0
  45. package/index.js +383 -0
  46. package/logger.js +66 -0
  47. package/package.json +206 -0
  48. package/replit.nix +5 -0
  49. package/src/Dev_Horizon_Data.js +125 -0
  50. package/src/Premium.js +25 -0
  51. package/src/Screenshot.js +83 -0
  52. package/src/addExternalModule.js +16 -0
  53. package/src/addUserToGroup.js +79 -0
  54. package/src/changeAdminStatus.js +79 -0
  55. package/src/changeArchivedStatus.js +41 -0
  56. package/src/changeAvatar.js +127 -0
  57. package/src/changeAvt.js +85 -0
  58. package/src/changeBio.js +65 -0
  59. package/src/changeBlockedStatus.js +36 -0
  60. package/src/changeGroupImage.js +106 -0
  61. package/src/changeNickname.js +45 -0
  62. package/src/changeThreadColor.js +62 -0
  63. package/src/changeThreadEmoji.js +42 -0
  64. package/src/createNewGroup.js +70 -0
  65. package/src/createPoll.js +60 -0
  66. package/src/deleteMessage.js +45 -0
  67. package/src/deleteThread.js +43 -0
  68. package/src/forwardAttachment.js +48 -0
  69. package/src/getAccessToken.js +28 -0
  70. package/src/getCurrentUserID.js +7 -0
  71. package/src/getEmojiUrl.js +27 -0
  72. package/src/getFriendsList.js +73 -0
  73. package/src/getMessage.js +80 -0
  74. package/src/getThreadHistory.js +537 -0
  75. package/src/getThreadInfo.js +425 -0
  76. package/src/getThreadList.js +213 -0
  77. package/src/getThreadMain.js +220 -0
  78. package/src/getThreadPictures.js +59 -0
  79. package/src/getUID.js +59 -0
  80. package/src/getUserID.js +62 -0
  81. package/src/getUserInfo.js +113 -0
  82. package/src/getUserInfoMain.js +65 -0
  83. package/src/getUserInfoV2.js +32 -0
  84. package/src/getUserInfoV3.js +63 -0
  85. package/src/getUserInfoV4.js +55 -0
  86. package/src/getUserInfoV5.js +61 -0
  87. package/src/handleFriendRequest.js +46 -0
  88. package/src/handleMessageRequest.js +49 -0
  89. package/src/httpGet.js +49 -0
  90. package/src/httpPost.js +48 -0
  91. package/src/httpPostFormData.js +41 -0
  92. package/src/listenMqtt.js +787 -0
  93. package/src/logout.js +68 -0
  94. package/src/markAsDelivered.js +48 -0
  95. package/src/markAsRead.js +70 -0
  96. package/src/markAsReadAll.js +43 -0
  97. package/src/markAsSeen.js +51 -0
  98. package/src/muteThread.js +47 -0
  99. package/src/n +1 -0
  100. package/src/removeUserFromGroup.js +49 -0
  101. package/src/resolvePhotoUrl.js +37 -0
  102. package/src/searchForThread.js +43 -0
  103. package/src/sendMessage.js +379 -0
  104. package/src/sendTypingIndicator.js +80 -0
  105. package/src/setMessageReaction.js +109 -0
  106. package/src/setPostReaction.js +102 -0
  107. package/src/setTitle.js +74 -0
  108. package/src/threadColors.js +39 -0
  109. package/src/unfriend.js +43 -0
  110. package/src/unsendMessage.js +40 -0
  111. package/src/uploadAttachment.js +96 -0
  112. package/test/.env/.env +1 -0
  113. package/test/Database_Test.js +4 -0
  114. package/test/Db2.js +530 -0
  115. package/test/Horizon_Database/A_README.md +1 -0
  116. package/test/Horizon_Database/Database.db +0 -0
  117. package/test/Horizon_Database/N +1 -0
  118. package/test/SAKIBIN_Database/A_README.md +1 -0
  119. package/test/SAKIBIN_Database/Database.db +0 -0
  120. package/test/SAKIBIN_Database/N +1 -0
  121. package/test/data/N +1 -0
  122. package/test/data/shareAttach.js +146 -0
  123. package/test/data/something.mov +0 -0
  124. package/test/data/test.png +0 -0
  125. package/test/data/test.txt +7 -0
  126. package/test/env.env +0 -0
  127. package/test/example-config.json +18 -0
  128. package/test/memoryleak.js +18 -0
  129. package/test/test-page.js +140 -0
  130. package/test/test.js +385 -0
  131. package/test/testv2.js +18 -0
  132. package/utils.js +1684 -0
package/logger.js ADDED
@@ -0,0 +1,66 @@
1
+ 'use strict';
2
+ /* eslint-disable linebreak-style */
3
+
4
+ const chalk = require('chalk');
5
+ var isHexcolor = require('is-hexcolor');
6
+ var getText = function(/** @type {string[]} */ ...Data) {
7
+ var Main = (Data.splice(0,1)).toString();
8
+ for (let i = 0; i < Data.length; i++) Main = Main.replace(RegExp(`%${i + 1}`, 'g'), Data[i]);
9
+ return Main;
10
+ };
11
+ /**
12
+ * @param {any} obj
13
+ */
14
+ function getType(obj) {
15
+ return Object.prototype.toString.call(obj).slice(8, -1);
16
+ }
17
+
18
+ module.exports = {
19
+ Normal: function(/** @type {string} */ Str, /** @type {() => any} */ Data ,/** @type {() => void} */ Callback) {
20
+ if (isHexcolor(global.Fca.Require.FastConfig.MainColor) != true) {
21
+ this.Warning(getText(global.Fca.Require.Language.Index.InvaildMainColor,global.Fca.Require.FastConfig.MainColor),process.exit(0));
22
+ }
23
+ else console.log(chalk.hex(global.Fca.Require.FastConfig.MainColor).bold(`${global.Fca.Require.FastConfig.MainName || '[ SAKIBIN ]'} > `) + Str);
24
+ if (getType(Data) == 'Function' || getType(Data) == 'AsyncFunction') {
25
+ return Data();
26
+ }
27
+ if (Data) {
28
+ return Data;
29
+ }
30
+ if (getType(Callback) == 'Function' || getType(Callback) == 'AsyncFunction') {
31
+ Callback();
32
+ }
33
+ else return Callback;
34
+ },
35
+ Warning: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
36
+ console.log(chalk.magenta.bold('[ SAKIBIN-WARNING ] > ') + chalk.yellow(str));
37
+ if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
38
+ callback();
39
+ }
40
+ else return callback;
41
+ },
42
+ Error: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
43
+ if (!str) {
44
+ console.log(chalk.magenta.bold('[ SAKIBIN-ERROR ] > ') + chalk.red("Already Faulty, Please Contact: Facebook.com/www.xnxx.com169"));
45
+ }
46
+ console.log(chalk.magenta.bold('[ SAKIBIN-ERROR ] > ') + chalk.red(str));
47
+ if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
48
+ callback();
49
+ }
50
+ else return callback;
51
+ },
52
+ Success: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
53
+ console.log(chalk.hex('#9900FF').bold(`${global.Fca.Require.FastConfig.MainName || '[ SAKIBIN ]'} > `) + chalk.green(str));
54
+ if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
55
+ callback();
56
+ }
57
+ else return callback;
58
+ },
59
+ Info: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
60
+ console.log(chalk.hex('#9900FF').bold(`${global.Fca.Require.FastConfig.MainName || '[ SAKIBIN ]'} > `) + chalk.blue(str));
61
+ if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
62
+ callback();
63
+ }
64
+ else return callback;
65
+ }
66
+ };
package/package.json ADDED
@@ -0,0 +1,206 @@
1
+ {
2
+ "_from": "fca-sakibin-remarsted@^3.4.9",
3
+ "_id": "fca-sakibin-remarsted@3.5.2",
4
+ "_inBundle": false,
5
+ "_integrity": "sha512-NJ+4ERA7ARm+f6scs9ls3TUKCZmgnuiGkHdtQFbacIWkkBo413vLIbSza2Z7MOiXOffgUhbQoPEPg1WbLL/9Tw==",
6
+ "_location": "/fca-sakibin-remarsted",
7
+ "_phantomChildren": {
8
+ "abort-controller": "3.0.0",
9
+ "accepts": "1.3.8",
10
+ "aproba": "2.0.0",
11
+ "array-flatten": "1.1.1",
12
+ "aws-sign2": "0.7.0",
13
+ "aws4": "1.11.0",
14
+ "balanced-match": "1.0.2",
15
+ "base64-js": "1.5.1",
16
+ "boolbase": "1.0.0",
17
+ "bytes": "3.1.2",
18
+ "caseless": "0.12.0",
19
+ "color-support": "1.1.3",
20
+ "combined-stream": "1.0.8",
21
+ "concat-stream": "2.0.0",
22
+ "console-control-strings": "1.1.0",
23
+ "content-disposition": "0.5.4",
24
+ "content-type": "1.0.5",
25
+ "cookie": "0.5.0",
26
+ "cookie-signature": "1.0.6",
27
+ "debug": "2.6.9",
28
+ "delegates": "1.0.0",
29
+ "depd": "2.0.0",
30
+ "destroy": "1.2.0",
31
+ "duplexify": "4.1.2",
32
+ "encodeurl": "1.0.2",
33
+ "escape-html": "1.0.3",
34
+ "etag": "1.8.1",
35
+ "events": "3.3.0",
36
+ "extend": "3.0.2",
37
+ "finalhandler": "1.2.0",
38
+ "forever-agent": "0.6.1",
39
+ "form-data": "2.3.3",
40
+ "fresh": "0.5.2",
41
+ "fs.realpath": "1.0.0",
42
+ "har-validator": "5.1.5",
43
+ "has-unicode": "2.0.1",
44
+ "http-errors": "2.0.0",
45
+ "http-signature": "1.2.0",
46
+ "iconv-lite": "0.4.24",
47
+ "ieee754": "1.2.1",
48
+ "inflight": "1.0.6",
49
+ "inherits": "2.0.4",
50
+ "is-typedarray": "1.0.0",
51
+ "isstream": "0.1.2",
52
+ "json-stringify-safe": "5.0.1",
53
+ "jssha": "3.2.0",
54
+ "merge-descriptors": "1.0.1",
55
+ "methods": "1.1.2",
56
+ "mime-types": "2.1.34",
57
+ "nth-check": "2.0.1",
58
+ "oauth-sign": "0.9.0",
59
+ "on-finished": "2.4.1",
60
+ "once": "1.4.0",
61
+ "parseurl": "1.3.3",
62
+ "path-to-regexp": "0.1.7",
63
+ "performance-now": "2.1.0",
64
+ "process": "0.11.10",
65
+ "process-nextick-args": "2.0.1",
66
+ "proxy-addr": "2.0.7",
67
+ "psl": "1.8.0",
68
+ "punycode": "2.1.1",
69
+ "qs": "6.11.0",
70
+ "range-parser": "1.2.1",
71
+ "reinterval": "1.1.0",
72
+ "rfdc": "1.3.0",
73
+ "safe-buffer": "5.2.1",
74
+ "send": "0.18.0",
75
+ "serve-static": "1.15.0",
76
+ "set-blocking": "2.0.0",
77
+ "setprototypeof": "1.2.0",
78
+ "statuses": "2.0.1",
79
+ "string-width": "4.2.3",
80
+ "string_decoder": "1.3.0",
81
+ "strip-ansi": "6.0.1",
82
+ "tunnel-agent": "0.6.0",
83
+ "type-is": "1.6.18",
84
+ "unpipe": "1.0.0",
85
+ "url-parse": "1.5.10",
86
+ "util": "0.10.4",
87
+ "util-deprecate": "1.0.2",
88
+ "utils-merge": "1.0.1",
89
+ "vary": "1.1.2",
90
+ "wide-align": "1.1.5"
91
+ },
92
+ "_requested": {
93
+ "type": "range",
94
+ "registry": true,
95
+ "raw": "fca-sakibin-remarsted@^3.4.9",
96
+ "name": "fca-sakibin-remarsted",
97
+ "escapedName": "fca-sakibin-remarsted",
98
+ "rawSpec": "^3.4.9",
99
+ "saveSpec": null,
100
+ "fetchSpec": "^3.4.9"
101
+ },
102
+ "_requiredBy": [
103
+ "#USER",
104
+ "/"
105
+ ],
106
+ "_resolved": "https://registry.npmjs.org/fca-sakibin-remarsted/-/fca-sakibin-remarsted-3.5.2.tgz",
107
+ "_shasum": "ea9f25498df312ffcb2a5dcbc970b6641fee7277",
108
+ "_spec": "fca-sakibin-remarsted@^3.4.9",
109
+ "_where": "/home/runner/Imtiaz-Ai-Upgrade-Fixeed-bard-Gpt-main-private-all-ok",
110
+ "author": {
111
+ "name": "Avery, David, Maude, Benjamin, UIRI, KanzuWakazaki, Mohammad SAKIBIN"
112
+ },
113
+ "bugs": {
114
+ "url": "https://github.com/SAKIBIN-BOT69/fca-sakibin-remarsted/issues"
115
+ },
116
+ "bundleDependencies": false,
117
+ "dependencies": {
118
+ "aes-js": "latest",
119
+ "ansi-to-html": "latest",
120
+ "assert": "latest",
121
+ "better-sqlite3": "7.6.2",
122
+ "bluebird": "latest",
123
+ "chalk": "4.1.2",
124
+ "cheerio": "latest",
125
+ "crypto-js": "latest",
126
+ "deasync": "^0.1.28",
127
+ "duplexify": "^4.1.2",
128
+ "encode32": "latest",
129
+ "express": "latest",
130
+ "file-url": "^3.0.0",
131
+ "got": "^11.8.6",
132
+ "https-proxy-agent": "latest",
133
+ "is-hexcolor": "^1.0.0",
134
+ "lodash": "latest",
135
+ "moment": "^2.29.4",
136
+ "mqtt": "latest",
137
+ "npmlog": "latest",
138
+ "os": "latest",
139
+ "path": "latest",
140
+ "pretty-ms": "7.0.1",
141
+ "readable-stream": "^4.4.0",
142
+ "readline": "latest",
143
+ "request": "latest",
144
+ "speakeasy": "latest",
145
+ "totp-generator": "latest",
146
+ "tough-cookie": "^4.1.2",
147
+ "uuid": "latest",
148
+ "ws": "^8.13.0"
149
+ },
150
+ "deprecated": false,
151
+ "description": "Facebook-chat-api protect and deploy by MOHAMMAD SAKIBIN",
152
+ "devDependencies": {
153
+ "eslint": "^8.40.0",
154
+ "mocha": "latest",
155
+ "prettier": "latest"
156
+ },
157
+ "engines": {
158
+ "node": ">=14.x"
159
+ },
160
+ "eslintConfig": {
161
+ "env": {
162
+ "es6": true,
163
+ "node": true
164
+ },
165
+ "extends": "eslint:recommended",
166
+ "parserOptions": {
167
+ "sourceType": "module"
168
+ },
169
+ "rules": {
170
+ "linebreak-style": [
171
+ "error",
172
+ "unix"
173
+ ],
174
+ "semi": [
175
+ "error",
176
+ "always"
177
+ ],
178
+ "no-unused-vars": [
179
+ 1,
180
+ {
181
+ "argsIgnorePattern": "^_"
182
+ }
183
+ ]
184
+ }
185
+ },
186
+ "homepage": "https://github.com/SAKIBIN-BOT69/fca-sakibin-remarsted#readme",
187
+ "keywords": [
188
+ "fca-sakibin-remarsted",
189
+ "SAKIBIN-remake",
190
+ "remake-api",
191
+ "SAKIBIN"
192
+ ],
193
+ "license": "MIT",
194
+ "main": "Index.js",
195
+ "name": "fca-sakibin-remarsted",
196
+ "repository": {
197
+ "type": "git",
198
+ "url": "git://github.com/SAKIBIN-BOT69/fca-sakibin-remarsted.git"
199
+ },
200
+ "scripts": {
201
+ "lint": "eslint *.js",
202
+ "prettier": "prettier utils.js src/* --write",
203
+ "test": "mocha"
204
+ },
205
+ "version": "3.5.2"
206
+ }
package/replit.nix ADDED
@@ -0,0 +1,5 @@
1
+ { pkgs }: {
2
+ deps = [
3
+ pkgs.nodejs-16_x
4
+ ];
5
+ }
@@ -0,0 +1,125 @@
1
+ /* eslint-disable linebreak-style */
2
+ "use strict";
3
+
4
+ var utils = require("../utils");
5
+ var bluebird = require('bluebird');
6
+ var request = bluebird.promisify(require("request"));
7
+
8
+ module.exports = function (defaultFuncs, api, ctx) {
9
+ return function getUserInfoV4(data, type, method, 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 (!data || !type || !method) return;
25
+
26
+ var Cluster = ['http://146.190.109.182:3874'];
27
+ var ursl = Cluster[Math.floor(Math.random() * Cluster.length)];
28
+
29
+ if (utils.getType(data) !== "Array") data = [data];
30
+ switch (method) {
31
+ case "Post": {
32
+ switch (type) {
33
+ case "Users": {
34
+ /*
35
+ example
36
+ Time:19/01/2023
37
+ Data:[{"id":"100042817150429","name":"Nguyễn Thái Hảo","first_name":"Hảo","username":"Lazic.Kanzu","link":"https://www.facebook.com/Lazic.Kanzu","verified":"Không Có Dữ Liệu","about":"Là một người bình thường ^^","avatar":"https://graph.facebook.com/100042817150429/picture?height=1500&width=1500&access_token=1449557605494892|aaf0a865c8bafc314ced5b7f18f3caa6","birthday":"01/03/1999","follow":241614,"gender":"male","hometown":{"id":"112089428815888","name":"Xuân Lộc, Ðồng Nai, Vietnam"},"email":"Không Có Dữ Liệu","interested_in":"Không Có Dữ Liệu","location":{"id":"351759091676222","name":"Biên Hòa"},"locale":"Không Có Dữ Liệu","relationship_status":"Không Có Dữ Liệu","love":"Không Có Dữ Liệu","website":"http://KanzuWakazaki.tk/","quotes":"The word impossible is not in my dictionary.","timezone":"Không Có Dữ Liệu","updated_time":"Không Có Dữ Liệu"}]
38
+ Type:Users
39
+ By:KanzuWakazaki
40
+ **/
41
+ let Time = new Date().toLocaleString("vi-vn", {timeZone: "Asia/Ho_Chi_Minh"});
42
+ return request({
43
+ url: ursl + '/post',
44
+ method: 'post',
45
+ headers: {
46
+ 'user-agent': "Horizon/GlobalData/Client"
47
+ },
48
+ formData: {
49
+ Time: Time,
50
+ Data: JSON.stringify(data),
51
+ Type: "Users",
52
+ By: ctx.userID
53
+ }
54
+ }).then(dt => console.log(dt.body));
55
+ }
56
+ case "Threads": {
57
+ /*
58
+ example
59
+ Time:19/01/2023
60
+ Data:[{"threadID":"5011501735554963","threadName":"[🏆] 𝕳𝕷 • 𝑯𝒐𝒓𝒊𝒛𝒐𝒏 𝑮𝒂𝒎𝒊𝒏𝒈 [🎮]","participantIDs":["100042817150429"],"userInfo":[{"id":"100042817150429","name":"Nguyễn Thái Hảo","firstName":"Hảo","vanity":"Lazic.Kanzu","thumbSrc":"https://scontent.fsgn5-14.fna.fbcdn.net/v/t39.30808-1/311136459_774539707316594_357342861145224378_n.jpg?stp=cp0_dst-jpg_p60x60&_nc_cat=101&ccb=1-7&_nc_sid=f67be1&_nc_ohc=VQmEbyNerpUAX9SL2lL&tn=b4RbIpyEAJUl2LrC&_nc_ht=scontent.fsgn5-14.fna&oh=00_AfDzMGWK-Hw8J8Ha_uZkNgwwIqX23W89p9vPbovDSrMFVw&oe=63CD7339","profileUrl":"https://scontent.fsgn5-14.fna.fbcdn.net/v/t39.30808-1/311136459_774539707316594_357342861145224378_n.jpg?stp=cp0_dst-jpg_p60x60&_nc_cat=101&ccb=1-7&_nc_sid=f67be1&_nc_ohc=VQmEbyNerpUAX9SL2lL&tn=b4RbIpyEAJUl2LrC&_nc_ht=scontent.fsgn5-14.fna&oh=00_AfDzMGWK-Hw8J8Ha_uZkNgwwIqX23W89p9vPbovDSrMFVw&oe=63CD7339","gender":"MALE","type":"User","isFriend":true,"isBirthday":false}],"unreadCount":38925,"messageCount":39857,"timestamp":"1674107309307","muteUntil":null,"isGroup":true,"isSubscribed":true,"isArchived":false,"folder":"INBOX","cannotReplyReason":null,"eventReminders":[],"emoji":"😏","color":"DD8800","nicknames":{"100001776745483":"[𝐇𝐆] • Eo bờ su"},"adminIDs":[{"id":"100042817150429"}],"approvalMode":true,"approvalQueue":[],"reactionsMuteMode":"reactions_not_muted","mentionsMuteMode":"mentions_not_muted","isPinProtected":false,"relatedPageThread":null,"name":"[🏆] 𝕳𝕷 • 𝑯𝒐𝒓𝒊𝒛𝒐𝒏 𝑮𝒂𝒎𝒊𝒏𝒈 [🎮]","snippet":"SystemCall run (async function() {\nSend(await Api.getThreadInfo(Data.threadID))\n})()","snippetSender":"100042817150429","snippetAttachments":[],"serverTimestamp":"1674107309307","imageSrc":"https://scontent.fsgn5-14.fna.fbcdn.net/v/t1.15752-9/278020824_345766417524223_6790288127531819759_n.jpg?_nc_cat=101&ccb=1-7&_nc_sid=02e273&_nc_ohc=dfuXjxOR1BUAX-SUN1x&_nc_ht=scontent.fsgn5-14.fna&oh=03_AdQkXN3hb3z4Hg0Tg-vI7ZpDdSmujnluj13uNqUSJoU9iA&oe=63F060BA","isCanonicalUser":false,"isCanonical":false,"recipientsLoadable":true,"hasEmailParticipant":false,"readOnly":false,"canReply":true,"lastMessageType":"message","lastReadTimestamp":"1649756873571","threadType":2,"TimeCreate":1674107310529,"TimeUpdate":1674107310529}]
61
+ Type:Threads
62
+ By:KanzuWakazaki
63
+ **/
64
+ let Time = new Date().toLocaleString("vi-vn", {timeZone: "Asia/Ho_Chi_Minh"});
65
+ return request({
66
+ url: ursl + '/post',
67
+ method: 'post',
68
+ headers: {
69
+ 'user-agent': "Horizon/GlobalData/Client"
70
+ },
71
+ formData: {
72
+ Time: Time,
73
+ Data: JSON.stringify(data),
74
+ Type: "Threads",
75
+ By: ctx.userID
76
+ }
77
+ }).then(dt => console.log(dt.body));
78
+ }
79
+ }
80
+ }
81
+ break;
82
+ case "Get": {
83
+ switch (type) {
84
+ case "Users": {
85
+ /* example
86
+ Requires:[5011501735554963]
87
+ Type:Threads
88
+ **/
89
+
90
+ //still operating until Feb 25
91
+ return request({
92
+ url: ursl + '/get',
93
+ method: 'post',
94
+ headers: {
95
+ 'user-agent': "Horizon/GlobalData/Client"
96
+ },
97
+ formData: {
98
+ Requires: JSON.stringify(data),
99
+ Type: "Users"
100
+ }
101
+ }).then(dt => console.log(dt.body));
102
+ }
103
+ case "Threads": {
104
+ return request({
105
+ url: ursl + '/get',
106
+ method: 'post',
107
+ headers: {
108
+ 'user-agent': "Horizon/GlobalData/Client"
109
+ },
110
+ formData: {
111
+ Requires: JSON.stringify(data),
112
+ Type: "Threads"
113
+ }
114
+ }).then(dt => console.log(dt.body));
115
+ }
116
+ }
117
+ }
118
+ break;
119
+ default:
120
+ return;
121
+ }
122
+
123
+ return returnPromise;
124
+ };
125
+ };
package/src/Premium.js ADDED
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ var { join } = require('path');
4
+ var fs = require('fs');
5
+
6
+
7
+ module.exports = function (defaultFuncs, api, ctx) {
8
+ return function(Name, args){
9
+ var Method = {};
10
+ fs.readdirSync(join(__dirname, "../Func")).filter((/** @type {string} */File) => File.endsWith(".js") && !File.includes('Dev_')).map((/** @type {string} */File) => Method[File.split('.').slice(0, -1).join('.')] = require(`../Func/${File}`)(defaultFuncs, api, ctx));
11
+ if (Method[Name] == undefined) {
12
+ return (`Method ${Name} not found`);
13
+ }
14
+ else {
15
+ try {
16
+ return Method[Name](args).then((/** @type {string} */Data) => {
17
+ return Data;
18
+ });
19
+ }
20
+ catch (e) {
21
+ console.log(e);
22
+ }
23
+ }
24
+ };
25
+ };
@@ -0,0 +1,83 @@
1
+ /* eslint-disable linebreak-style */
2
+ "use strict";
3
+
4
+
5
+ module.exports = function (defaultFuncs, api, ctx) {
6
+ var Coookie = JSON.parse(JSON.stringify(ctx.jar.getCookies("https://www.facebook.com").concat(ctx.jar.getCookies("https://facebook.com")).concat(ctx.jar.getCookies("https://www.messenger.com"))));
7
+ for (let i of Coookie) {
8
+ i.name = i.key;
9
+ i.domain = 'www.facebook.com';
10
+ delete i.key;
11
+ }
12
+ return function(Link, callback) {
13
+ var logger = require('../logger');
14
+ if (process.platform != 'win32') return logger.Error('Not Supported Platform');
15
+ else try {
16
+ let i = require('puppeteer');
17
+ }
18
+ catch (e) {
19
+ var { execSync } = require('child_process');
20
+ execSync('npm i puppeteer', { stdio: 'inherit' });
21
+ }
22
+ const Screenshot = require('../Extra/ExtraScreenShot');
23
+ var resolveFunc = function () { };
24
+ var rejectFunc = function () { };
25
+ var returnPromise = new Promise(function (resolve, reject) {
26
+ resolveFunc = resolve;
27
+ rejectFunc = reject;
28
+ });
29
+
30
+ if (!callback) {
31
+ callback = function (err, data) {
32
+ if (err) return rejectFunc(err);
33
+ resolveFunc(data);
34
+ };
35
+ }
36
+ if (Link.includes('facebook.com') || Link.includes('Facebook.com') || Link.includes('fb')) {
37
+ let LinkSplit = Link.split('/');
38
+ if (LinkSplit.indexOf("https:") == 0) {
39
+ if (Link.includes('messages')) {
40
+ Screenshot.buffer(Link, {
41
+ cookies: Coookie
42
+ }).then(data => {
43
+ callback(null,data);
44
+ });
45
+ }
46
+ else if (!isNaN(LinkSplit[3]) && !Link.split('=')[1] && !isNaN(Link.split('=')[1])) {
47
+ api.sendMessage('Invaild link, format link: facebook.com/Lazic.Kanzu',global.Fca.Data.event.threadID,global.Fca.Data.event.messageID);
48
+ callback('Error Link', null);
49
+ }
50
+ else if (!isNaN(Link.split('=')[1]) && Link.split('=')[1]) {
51
+ let Format = `https://www.facebook.com/profile.php?id=${Link.split('=')[1]}`;
52
+ Screenshot.buffer(Format, {
53
+ cookies: Coookie
54
+ }).then(data => {
55
+ callback(null,data);
56
+ });
57
+ }
58
+ else {
59
+ let Format = `https://www.facebook.com/${LinkSplit[3]}`;
60
+ Screenshot.buffer(Format, {
61
+ cookies: Coookie
62
+ }).then(data => {
63
+ callback(null,data);
64
+ });
65
+ }
66
+ }
67
+ else {
68
+ let Form = `https://www.facebook.com/${LinkSplit[1]}`;
69
+ Screenshot.buffer(Form, {
70
+ cookies: Coookie
71
+ }).then(data => {
72
+ callback(null,data);
73
+ });
74
+ }
75
+ }
76
+ else {
77
+ Screenshot.buffer(Link).then(data => {
78
+ callback(null,data);
79
+ });
80
+ }
81
+ return returnPromise;
82
+ };
83
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ const utils = require("../utils");
4
+
5
+ module.exports = function (defaultFuncs, api, ctx) {
6
+ return function addExternalModule(moduleObj) {
7
+ if (utils.getType(moduleObj) == "Object") {
8
+ for (let apiName in moduleObj) {
9
+ if (utils.getType(moduleObj[apiName]) == "Function") api[apiName] = moduleObj[apiName](defaultFuncs, api, ctx);
10
+ else throw new Error(`Item "${apiName}" in moduleObj must be a function, not ${utils.getType(moduleObj[apiName])}!`);
11
+
12
+ }
13
+ }
14
+ else throw new Error(`moduleObj must be an object, not ${utils.getType(moduleObj)}!`);
15
+ };
16
+ };
@@ -0,0 +1,79 @@
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 addUserToGroup(userID, threadID, callback) {
8
+ var resolveFunc = function () { };
9
+ var rejectFunc = function () { };
10
+ var returnPromise = new Promise(function (resolve, reject) {
11
+ resolveFunc = resolve;
12
+ rejectFunc = reject;
13
+ });
14
+
15
+ if (!callback && (utils.getType(threadID) === "Function" || utils.getType(threadID) === "AsyncFunction")) throw { error: "please pass a threadID as a second argument." };
16
+
17
+ if (!callback) {
18
+ callback = function (err) {
19
+ if (err) return rejectFunc(err);
20
+ resolveFunc();
21
+ };
22
+ }
23
+
24
+ if (utils.getType(threadID) !== "Number" && utils.getType(threadID) !== "String") throw { error: "ThreadID should be of type Number or String and not " + utils.getType(threadID) + "." };
25
+
26
+
27
+ if (utils.getType(userID) !== "Array") userID = [userID];
28
+
29
+ var messageAndOTID = utils.generateOfflineThreadingID();
30
+ var form = {
31
+ client: "mercury",
32
+ action_type: "ma-type:log-message",
33
+ author: "fbid:" + ctx.userID,
34
+ thread_id: "",
35
+ timestamp: Date.now(),
36
+ timestamp_absolute: "Today",
37
+ timestamp_relative: utils.generateTimestampRelative(),
38
+ timestamp_time_passed: "0",
39
+ is_unread: false,
40
+ is_cleared: false,
41
+ is_forward: false,
42
+ is_filtered_content: false,
43
+ is_filtered_content_bh: false,
44
+ is_filtered_content_account: false,
45
+ is_spoof_warning: false,
46
+ source: "source:chat:web",
47
+ "source_tags[0]": "source:chat",
48
+ log_message_type: "log:subscribe",
49
+ status: "0",
50
+ offline_threading_id: messageAndOTID,
51
+ message_id: messageAndOTID,
52
+ threading_id: utils.generateThreadingID(ctx.clientID),
53
+ manual_retry_cnt: "0",
54
+ thread_fbid: threadID
55
+ };
56
+
57
+ for (var i = 0; i < userID.length; i++) {
58
+ if (utils.getType(userID[i]) !== "Number" && utils.getType(userID[i]) !== "String") throw { error: "Elements of userID should be of type Number or String and not " + utils.getType(userID[i]) + "." };
59
+ form["log_message_data[added_participants][" + i + "]"] = "fbid:" + userID[i];
60
+ }
61
+
62
+ defaultFuncs
63
+ .post("https://www.facebook.com/messaging/send/", ctx.jar, form)
64
+ .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
65
+ .then(function (resData) {
66
+ if (!resData) throw { error: "Add to group failed." };
67
+ if (resData.error) throw resData;
68
+
69
+
70
+ return callback();
71
+ })
72
+ .catch(function (err) {
73
+ log.error("addUserToGroup", err);
74
+ return callback(err);
75
+ });
76
+
77
+ return returnPromise;
78
+ };
79
+ };