fca-project-orion 1.1.2 → 1.1.4

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.
Files changed (108) hide show
  1. package/.gitattributes +2 -2
  2. package/Extra/Database/index.js +468 -468
  3. package/Extra/ExtraAddons.js +81 -81
  4. package/Extra/ExtraFindUID.js +61 -61
  5. package/Extra/ExtraGetThread.js +339 -339
  6. package/Extra/ExtraScreenShot.js +430 -430
  7. package/Extra/ExtraUptimeRobot.js +37 -37
  8. package/Extra/Html/Classic/script.js +118 -118
  9. package/Extra/Html/Classic/style.css +7 -7
  10. package/Extra/Security/Base/Step_1.js +5 -5
  11. package/Extra/Security/Base/Step_2.js +22 -22
  12. package/Extra/Security/Base/Step_3.js +22 -22
  13. package/Extra/Security/Base/index.js +172 -172
  14. package/Extra/Security/Index.js +4 -4
  15. package/Extra/Security/Step_1.js +5 -5
  16. package/Extra/Security/Step_2.js +22 -22
  17. package/Extra/Security/Step_3.js +22 -22
  18. package/Extra/Src/Change_Environment.js +23 -23
  19. package/Extra/Src/Check_Update.js +65 -65
  20. package/Extra/Src/History.js +114 -114
  21. package/Extra/Src/Instant_Update.js +64 -64
  22. package/Extra/Src/Last-Run.js +64 -64
  23. package/Extra/Src/Premium.js +80 -80
  24. package/Extra/Src/Release_Memory.js +40 -40
  25. package/Extra/Src/Websocket.js +212 -212
  26. package/Extra/Src/uuid.js +137 -137
  27. package/Func/AcceptAgreement.js +31 -31
  28. package/Func/ClearCache.js +64 -64
  29. package/Func/ReportV1.js +54 -54
  30. package/LICENSE +21 -21
  31. package/Language/index.json +216 -216
  32. package/Main.js +1215 -1215
  33. package/README.md +138 -138
  34. package/SECURITY.md +18 -18
  35. package/broadcast.js +39 -39
  36. package/index.js +385 -385
  37. package/logger.js +66 -66
  38. package/package.json +93 -93
  39. package/src/Dev_Horizon_Data.js +124 -124
  40. package/src/Premium.js +24 -24
  41. package/src/Screenshot.js +82 -82
  42. package/src/addExternalModule.js +16 -16
  43. package/src/addUserToGroup.js +79 -79
  44. package/src/changeAdminStatus.js +79 -79
  45. package/src/changeArchivedStatus.js +41 -41
  46. package/src/changeAvt.js +84 -84
  47. package/src/changeBio.js +65 -65
  48. package/src/changeBlockedStatus.js +36 -36
  49. package/src/changeGroupImage.js +106 -106
  50. package/src/changeNickname.js +45 -45
  51. package/src/changeThreadColor.js +62 -62
  52. package/src/changeThreadEmoji.js +42 -42
  53. package/src/createNewGroup.js +70 -70
  54. package/src/createPoll.js +60 -60
  55. package/src/deleteMessage.js +45 -45
  56. package/src/deleteThread.js +43 -43
  57. package/src/forwardAttachment.js +48 -48
  58. package/src/getAccessToken.js +27 -27
  59. package/src/getCurrentUserID.js +7 -7
  60. package/src/getEmojiUrl.js +27 -27
  61. package/src/getFriendsList.js +73 -73
  62. package/src/getMessage.js +79 -79
  63. package/src/getThreadHistory.js +537 -537
  64. package/src/getThreadInfo.js +424 -424
  65. package/src/getThreadList.js +213 -213
  66. package/src/getThreadMain.js +219 -219
  67. package/src/getThreadPictures.js +59 -59
  68. package/src/getUID.js +58 -58
  69. package/src/getUserID.js +62 -62
  70. package/src/getUserInfo.js +113 -113
  71. package/src/getUserInfoMain.js +64 -64
  72. package/src/getUserInfoV2.js +31 -31
  73. package/src/getUserInfoV3.js +62 -62
  74. package/src/getUserInfoV4.js +54 -54
  75. package/src/getUserInfoV5.js +60 -60
  76. package/src/handleFriendRequest.js +46 -46
  77. package/src/handleMessageRequest.js +49 -49
  78. package/src/httpGet.js +49 -49
  79. package/src/httpPost.js +48 -48
  80. package/src/httpPostFormData.js +40 -40
  81. package/src/listenMqtt.js +786 -786
  82. package/src/logout.js +68 -68
  83. package/src/markAsDelivered.js +48 -48
  84. package/src/markAsRead.js +70 -70
  85. package/src/markAsReadAll.js +42 -42
  86. package/src/markAsSeen.js +51 -51
  87. package/src/muteThread.js +47 -47
  88. package/src/removeUserFromGroup.js +49 -49
  89. package/src/resolvePhotoUrl.js +37 -37
  90. package/src/searchForThread.js +43 -43
  91. package/src/sendMessage.js +378 -378
  92. package/src/sendTypingIndicator.js +80 -80
  93. package/src/setMessageReaction.js +109 -109
  94. package/src/setPostReaction.js +101 -101
  95. package/src/setTitle.js +74 -74
  96. package/src/threadColors.js +38 -38
  97. package/src/unfriend.js +43 -43
  98. package/src/unsendMessage.js +40 -40
  99. package/test/Database_Test.js +3 -3
  100. package/test/Db2.js +529 -529
  101. package/test/data/shareAttach.js +146 -146
  102. package/test/data/test.txt +7 -7
  103. package/test/example-config.json +18 -18
  104. package/test/memoryleak.js +18 -18
  105. package/test/test-page.js +140 -140
  106. package/test/test.js +385 -385
  107. package/test/testv2.js +17 -17
  108. package/utils.js +1682 -1682
