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/README.md CHANGED
@@ -1,139 +1,139 @@
1
- [![Socket Badge](https://socket.dev/api/badge/npm/package/fca-project-orion)](https://socket.dev/npm/package/fca-project-orion)
2
- [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/ivancotacte)
3
-
4
- ## Important !
5
-
6
- [ ENG ]: This package require NodeJS 14.17.0 to work properly.
7
-
8
- [ VIE ]: Gói này yêu cầu NodeJS 14.17.0 để hoạt động bình thường.
9
-
10
- ## Notification !
11
-
12
- + Original Project(Deprecated): https://github.com/Schmavery/facebook-chat-api
13
- + This is The Defunct Project https://github.com/KanzuXHorizon/Fca-Horizon-Remastered and Redeveloped By KanzuXHorizon
14
- + Remade by Ivan Cotacte (https://www.facebook.com/icotacteeee) (https://github.com/ivancotacte)
15
-
16
- ## Support Language :
17
-
18
- + English
19
- + VietNamese
20
- + Tagalog
21
- + Cebuano(Bisaya)
22
-
23
- # Api For ChatBot Messenger
24
-
25
- Facebook already exists and allows users to create Api for Chatbots 😪 Here => [Here](https://developers.facebook.com/docs/messenger-platform).
26
-
27
- ## Download
28
-
29
- If You Want To Use It, Download It By:
30
- ```bash
31
- npm i fca-project-orion
32
- ```
33
- or
34
- ```bash
35
- npm install fca-project-orion
36
- ```
37
-
38
- It Will Download To node_modules (Your Lib) - Note Replit Will Not Show Anywhere To Find 😪
39
-
40
- ### Download Latest Version Or Update
41
-
42
- If You Want To Use The Latest Or Updated Version Then Go To Terminal Or Command Promt Type:
43
- ```bash
44
- npm install fca-project-orion@latest
45
- ```
46
- Or
47
- ```bash
48
- npm i fca-project-orion@latest
49
- ```
50
-
51
- ## If You Want To Test Api
52
-
53
- The benefit of this is that you won't waste time paying and having an account 😪
54
- Please Use With Test Account => [Facebook Whitehat Accounts](https://www.facebook.com/whitehat/accounts/).
55
-
56
- ## Using
57
-
58
- ```javascript
59
- const login = require("fca-project-orion"); // get it from lib
60
-
61
- // log in
62
- login({email: "Gmail Account", password: "Your Facebook Password"}, (err, api) => {
63
-
64
- if(err) return console.error(err); // error case
65
-
66
- // create a bot that automatically imitates you:
67
- api.listenMqtt((err, message) => {
68
- api.sendMessage(message.body, message.threadID);
69
- });
70
-
71
- });
72
- ```
73
-
74
- As a result, it will imitate you as shown below:
75
- <img width="517" alt="screen shot 2016-11-04 at 14 36 00" src="./ivancotacte1.png">
76
- <img width="517" alt="screen shot 2016-11-04 at 14 36 00" src="./ivancotacte2.jpg">
77
- <img width="517" alt="screen shot 2016-11-04 at 14 36 00" src="./ivancotacte3.png">
78
-
79
- If You Want Advanced Use Then Use The Bot Types Listed Above!
80
-
81
- ## List
82
-
83
- You Can Read Full Api At => [here](DOCS.md).
84
-
85
- ## Settings For Mirai:
86
-
87
- You Need To Go To File Mirai.js, Then Find Line
88
- ```js
89
- var login = require('depend on bot');
90
- /* Maybe :
91
- var login = require('@maihuybao/fca-Unofficial');
92
- var login = require('fca-xuyen-get');
93
- var login = require('fca-unofficial-force');
94
- ...
95
- */
96
- ```
97
-
98
- And Replace It With:
99
-
100
- ```js
101
- var login = require('fca-project-orion')
102
- ```
103
-
104
- After that, run normally!
105
-
106
- ## Self-study
107
-
108
- If You Want To Research Or Create Your Own Bot, Go To This To Read Its Functions And How To Use => [Link](https://github.com/Schmavery/facebook-chat-api#Unofficial %20Facebook%20Chat%20API)
109
-
110
- ------------------------------------
111
-
112
- ### Save Login Information.
113
-
114
- To Save, You Need 1 Apstate Type (Cookie, etc,..) To Save Or Use Login Code As Above To Log In!
115
-
116
- And this mode is already available in some Vietnamese bots, so you can rest assured!
117
-
118
- __Instructions With Appstate__
119
-
120
- ```js
121
- const fs = require("fs");
122
- const login = require("fca-project-orion");
123
-
124
- var credentials = {email: "FB_EMAIL", password: "FB_PASSWORD"}; // account information
125
-
126
- login(credentials, (err, api) => {
127
- if(err) return console.error(err);
128
- // log in
129
- fs.writeFileSync('appstate.json', JSON.stringify(api.getAppState(), null,'\t')); //create appstate
130
- });
131
- ```
132
-
133
- Or Easier (Professional) You Can Use => [c3c-fbstate](https://github.com/c3cbot/c3c-fbstate) To Get Fbstate And Rename It Back To Apstate! (appstate.json)
134
-
135
- ------------------------------------
136
-
137
- ## FAQS
138
-
1
+ [![Socket Badge](https://socket.dev/api/badge/npm/package/fca-project-orion)](https://socket.dev/npm/package/fca-project-orion)
2
+ [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/ivancotacte)
3
+
4
+ ## Important !
5
+
6
+ [ ENG ]: This package require NodeJS 14.17.0 to work properly.
7
+
8
+ [ VIE ]: Gói này yêu cầu NodeJS 14.17.0 để hoạt động bình thường.
9
+
10
+ ## Notification !
11
+
12
+ + Original Project(Deprecated): https://github.com/Schmavery/facebook-chat-api
13
+ + This is The Defunct Project https://github.com/KanzuXHorizon/Fca-Horizon-Remastered and Redeveloped By KanzuXHorizon
14
+ + Remade by Ivan Cotacte (https://www.facebook.com/icotacteeee) (https://github.com/ivancotacte)
15
+
16
+ ## Support Language :
17
+
18
+ + English
19
+ + VietNamese
20
+ + Tagalog
21
+ + Cebuano(Bisaya)
22
+
23
+ # Api For ChatBot Messenger
24
+
25
+ Facebook already exists and allows users to create Api for Chatbots 😪 Here => [Here](https://developers.facebook.com/docs/messenger-platform).
26
+
27
+ ## Download
28
+
29
+ If You Want To Use It, Download It By:
30
+ ```bash
31
+ npm i fca-project-orion
32
+ ```
33
+ or
34
+ ```bash
35
+ npm install fca-project-orion
36
+ ```
37
+
38
+ It Will Download To node_modules (Your Lib) - Note Replit Will Not Show Anywhere To Find 😪
39
+
40
+ ### Download Latest Version Or Update
41
+
42
+ If You Want To Use The Latest Or Updated Version Then Go To Terminal Or Command Promt Type:
43
+ ```bash
44
+ npm install fca-project-orion@latest
45
+ ```
46
+ Or
47
+ ```bash
48
+ npm i fca-project-orion@latest
49
+ ```
50
+
51
+ ## If You Want To Test Api
52
+
53
+ The benefit of this is that you won't waste time paying and having an account 😪
54
+ Please Use With Test Account => [Facebook Whitehat Accounts](https://www.facebook.com/whitehat/accounts/).
55
+
56
+ ## Using
57
+
58
+ ```javascript
59
+ const login = require("fca-project-orion"); // get it from lib
60
+
61
+ // log in
62
+ login({email: "Gmail Account", password: "Your Facebook Password"}, (err, api) => {
63
+
64
+ if(err) return console.error(err); // error case
65
+
66
+ // create a bot that automatically imitates you:
67
+ api.listenMqtt((err, message) => {
68
+ api.sendMessage(message.body, message.threadID);
69
+ });
70
+
71
+ });
72
+ ```
73
+
74
+ As a result, it will imitate you as shown below:
75
+ <img width="517" alt="screen shot 2016-11-04 at 14 36 00" src="./ivancotacte1.png">
76
+ <img width="517" alt="screen shot 2016-11-04 at 14 36 00" src="./ivancotacte2.jpg">
77
+ <img width="517" alt="screen shot 2016-11-04 at 14 36 00" src="./ivancotacte3.png">
78
+
79
+ If You Want Advanced Use Then Use The Bot Types Listed Above!
80
+
81
+ ## List
82
+
83
+ You Can Read Full Api At => [here](DOCS.md).
84
+
85
+ ## Settings For Mirai:
86
+
87
+ You Need To Go To File Mirai.js, Then Find Line
88
+ ```js
89
+ var login = require('depend on bot');
90
+ /* Maybe :
91
+ var login = require('@maihuybao/fca-Unofficial');
92
+ var login = require('fca-xuyen-get');
93
+ var login = require('fca-unofficial-force');
94
+ ...
95
+ */
96
+ ```
97
+
98
+ And Replace It With:
99
+
100
+ ```js
101
+ var login = require('fca-project-orion')
102
+ ```
103
+
104
+ After that, run normally!
105
+
106
+ ## Self-study
107
+
108
+ If You Want To Research Or Create Your Own Bot, Go To This To Read Its Functions And How To Use => [Link](https://github.com/Schmavery/facebook-chat-api#Unofficial %20Facebook%20Chat%20API)
109
+
110
+ ------------------------------------
111
+
112
+ ### Save Login Information.
113
+
114
+ To Save, You Need 1 Apstate Type (Cookie, etc,..) To Save Or Use Login Code As Above To Log In!
115
+
116
+ And this mode is already available in some Vietnamese bots, so you can rest assured!
117
+
118
+ __Instructions With Appstate__
119
+
120
+ ```js
121
+ const fs = require("fs");
122
+ const login = require("fca-project-orion");
123
+
124
+ var credentials = {email: "FB_EMAIL", password: "FB_PASSWORD"}; // account information
125
+
126
+ login(credentials, (err, api) => {
127
+ if(err) return console.error(err);
128
+ // log in
129
+ fs.writeFileSync('appstate.json', JSON.stringify(api.getAppState(), null,'\t')); //create appstate
130
+ });
131
+ ```
132
+
133
+ Or Easier (Professional) You Can Use => [c3c-fbstate](https://github.com/c3cbot/c3c-fbstate) To Get Fbstate And Rename It Back To Apstate! (appstate.json)
134
+
135
+ ------------------------------------
136
+
137
+ ## FAQS
138
+
139
139
  FAQS => [Link](https://github.com/Schmavery/facebook-chat-api#FAQS)
package/SECURITY.md CHANGED
@@ -1,18 +1,18 @@
1
- # Security Policy
2
-
3
- + if have any Vulnerability finded contact: Author(KanzuWakazaki.Main@proton.me) or (Facebook.com/Lazic.Kanzu). Thanks!
4
-
5
- ## Supported Versions
6
-
7
- Use this section to tell people about which versions of your project are
8
- currently being supported with security updates.
9
-
10
- | Version | Supported |
11
- | ------- | ------------------ |
12
- | StableVersion | :white_check_mark: |
13
- | AutoUpdate | :white_check_mark:|
14
- | Modified | :x:
15
-
16
- ## Reporting a Vulnerability
17
-
18
- Contact Author or create pull!
1
+ # Security Policy
2
+
3
+ + if have any Vulnerability finded contact: Author(KanzuWakazaki.Main@proton.me) or (Facebook.com/Lazic.Kanzu). Thanks!
4
+
5
+ ## Supported Versions
6
+
7
+ Use this section to tell people about which versions of your project are
8
+ currently being supported with security updates.
9
+
10
+ | Version | Supported |
11
+ | ------- | ------------------ |
12
+ | StableVersion | :white_check_mark: |
13
+ | AutoUpdate | :white_check_mark:|
14
+ | Modified | :x:
15
+
16
+ ## Reporting a Vulnerability
17
+
18
+ Contact Author or create pull!
package/broadcast.js CHANGED
@@ -1,40 +1,40 @@
1
- 'use strict';
2
-
3
- switch (global.Fca.Require.FastConfig.BroadCast) {
4
- case true: {
5
- try {
6
- var logger = global.Fca.Require.logger;
7
- var Fetch = global.Fca.Require.Fetch;
8
- Fetch.get("https://raw.githubusercontent.com/ivancotacte/Global_fca-project-orion/main/Fca_BroadCast.json").then(async (/** @type {{ body: { toString: () => string; }; }} */ res) => {
9
- global.Fca.Data.BroadCast = JSON.parse(res.body.toString())
10
- var random = JSON.parse(res.body.toString())[Math.floor(Math.random() * JSON.parse(res.body.toString()).length)] || "Ae Zui Zẻ Nhé !";
11
- logger.Normal(random);
12
- });
13
- }
14
- catch (e) {
15
- console.log(e);
16
- }
17
- return setInterval(() => {
18
- try {
19
- try {
20
- var logger = global.Fca.Require.logger;
21
- var random = global.Fca.Data.BroadCast[Math.floor(Math.random() * global.Fca.Data.BroadCast.length)] || "Ae Zui Zẻ Nhé !";
22
- logger.Normal(random);
23
- }
24
- catch (e) {
25
- console.log(e);
26
- return;
27
- }
28
- }
29
- catch (e) {
30
- console.log(e);
31
- }
32
- },3600 * 1000);
33
- }
34
- case false: {
35
- break;
36
- }
37
- default: {
38
- break;
39
- }
1
+ 'use strict';
2
+
3
+ switch (global.Fca.Require.FastConfig.BroadCast) {
4
+ case true: {
5
+ try {
6
+ var logger = global.Fca.Require.logger;
7
+ var Fetch = global.Fca.Require.Fetch;
8
+ Fetch.get("https://raw.githubusercontent.com/ivancotacte/Global_fca-project-orion/main/Fca_BroadCast.json").then(async (/** @type {{ body: { toString: () => string; }; }} */ res) => {
9
+ global.Fca.Data.BroadCast = JSON.parse(res.body.toString())
10
+ var random = JSON.parse(res.body.toString())[Math.floor(Math.random() * JSON.parse(res.body.toString()).length)] || "Ae Zui Zẻ Nhé !";
11
+ logger.Normal(random);
12
+ });
13
+ }
14
+ catch (e) {
15
+ console.log(e);
16
+ }
17
+ return setInterval(() => {
18
+ try {
19
+ try {
20
+ var logger = global.Fca.Require.logger;
21
+ var random = global.Fca.Data.BroadCast[Math.floor(Math.random() * global.Fca.Data.BroadCast.length)] || "Ae Zui Zẻ Nhé !";
22
+ logger.Normal(random);
23
+ }
24
+ catch (e) {
25
+ console.log(e);
26
+ return;
27
+ }
28
+ }
29
+ catch (e) {
30
+ console.log(e);
31
+ }
32
+ },3600 * 1000);
33
+ }
34
+ case false: {
35
+ break;
36
+ }
37
+ default: {
38
+ break;
39
+ }
40
40
  }