package/logger.js CHANGED
@@ -1,67 +1,67 @@
1
- 'use strict';
2
- /* eslint-disable linebreak-style */
3
-
4
- const chalk = require('chalk');
5
- const gradient = require('gradient-string');
6
- var isHexcolor = require('is-hexcolor');
7
- var getText = function(/** @type {string[]} */ ...Data) {
8
- var Main = (Data.splice(0,1)).toString();
9
- for (let i = 0; i < Data.length; i++) Main = Main.replace(RegExp(`%${i + 1}`, 'g'), Data[i]);
10
- return Main;
11
- };
12
- /**
13
- * @param {any} obj
14
- */
15
- function getType(obj) {
16
- return Object.prototype.toString.call(obj).slice(8, -1);
17
- }
18
-
19
- module.exports = {
20
- Normal: function(/** @type {string} */ Str, /** @type {() => any} */ Data ,/** @type {() => void} */ Callback) {
21
- if (isHexcolor(global.Fca.Require.FastConfig.MainColor) != true) {
22
- this.Warning(getText(global.Fca.Require.Language.Index.InvaildMainColor,global.Fca.Require.FastConfig.MainColor),process.exit(0));
23
- }
24
- console.log(gradient('orange', 'yellow')(`${global.Fca.Require.FastConfig.MainName || '[ FCA-PROJECT-ORION ]'} > `) + Str);
25
- if (getType(Data) == 'Function' || getType(Data) == 'AsyncFunction') {
26
- return Data();
27
- }
28
- if (Data) {
29
- return Data;
30
- }
31
- if (getType(Callback) == 'Function' || getType(Callback) == 'AsyncFunction') {
32
- Callback();
33
- }
34
- else return Callback;
35
- },
36
- Warning: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
37
- console.log(gradient('orange', 'yellow')('[ FCA-WARNING ] > ') + chalk.yellow(str));
38
- if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
39
- callback();
40
- }
41
- else return callback;
42
- },
43
- Error: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
44
- if (!str) {
45
- console.log(gradient('orange', 'yellow')('[ FCA-ERROR ] > ') + chalk.red("Already Faulty, Please Contact: Facebook.com/Lazic.Kanzu"));
46
- }
47
- console.log(gradient('orange', 'yellow')('[ FCA-ERROR ] > ') + chalk.red(str));
48
- if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
49
- callback();
50
- }
51
- else return callback;
52
- },
53
- Success: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
54
- console.log(chalk.hex('#9900FF').bold(`${global.Fca.Require.FastConfig.MainName || '[ FCA-PROJECT-ORION ]'} > `) + chalk.green(str));
55
- if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
56
- callback();
57
- }
58
- else return callback;
59
- },
60
- Info: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
61
- console.log(chalk.hex('#9900FF').bold(`${global.Fca.Require.FastConfig.MainName || '[ FCA-PROJECT-ORION ]'} > `) + chalk.blue(str));
62
- if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
63
- callback();
64
- }
65
- else return callback;
66
- }
1
+ 'use strict';
2
+ /* eslint-disable linebreak-style */
3
+
4
+ const chalk = require('chalk');
5
+ const gradient = require('gradient-string');
6
+ var isHexcolor = require('is-hexcolor');
7
+ var getText = function(/** @type {string[]} */ ...Data) {
8
+ var Main = (Data.splice(0,1)).toString();
9
+ for (let i = 0; i < Data.length; i++) Main = Main.replace(RegExp(`%${i + 1}`, 'g'), Data[i]);
10
+ return Main;
11
+ };
12
+ /**
13
+ * @param {any} obj
14
+ */
15
+ function getType(obj) {
16
+ return Object.prototype.toString.call(obj).slice(8, -1);
17
+ }
18
+
19
+ module.exports = {
20
+ Normal: function(/** @type {string} */ Str, /** @type {() => any} */ Data ,/** @type {() => void} */ Callback) {
21
+ if (isHexcolor(global.Fca.Require.FastConfig.MainColor) != true) {
22
+ this.Warning(getText(global.Fca.Require.Language.Index.InvaildMainColor,global.Fca.Require.FastConfig.MainColor),process.exit(0));
23
+ }
24
+ console.log(gradient('orange', 'yellow')(`${global.Fca.Require.FastConfig.MainName || '[ FCA-PROJECT-ORION ]'} > `) + Str);
25
+ if (getType(Data) == 'Function' || getType(Data) == 'AsyncFunction') {
26
+ return Data();
27
+ }
28
+ if (Data) {
29
+ return Data;
30
+ }
31
+ if (getType(Callback) == 'Function' || getType(Callback) == 'AsyncFunction') {
32
+ Callback();
33
+ }
34
+ else return Callback;
35
+ },
36
+ Warning: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
37
+ console.log(gradient('orange', 'yellow')('[ FCA-WARNING ] > ') + chalk.yellow(str));
38
+ if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
39
+ callback();
40
+ }
41
+ else return callback;
42
+ },
43
+ Error: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
44
+ if (!str) {
45
+ console.log(gradient('orange', 'yellow')('[ FCA-ERROR ] > ') + chalk.red("Already Faulty, Please Contact: Facebook.com/Lazic.Kanzu"));
46
+ }
47
+ console.log(gradient('orange', 'yellow')('[ FCA-ERROR ] > ') + chalk.red(str));
48
+ if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
49
+ callback();
50
+ }
51
+ else return callback;
52
+ },
53
+ Success: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
54
+ console.log(chalk.hex('#9900FF').bold(`${global.Fca.Require.FastConfig.MainName || '[ FCA-PROJECT-ORION ]'} > `) + chalk.green(str));
55
+ if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
56
+ callback();
57
+ }
58
+ else return callback;
59
+ },
60
+ Info: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
61
+ console.log(chalk.hex('#9900FF').bold(`${global.Fca.Require.FastConfig.MainName || '[ FCA-PROJECT-ORION ]'} > `) + chalk.blue(str));
62
+ if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
63
+ callback();
64
+ }
65
+ else return callback;
66
+ }
67
67
  };
package/package.json CHANGED
@@ -1,93 +1,93 @@
1
- {
2
- "name": "fca-project-orion",
3
- "version": "1.1.2",
4
- "description": "",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "mocha"
8
- },
9
- "author": "",
10
- "license": "MIT",
11
- "bugs": {
12
- "url": "https://github.com/ivancotacte/fca-project-orion/issues"
13
- },
14
- "homepage": "https://github.com/ivancotacte/fca-project-orion#readme",
15
- "repository": {
16
- "type": "git",
17
- "url": "git://github.com/ivancotacte/fca-project-orion.git"
18
- },
19
- "dependencies": {
20
- "aes-js": "latest",
21
- "ansi-to-html": "latest",
22
- "assert": "latest",
23
- "axios": "^1.5.0",
24
- "better-sqlite3": "7.6.2",
25
- "bluebird": "latest",
26
- "chalk": "4.1.2",
27
- "cheerio": "latest",
28
- "crypto-js": "latest",
29
- "deasync": "^0.1.28",
30
- "duplexify": "^4.1.2",
31
- "encode32": "latest",
32
- "express": "latest",
33
- "figlet": "^1.6.0",
34
- "file-url": "^3.0.0",
35
- "form-data": "^4.0.0",
36
- "fs-extra": "^11.1.1",
37
- "got": "^11.8.6",
38
- "https-proxy-agent": "latest",
39
- "is-hexcolor": "^1.0.0",
40
- "lodash": "latest",
41
- "moment": "^2.29.4",
42
- "mqtt": "4.3.7",
43
- "npmlog": "latest",
44
- "os": "latest",
45
- "path": "latest",
46
- "pretty-ms": "7.0.1",
47
- "puppeteer": "^21.1.1",
48
- "readable-stream": "^4.4.0",
49
- "readline": "latest",
50
- "request": "latest",
51
- "speakeasy": "latest",
52
- "totp-generator": "latest",
53
- "tough-cookie": "^4.1.2",
54
- "uuid": "latest",
55
- "ws": "^8.13.0",
56
- "gradient-string": "^2.0.2"
57
- },
58
- "engines": {
59
- "node": ">=14.x"
60
- },
61
- "devDependencies": {
62
- "eslint": "^8.40.0",
63
- "mocha": "latest",
64
- "prettier": "latest"
65
- },
66
- "eslintConfig": {
67
- "env": {
68
- "es6": true,
69
- "node": true
70
- },
71
- "extends": "eslint:recommended",
72
- "parserOptions": {
73
- "sourceType": "module"
74
- },
75
- "rules": {
76
- "linebreak-style": [
77
- "error",
78
- "unix"
79
- ],
80
- "semi": [
81
- "error",
82
- "always"
83
- ],
84
- "no-unused-vars": [
85
- 1,
86
- {
87
- "argsIgnorePattern": "^_"
88
- }
89
- ]
90
- }
91
- },
92
- "keywords": []
93
- }
1
+ {
2
+ "name": "fca-project-orion",
3
+ "version": "1.1.4",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "mocha"
8
+ },
9
+ "author": "",
10
+ "license": "MIT",
11
+ "bugs": {
12
+ "url": "https://github.com/ivancotacte/fca-project-orion/issues"
13
+ },
14
+ "homepage": "https://github.com/ivancotacte/fca-project-orion#readme",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git://github.com/ivancotacte/fca-project-orion.git"
18
+ },
19
+ "dependencies": {
20
+ "aes-js": "latest",
21
+ "ansi-to-html": "latest",
22
+ "assert": "latest",
23
+ "axios": "^1.5.0",
24
+ "better-sqlite3": "7.6.2",
25
+ "bluebird": "latest",
26
+ "chalk": "4.1.2",
27
+ "cheerio": "latest",
28
+ "crypto-js": "latest",
29
+ "deasync": "^0.1.28",
30
+ "duplexify": "^4.1.2",
31
+ "encode32": "latest",
32
+ "express": "latest",
33
+ "figlet": "^1.6.0",
34
+ "file-url": "^3.0.0",
35
+ "form-data": "^4.0.0",
36
+ "fs-extra": "^11.1.1",
37
+ "got": "^11.8.6",
38
+ "https-proxy-agent": "latest",
39
+ "is-hexcolor": "^1.0.0",
40
+ "lodash": "latest",
41
+ "moment": "^2.29.4",
42
+ "mqtt": "4.3.7",
43
+ "npmlog": "latest",
44
+ "os": "latest",
45
+ "path": "latest",
46
+ "pretty-ms": "7.0.1",
47
+ "puppeteer": "^21.1.1",
48
+ "readable-stream": "^4.4.0",
49
+ "readline": "latest",
50
+ "request": "latest",
51
+ "speakeasy": "latest",
52
+ "totp-generator": "latest",
53
+ "tough-cookie": "^4.1.2",
54
+ "uuid": "latest",
55
+ "ws": "^8.13.0",
56
+ "gradient-string": "^2.0.2"
57
+ },
58
+ "engines": {
59
+ "node": ">=14.x"
60
+ },
61
+ "devDependencies": {
62
+ "eslint": "^8.40.0",
63
+ "mocha": "latest",
64
+ "prettier": "latest"
65
+ },
66
+ "eslintConfig": {
67
+ "env": {
68
+ "es6": true,
69
+ "node": true
70
+ },
71
+ "extends": "eslint:recommended",
72
+ "parserOptions": {
73
+ "sourceType": "module"
74
+ },
75
+ "rules": {
76
+ "linebreak-style": [
77
+ "error",
78
+ "unix"
79
+ ],
80
+ "semi": [
81
+ "error",
82
+ "always"
83
+ ],
84
+ "no-unused-vars": [
85
+ 1,
86
+ {
87
+ "argsIgnorePattern": "^_"
88
+ }
89
+ ]
90
+ }
91
+ },
92
+ "keywords": []
93
+ }
@@ -1,125 +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
- };
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
125
  };
package/src/Premium.js CHANGED
@@ -1,25 +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
- };
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
25
  };