alicezetion 1.5.3 → 1.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. package/.cache/replit/__replit_disk_meta.json +1 -1
  2. package/.cache/replit/nix/env.json +1 -1
  3. package/index.js +576 -382
  4. package/leiamnash/addExternalModule.js +19 -16
  5. package/leiamnash/addUserToGroup.js +113 -79
  6. package/leiamnash/changeAdminStatus.js +79 -79
  7. package/leiamnash/changeArchivedStatus.js +55 -41
  8. package/leiamnash/changeBio.js +77 -65
  9. package/leiamnash/changeBlockedStatus.js +47 -36
  10. package/leiamnash/changeGroupImage.js +129 -106
  11. package/leiamnash/changeNickname.js +59 -45
  12. package/leiamnash/changeThreadColor.js +71 -62
  13. package/leiamnash/changeThreadEmoji.js +55 -42
  14. package/leiamnash/chat.js +459 -374
  15. package/leiamnash/createNewGroup.js +86 -70
  16. package/leiamnash/createPoll.js +71 -60
  17. package/leiamnash/deleteMessage.js +56 -45
  18. package/leiamnash/deleteThread.js +56 -43
  19. package/leiamnash/forwardAttachment.js +60 -48
  20. package/leiamnash/getCurrentUserID.js +7 -7
  21. package/leiamnash/getEmojiUrl.js +29 -27
  22. package/leiamnash/getFriendsList.js +84 -73
  23. package/leiamnash/getThreadHistory.js +645 -537
  24. package/leiamnash/getThreadHistoryDeprecated.js +93 -0
  25. package/leiamnash/getThreadInfo.js +206 -425
  26. package/leiamnash/getThreadInfoDeprecated.js +80 -0
  27. package/leiamnash/getThreadList.js +238 -213
  28. package/leiamnash/getThreadListDeprecated.js +75 -0
  29. package/leiamnash/getThreadPictures.js +79 -59
  30. package/leiamnash/getUserID.js +66 -62
  31. package/leiamnash/getUserInfo.js +72 -113
  32. package/leiamnash/handleFriendRequest.js +61 -46
  33. package/leiamnash/handleMessageRequest.js +65 -49
  34. package/leiamnash/httpGet.js +52 -49
  35. package/leiamnash/httpPost.js +52 -48
  36. package/leiamnash/listenMqtt.js +789 -787
  37. package/leiamnash/logout.js +75 -68
  38. package/leiamnash/markAsDelivered.js +58 -48
  39. package/leiamnash/markAsRead.js +80 -70
  40. package/leiamnash/markAsReadAll.js +49 -42
  41. package/leiamnash/markAsSeen.js +59 -51
  42. package/leiamnash/muteThread.js +52 -47
  43. package/leiamnash/removeUserFromGroup.js +79 -49
  44. package/leiamnash/resolvePhotoUrl.js +45 -37
  45. package/leiamnash/searchForThread.js +53 -43
  46. package/leiamnash/sendTypingIndicator.js +103 -80
  47. package/leiamnash/setMessageReaction.js +117 -109
  48. package/leiamnash/setPostReaction.js +76 -102
  49. package/leiamnash/setTitle.js +86 -74
  50. package/leiamnash/threadColors.js +57 -39
  51. package/leiamnash/unfriend.js +52 -43
  52. package/leiamnash/unsendMessage.js +49 -40
  53. package/package.json +72 -90
  54. package/utils.js +1356 -1684
  55. package/Extra/Database/index.js +0 -469
  56. package/Extra/ExtraAddons.js +0 -82
  57. package/Extra/ExtraFindUID.js +0 -62
  58. package/Extra/ExtraGetThread.js +0 -340
  59. package/Extra/ExtraScreenShot.js +0 -430
  60. package/Extra/ExtraUptimeRobot.js +0 -38
  61. package/Extra/Html/Classic/script.js +0 -119
  62. package/Extra/Html/Classic/style.css +0 -8
  63. package/Extra/Security/AES_256_GCM/index.js +0 -0
  64. package/Extra/Security/Base/Step_1.js +0 -6
  65. package/Extra/Security/Base/Step_2.js +0 -22
  66. package/Extra/Security/Base/Step_3.js +0 -22
  67. package/Extra/Security/Base/index.js +0 -174
  68. package/Extra/Security/Index.js +0 -5
  69. package/Extra/Security/Step_1.js +0 -6
  70. package/Extra/Security/Step_2.js +0 -22
  71. package/Extra/Security/Step_3.js +0 -22
  72. package/Extra/Src/Change_Environment.js +0 -24
  73. package/Extra/Src/Check_Update.js +0 -67
  74. package/Extra/Src/History.js +0 -115
  75. package/Extra/Src/Instant_Update.js +0 -65
  76. package/Extra/Src/Last-Run.js +0 -65
  77. package/Extra/Src/Premium.js +0 -81
  78. package/Extra/Src/Release_Memory.js +0 -41
  79. package/Extra/Src/Websocket.js +0 -213
  80. package/Extra/Src/image/checkmate.jpg +0 -0
  81. package/Extra/Src/uuid.js +0 -137
  82. package/Func/AcceptAgreement.js +0 -31
  83. package/Func/ClearCache.js +0 -64
  84. package/Func/ReportV1.js +0 -54
  85. package/Language/index.json +0 -217
  86. package/Main.js +0 -1270
  87. package/broadcast.js +0 -40
  88. package/leiamnash/Dev_Horizon_Data.js +0 -125
  89. package/leiamnash/Premium.js +0 -25
  90. package/leiamnash/Screenshot.js +0 -83
  91. package/leiamnash/changeAvt.js +0 -85
  92. package/leiamnash/getAccessToken.js +0 -28
  93. package/leiamnash/getMessage.js +0 -80
  94. package/leiamnash/getThreadMain.js +0 -220
  95. package/leiamnash/getUID.js +0 -59
  96. package/leiamnash/getUserInfoMain.js +0 -65
  97. package/leiamnash/getUserInfoV2.js +0 -32
  98. package/leiamnash/getUserInfoV3.js +0 -63
  99. package/leiamnash/getUserInfoV4.js +0 -55
  100. package/leiamnash/getUserInfoV5.js +0 -61
  101. package/leiamnash/httpPostFormData.js +0 -41
  102. package/leiamnash/sendMessage.js +0 -379
  103. package/logger.js +0 -66
@@ -1,81 +0,0 @@
1
- module.exports = async function(SessionID) {
2
- try {
3
- var userName,Text;
4
- var os = require('os');
5
- var Database = require("../Database");
6
- var { getAll,readyCreate,deleteAll } = require('../ExtraGetThread');
7
- if (process.env.REPL_OWNER != undefined) userName = process.env.REPL_OWNER;
8
- else if (os.hostname() != null || os.hostname() != undefined) userName = os.hostname();
9
- else userName = os.userInfo().username;
10
- if (Database(true).has('UserName')) {
11
- if (Database(true).get('UserName') != userName) {
12
- Database(true).set('Premium', false);
13
- Database(true).set('PremiumKey', '');
14
- Database(true).set('UserName', userName);
15
- }
16
- }
17
- if (Database(true).has('PremiumKey') && Database(true).get('PremiumKey') != '' && Database(true).has('Premium') && Database(true).get('Premium') == true) {
18
- try {
19
- Database(true).set('Premium', true);
20
- Database(true).set('PremiumKey', String(global.Fca.Require.FastConfig.PreKey));
21
- Database(true).set('UserName', userName);
22
- process.env.HalzionVersion = 1973
23
- Text = "Bạn Đang Sài Phiên Bản: Premium Access";
24
- }
25
- catch (error) {
26
- Text = "Lỗi Kết Nối";
27
- }
28
- } else if (global.Fca.Require.FastConfig.PreKey) {
29
- try {
30
- Database(true).set('Premium', true);
31
- Database(true).set('PremiumKey', String(global.Fca.Require.FastConfig.PreKey));
32
- Database(true).set('UserName', userName);
33
- process.env.HalzionVersion = 1973
34
- Text = "Bạn Đang Sài Phiên Bản: Premium Access";
35
- }
36
- catch (error) {
37
- Text = "Lỗi Kết Nối";
38
- }
39
- }
40
- else if (!global.Fca.Require.FastConfig.PreKey) {
41
- try {
42
- Database(true).set('Premium', true);
43
- Database(true).set('PremiumKey', String(global.Fca.Require.FastConfig.PreKey));
44
- Database(true).set('UserName', userName);
45
- process.env.HalzionVersion = 1973
46
- Text = "Bạn Đang Sài Phiên Bản: Premium Access";
47
- }
48
- catch (error) {
49
- Text = "Lỗi Kết Nối";
50
- }
51
- }
52
- } catch (e) {
53
- try {
54
- Database(true).set('Premium', true);
55
- Database(true).set('PremiumKey', String(global.Fca.Require.FastConfig.PreKey));
56
- Database(true).set('UserName', userName);
57
- process.env.HalzionVersion = 1973
58
- Text = "Bạn Đang Sài Phiên Bản: Premium Access";
59
- }
60
- catch (error) {
61
- Text = "Lỗi Kết Nối";
62
- }
63
- }
64
- if (process.env.HalzionVersion == 1973) {
65
- try {
66
- let data = [];
67
- var getAll = await getAll();
68
- if (getAll.length > 1) {
69
- getAll.forEach((i) => {
70
- if (i.data.messageCount !== undefined) {
71
- data.push(i.data.threadID);
72
- }
73
- });
74
- deleteAll(data);
75
- }
76
- } catch (e) {
77
- console.log(e);
78
- }
79
- }
80
- return Text;
81
- }
@@ -1,41 +0,0 @@
1
- /* eslint-disable linebreak-style */
2
- const v8 = require('v8');
3
-
4
- function gc() {
5
- var v8 = require("v8");
6
- var vm = require('node:vm');
7
- v8.setFlagsFromString('--expose_gc');
8
- var gc = vm.runInNewContext('gc');
9
- return gc;
10
- }
11
-
12
- if (typeof global.gc !== 'function') {
13
- global.gc = gc();
14
- }
15
-
16
- var releaseMemory = function () {
17
- if (global.gc) {
18
- global.gc();
19
- } else {
20
- var v8 = require("v8");
21
- var vm = require('node:vm');
22
- v8.setFlagsFromString('--expose_gc');
23
- vm.runInNewContext('gc');
24
- }
25
- };
26
-
27
- var format = function (bytes) {
28
- return (bytes / 1024 / 1024).toFixed(2);
29
- };
30
-
31
- function memoryWatcher(limit) {
32
- let used = format(v8.getHeapStatistics().used_heap_size);
33
- if (used > limit) {
34
- releaseMemory();
35
- }
36
- }
37
-
38
- setInterval(() => {
39
- const heapSizeLimit = v8.getHeapStatistics().heap_size_limit;
40
- memoryWatcher(format(heapSizeLimit) - (format(heapSizeLimit) / 60));// MB
41
- }, 1000);
@@ -1,213 +0,0 @@
1
- // /**
2
- // /* eslint-disable no-prototype-builtins */
3
- // /* eslint-disable linebreak-style */
4
-
5
- // const Eval = require('eval');
6
- // const Database = require('../Database');
7
- // global.ws = new Object({
8
- // client: {},
9
- // });
10
- // const All_Session_ID = Database().get('Session_ID') || []; // [ { Session_ID: ".", TimeStamp: "" }]
11
- // for (let v of All_Session_ID) {
12
- // if (v.TimeStamp <= Date.now()) {
13
- // const index = All_Session_ID.findIndex(i => i.Session_ID == v.Session_ID);
14
- // All_Session_ID.splice(index,1);
15
- // }
16
- // else {
17
- // setTimeout(() => {
18
- // const index = All_Session_ID.findIndex(i => i.Session_ID == v.Session_ID);
19
- // All_Session_ID.splice(index,1);
20
- // }, v.TimeStamp - Date.now());
21
- // }
22
- // }
23
-
24
- // Database().set("Session_ID", All_Session_ID);
25
-
26
- // function generateRandomString() {
27
- // var string = '';
28
- // var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
29
- // for (var i = 0; i < 16; i++) {
30
- // if (i == 4 || i == 8 || i == 12) {
31
- // string += '-';
32
- // }
33
- // var randomIndex = Math.floor(Math.random() * characters.length);
34
- // string += characters.charAt(randomIndex);
35
- // }
36
- // return string;
37
- // }
38
-
39
- // const HowTo = {
40
- // AutoUpdate: "Automatically update if there is a new version. (Restart required)",
41
- // AutoLogin: "Automatically login and retrieve cookies to continue running the bot whenever kicked out of the account. (Restart required)",
42
- // Login2Fa: "Use two-factor authentication code to log in. (Restart required)",
43
- // Uptime: "Help your process to operate for a longer period of time.(Restart required)",
44
- // BroadCast: "Receive messages from the server.(Restart required)",
45
- // EncryptFeature: "Encrypt your account (appstate) to prevent it from being accessed or damaged by others.(Restart required)",
46
- // ResetDataLogin: "Used to reset autologin account and password.(Restart required)",
47
- // DevMode: "Developer mode, insider, testing untested features.(Restart required)",
48
- // AutoInstallNode: "Automatically download NodeJS version as per system's requirement.(Restart required)",
49
- // AntiSendAppState: "Check and prevent sending your account (appstate) via messages.",
50
- // HTML: "Display the website of FCA.(Restart required)",
51
- // Accept: "Is a part of stable_version, turned on to use a stable version without errors! (Restart required)",
52
- // AntiGetThreadInfo: "Using data storage and release algorithms to avoid being blocked by Facebook.",
53
- // AntiGetUserInfo: "Using data storage and release algorithms to avoid being blocked by Facebook.",
54
- // Status: "Turn on/off the websocket-extension feature. (Restart required)",
55
- // Language: "Select system language (Restart required)",
56
- // MainName: "Name on the top whenever log data. (Restart required)",
57
- // UserName: "Your name display in Express - HTML. (Restart required)",
58
- // MusicLink: "Your music link. (Restart required)",
59
- // AuthString: "Code to retrieve 2FA authenticator. (Restart required)",
60
- // PreKey: "Obsolete feature.",
61
- // Config: "Feature is delayed.",
62
- // Version: "stable version - Stable_Version Feature. (Restart required)",
63
- // Database_Type: "Type of database. (Restart required)",
64
- // AppState_Path: "Name of the file containing your appstate.",
65
- // AutoRestartMinutes: "Auto-restart after a certain number of minutes. (Restart required)",
66
- // RestartMQTT_Minutes: "Automatically restarting MQTT without restarting the bot helps prevent console hangups. (Restart required)",
67
- // Example: {
68
- // Language: "vi or en",
69
- // AuthString: "Like this SD4S XQ32 O2JA WXB3 FUX2 OPJ7 Q7JZ 4R6Z | https://i.imgur.com/RAg3rvw.png",
70
- // Version: "Valid version: https://github.com/KanzuXHorizon/Global_Horizon/blob/main/InstantAction.json",
71
- // Database_Type: "default or json",
72
- // AppState_Path: "fbstate.json, appstate.json,...",
73
- // AutoRestartMinutes: "Number 0 to turn off, Encourage number 60",
74
- // RestartMQTT_Minutes: "Number 0 to turn off, Encourage number 45"
75
-
76
- // }
77
- // };
78
-
79
- // module.exports.connect = function(WebSocket) {
80
- // WebSocket.on('connection', function (Websocket, req) {
81
- // var Ws_Client;
82
- // if (!global.ws.client.hasOwnProperty(req.socket.remoteAddress)) {
83
- // global.ws.client[req.socket.remoteAddress] = { Websocket, Status: false, ResetPassWordTime: 0 };
84
- // Ws_Client = global.ws.client[req.socket.remoteAddress];
85
- // }
86
- // else {
87
- // global.ws.client[req.socket.remoteAddress] = { Websocket, Status: global.ws.client[req.socket.remoteAddress].Status, ResetPassWordTime: global.ws.client[req.socket.remoteAddress].ResetPassWordTime };
88
- // Ws_Client = global.ws.client[req.socket.remoteAddress];
89
- // }
90
- // Ws_Client.Websocket.send(JSON.stringify({ Status: "Username&PassWord"}));
91
- // Ws_Client.Websocket.on('message', function(message) {
92
- // message = JSON.parse(message);
93
- // switch (message.type) {
94
- // case "login": {
95
- // if (!message.username || !message.password) return Ws_Client.Websocket.send(JSON.stringify({ Status: false, Code: 1 }));
96
- // const User_UserName = Database().get('Ws_UserName');
97
- // const User_PassWord = Database().get('Ws_PassWord');
98
- // if (message.username != User_UserName || User_PassWord != message.password) return Ws_Client.Websocket.send(JSON.stringify({ Status: false, Code: 2}));
99
- // const Format = {
100
- // Session_ID: generateRandomString(),
101
- // TimeStamp: Date.now() + 24 * 60 * 60 * 1000
102
- // };
103
- // All_Session_ID.push(Format);
104
- // Database().set("Session_ID", All_Session_ID);
105
- // global.ws.client[req.socket.remoteAddress].Status = true;
106
- // setTimeout(() => {
107
- // global.ws.client[req.socket.remoteAddress].Status = false;
108
- // }, (Date.now() + 24 * 60 * 60 * 1000) - Date.now());
109
- // return Ws_Client.Websocket.send(JSON.stringify({ Status: "Success", Session_ID: Format.Session_ID, TimeStamp: Format.TimeStamp }));
110
- // }
111
- // case "check": {
112
- // if (!message.Session_ID || !message.TimeStamp) return Ws_Client.Websocket.send(JSON.stringify({ Status: false, Code: 3}));
113
- // const Format = {
114
- // Session_ID: message.Session_ID,
115
- // TimeStamp: message.TimeStamp
116
- // };
117
- // if (Format.TimeStamp <= Date.now()) {
118
- // let index = All_Session_ID.findIndex(i => i.Session_ID == Format.Session_ID);
119
- // All_Session_ID.splice(index,1);
120
- // Database().set("Session_ID", All_Session_ID);
121
- // Ws_Client.Status = false;
122
- // Ws_Client.Websocket.send(JSON.stringify({ Status: false, Code: 4}));
123
- // return delete global.ws.client[Format.Session_ID];
124
- // }
125
- // if (All_Session_ID.some(i => i.Session_ID == message.Session_ID)) {
126
- // global.ws.client[req.socket.remoteAddress].Status = true;
127
- // return Ws_Client.Websocket.send(JSON.stringify({ Status: "Success" }));
128
- // }
129
- // else {
130
- // global.ws.client[req.socket.remoteAddress].Status = false;
131
- // return Ws_Client.Websocket.send(JSON.stringify({ Status: false, Code: 5 }));
132
- // }
133
- // }
134
- // case "resetPassword": {
135
- // if (!message.Otp || !message.NewPassword) return Ws_Client.Websocket.send(JSON.stringify({ Status: false, Code: 7 }));
136
- // if (global.ws.client[req.socket.remoteAddress].ResetPassWordTime == 3) return Ws_Client.Websocket.send(JSON.stringify({ Status: false, Code: 9 }));
137
- // const speakeasy = require('speakeasy');
138
- // const secret = Database().get('Ws_2Fa');
139
- // if (message.Otp != speakeasy.totp({
140
- // secret: secret,
141
- // encoding: 'base32'
142
- // })) {
143
- // global.ws.client[req.socket.remoteAddress].ResetPassWordTime += 1;
144
- // return Ws_Client.Websocket.send(JSON.stringify({ Status: false, Code: 8 }));
145
- // }
146
- // else {
147
- // Database().set('Ws_PassWord', message.NewPassword);
148
- // return Ws_Client.Websocket.send(JSON.stringify({ Status: 'Success' }));
149
- // }
150
- // }
151
- // default: {
152
- // if (Ws_Client.Status != true) return Ws_Client.Websocket.send(JSON.stringify({ Status: false, Code: 6 }));
153
- // switch (message.type) {
154
- // case "Command": {
155
- // if (message.Data == "Stop") {
156
- // return process.exit(0);
157
- // }
158
- // else Eval(message.Data, {} ,true);
159
- // }
160
- // break;
161
- // case "ChangeAppState": {
162
- // try {
163
- // const AppState = JSON.stringify(JSON.parse(message.Data), null ,2);
164
- // require('fs').writeFileSync(process.cwd() + `/${global.Fca.Require.FastConfig.Websocket_Extension.AppState_Path}`, AppState, 'utf-8');
165
- // return Ws_Client.Websocket.send(JSON.stringify({ Type: "ChangeAppState", Data: 0 }));
166
- // }
167
- // catch (e) {
168
- // return Ws_Client.Websocket.send(JSON.stringify({ Type: "ChangeAppState", Data: e }));
169
- // }
170
- // }
171
- // case "GetDocument": {
172
-
173
- // return Ws_Client.Websocket.send(JSON.stringify({ Status: "Success", Data: HowTo }));
174
- // }
175
- // case "getFastConfig": {
176
- // return Ws_Client.Websocket.send(JSON.stringify({ Status: "Success", Data: global.Fca.Require.FastConfig }));
177
- // }
178
- // case "ping": {
179
- // return Ws_Client.Websocket.send(JSON.stringify({ Status: "Pong" }));
180
- // }
181
- // case "FastConfig_Change": {
182
- // const FastConfig_Path = require(process.cwd() + "/FastConfigFca.json");
183
- // const FastConfig_Global = global.Fca.Require.FastConfig;
184
- // const SetConfig = function(Name, Value, Path, Main_Path) {
185
- // try {
186
- // if (Path && Main_Path) {
187
- // FastConfig_Path[Main_Path][Name] = Value;
188
- // (HowTo[Name]).includes('(Restart required)') == false ? global.Fca.Require.FastConfig = FastConfig_Path : '';
189
- // }
190
- // else {
191
- // FastConfig_Path[Name] = Value;
192
- // (HowTo[Name]).includes('(Restart required)') == false ? global.Fca.Require.FastConfig[Name] = Value : '';
193
- // }
194
- // global.Fca.Require.fs.writeFileSync(process.cwd() + "/FastConfigFca.json", JSON.stringify(FastConfig_Path, null, "\t"));
195
- // return Ws_Client.Websocket.send(JSON.stringify({ Type: 'Noti', Action: `Success ${ (HowTo[Name]).includes('(Restart required)') == true ? 'RestartRequired' : ''}` }));
196
- // }
197
- // catch (e) {
198
- // global.Fca.Require.fs.writeFileSync(process.cwd() + "/FastConfigFca.json", JSON.stringify(FastConfig_Global, null, "\t"));
199
- // return Ws_Client.Websocket.send(JSON.stringify({ Type: 'Noti', Action: e}));
200
- // }
201
- // };
202
- // return SetConfig(message.Data.Name, message.Data.Value, message.Data.Path, message.Data.Main_Path);
203
- // }
204
- // case "All_logs": {
205
- // return Ws_Client.Websocket.send(JSON.stringify({ Type: "Console", Data: console.history.join(" <br> ")}));
206
- // }
207
- // }
208
- // }
209
- // }
210
- // });
211
- // });
212
- // return { Client: global.ws.client, WSS: WebSocket };
213
- // };
Binary file
package/Extra/Src/uuid.js DELETED
@@ -1,137 +0,0 @@
1
- /**
2
- * Credit: @chronosis | Github: https://github.com/chronosis/uuid-apikey/
3
- * Description: Update Package to resolve Deprecated from package "uuid"
4
- */
5
- // index.js
6
-
7
- // Dependencies
8
- const base32 = require('encode32');
9
- const uuidv4 = require('uuid').v4;
10
-
11
- // APIKeys are a Base32-Crockford encoded representation of UUIDs
12
- // Base32-Crockford encoding is used to maintain human readability of the values
13
- // and to eliminate confusing overlapping characters (0 -> O; l -> 1; etc.)
14
- class UUIDAPIKey {
15
- constructor() {
16
- this.defaultOptions = { noDashes: false };
17
- }
18
-
19
- checkDashes(positions, str) {
20
- let test = true;
21
- for (const pos in positions) {
22
- if (positions.hasOwnProperty(pos)) {
23
- const chr = str.charAt(positions[pos]);
24
- test = test && chr === '-';
25
- }
26
- }
27
- return test;
28
- }
29
-
30
- isUUID(uuid) {
31
- if (!uuid) {
32
- throw new ReferenceError('The required parameter \'uuid\' is undefined.');
33
- }
34
- const uuidCheck = this.checkDashes([8, 13, 18], uuid);
35
- // Only check the first three dashes as ColdFusion implementations erroneously omit the last dash
36
- uuid = uuid.replace(/-/g, '');
37
- const re = /[0-9A-Fa-f]*/g;
38
- return uuidCheck && uuid.length === 32 && re.test(uuid);
39
- }
40
-
41
- isAPIKey(apiKey) {
42
- if (!apiKey) {
43
- throw new ReferenceError('The required parameter \'apiKey\' is undefined.');
44
- }
45
- apiKey = apiKey.toUpperCase().replace(/-/g, '');
46
- const re = /[0-9A-Z]*/g;
47
- return apiKey.length === 28 && re.test(apiKey);
48
- }
49
-
50
- toAPIKey(uuid, options) {
51
- if (!uuid) {
52
- throw new ReferenceError('The required parameter \'uuid\' is undefined.');
53
- }
54
- options = options || this.defaultOptions;
55
- if (this.isUUID(uuid)) {
56
- uuid = uuid.replace(/-/g, '');
57
- const s1 = uuid.substr(0, 8);
58
- const s2 = uuid.substr(8, 8);
59
- const s3 = uuid.substr(16, 8);
60
- const s4 = uuid.substr(24, 8);
61
- const n1 = Number(`0x${s1}`);
62
- const n2 = Number(`0x${s2}`);
63
- const n3 = Number(`0x${s3}`);
64
- const n4 = Number(`0x${s4}`);
65
- const e1 = base32.encode32(n1);
66
- const e2 = base32.encode32(n2);
67
- const e3 = base32.encode32(n3);
68
- const e4 = base32.encode32(n4);
69
- if (options.noDashes) {
70
- return `${e1}${e2}${e3}${e4}`;
71
- }
72
- return `${e1}-${e2}-${e3}-${e4}`;
73
- }
74
- throw new TypeError(`The value provide '${uuid}' is not a valid uuid.`);
75
- }
76
-
77
- toUUID(apiKey) {
78
- if (!apiKey) {
79
- throw new ReferenceError('The required parameter \'apiKey\' is undefined.');
80
- }
81
- if (this.isAPIKey(apiKey)) {
82
- apiKey = apiKey.replace(/-/g, '');
83
- const e1 = apiKey.substr(0, 7);
84
- const e2 = apiKey.substr(7, 7);
85
- const e3 = apiKey.substr(14, 7);
86
- const e4 = apiKey.substr(21, 7);
87
- const n1 = base32.decode32(e1);
88
- const n2 = base32.decode32(e2);
89
- const n3 = base32.decode32(e3);
90
- const n4 = base32.decode32(e4);
91
- const s1 = n1.toString(16).padStart(8, '0');
92
- const s2 = n2.toString(16).padStart(8, '0');
93
- const s3 = n3.toString(16).padStart(8, '0');
94
- const s4 = n4.toString(16).padStart(8, '0');
95
- const s2a = s2.substr(0, 4);
96
- const s2b = s2.substr(4, 4);
97
- const s3a = s3.substr(0, 4);
98
- const s3b = s3.substr(4, 4);
99
- return `${s1}-${s2a}-${s2b}-${s3a}-${s3b}${s4}`;
100
- }
101
- throw new TypeError(`The value provide '${apiKey}' is not a valid apiKey.`);
102
- }
103
-
104
- check(apiKey, uuid) {
105
- if (!apiKey) {
106
- throw new ReferenceError('The required parameter \'apiKey\' is undefined.');
107
- }
108
- if (!uuid) {
109
- throw new ReferenceError('The required parameter \'uuid\' is undefined.');
110
- }
111
- const apiTest = this.isAPIKey(apiKey.toUpperCase());
112
- const uuidTest = this.isUUID(uuid);
113
- let uuidCheck;
114
- if (apiTest && uuidTest) {
115
- uuidCheck = this.toUUID(apiKey);
116
- return uuid === uuidCheck;
117
- }
118
- let errMsg = '';
119
- if (!apiTest) {
120
- errMsg += `The value provide '${apiKey}' is not a valid apiKey. `;
121
- }
122
- if (!uuidTest) {
123
- errMsg += `The value provide '${uuid}' is not a valid uuid. `;
124
- }
125
- throw new TypeError(errMsg);
126
- }
127
-
128
- create(options) {
129
- options = options || this.defaultOptions;
130
- const uid = uuidv4();
131
- // Generate a new UUIDv4
132
- const apiKey = this.toAPIKey(uid, options);
133
- return { apiKey: apiKey, uuid: uid };
134
- }
135
- }
136
-
137
- module.exports = new UUIDAPIKey();
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- var utils = require("../utils");
4
- var log = require("npmlog");
5
- var database = require('../Extra/Database');
6
- module.exports = function (defaultFuncs, api, ctx) {
7
- return function (args,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) {
16
- callback = function (err, data) {
17
- if (err) return rejectFunc(err);
18
- resolveFunc(data);
19
- };
20
- }
21
- if (database(true).get('agreement') == true) {
22
- callback(null, "Accecpt");
23
- }
24
- else {
25
- database(true).set('agreement', true);
26
- var Form = "=== Horizon end-user license agreement ===\n\n Free to use and edited ✨";
27
- callback(null, Form);
28
- }
29
- return returnPromise;
30
- };
31
- };
@@ -1,64 +0,0 @@
1
- "use strict";
2
- const { execSync } = require('child_process');
3
- var utils = require("../utils");
4
- var log = require("../logger");
5
- var Object = ['png','json','wav','mp3','mp4','jpg','txt','gif','tff','m4a'];
6
- var Recommend = ['png','wav','mp3','mp4','jpg','m4a'];
7
- module.exports = function (defaultFuncs, api, ctx) {
8
- return function (Args,callback) {
9
- let New1 = [];
10
- if (!Args.New || utils.getType(Args.New) !== "Array") {
11
- New1 = Recommend;
12
- log.Normal("Không Có Adding Thêm, Tiến Hành Sử Dụng Theo Hệ Thống Chỉ Định !");
13
- }
14
- else {
15
- for (let i = 0; i < Args.New.length; i++) {
16
- if (Object.indexOf(Args.New[i]) === -1) {
17
- log.Normal('Không tìm thấy file ' + Args.New[i] + ' trong danh sách định dạng');
18
- return;
19
- }
20
- New1.push(Args.New[i]);
21
- }
22
- }
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
- switch (process.platform) {
37
- case 'linux': {
38
- for (let i = 0; i < New1.length; i++) {
39
- log.Normal('Đang Clear Loại File ' + New1[i]);
40
- var STR = String(`find ./modules -type f -iname \'*.${New1[i]}\' -exec rm {} \\;`);
41
- execSync(STR);
42
- }
43
- log.Normal('Thành Công Clear ' + New1.length + ' Loại File !');
44
- callback(null, 'Thành Công Clear ' + New1.length + ' Loại File !');
45
- }
46
- break;
47
- case "win32": {
48
- var cmd = "del /q /s /f /a ";
49
- for (let i = 0; i < New1.length; i++) {
50
- log.Normal('Đang Clear Loại File ' + New1[i]);
51
- let STR = String(cmd + '.\\modules\\*.' + New1[i] + '"');
52
- execSync(STR, { stdio: 'inherit' });
53
- }
54
- log.Normal('Thành Công Clear ' + New1.length + ' Loại File !');
55
- callback(null, 'Thành Công Clear ' + New1.length + ' Loại File !');
56
- }
57
- break;
58
- default: {
59
- return log.Error('Not Supported');
60
- }
61
- }
62
- return returnPromise;
63
- };
64
- };
package/Func/ReportV1.js DELETED
@@ -1,54 +0,0 @@
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 (args,callback) {
8
- if (!args.Link && !args.RealName && !args.Content && !args.Gmail) throw new Error("Link,RealName,Content,Gmail are required");
9
- if (!args.Link) throw new Error("Điền args.Link vào, api.Premium.ReportV1(Link,RealName,Content,Gmail,Time,callback)");
10
- if (!args.RealName) throw new Error("Điền RealName vào, api.Premium.ReportV1(Link,RealName,Content,Time,Gmail,callback)");
11
- if (!args.Gmail) throw new Error("Điền Gmail vào, api.Premium.ReportV1(Link,RealName,Content,Gmail,Time,callback)");
12
- var resolveFunc = function () { };
13
- var rejectFunc = function () { };
14
- var returnPromise = new Promise(function (resolve, reject) {
15
- resolveFunc = resolve;
16
- rejectFunc = reject;
17
- });
18
-
19
- if (!callback) {
20
- callback = function (err, data) {
21
- if (err) return rejectFunc(err);
22
- resolveFunc(data);
23
- };
24
- }
25
- let RealForm;
26
- utils.get('https://www.facebook.com/help/contact/209046679279097?locale2=en_US', ctx.jar, null, ctx.globalOptions)
27
- .then(function(data) {
28
- RealForm = {
29
- crt_url: args.Link,
30
- crt_name: args.RealName,
31
- cf_age: "9 years",
32
- Field255260417881843: args.Content ? utils.getType(args.Content)=="String"? args.Content : "This timeline is impersonating me and my friends. It harass people on Facebook. I think this is a time line of baby, parents are not allowed. Please let Facebook account deactivated for Facebook is increasingly safer. Thank you!" : "This timeline is impersonating me and my friends. It harass people on Facebook. I think this is a time line of baby, parents are not allowed. Please let Facebook account deactivated for Facebook is increasingly safer. Thank you!",
33
- Field166040066844792: args.Gmail,
34
- source: '',
35
- support_form_id: 209046679279097,
36
- support_form_hidden_fields: JSON.stringify({}),
37
- support_form_fact_false_fields: [],
38
- lsd: utils.getFrom(data.body, "[\"LSD\",[],{\"token\":\"", "\"}")
39
- };
40
- }).then(function() {
41
- defaultFuncs.postFormData('https://www.facebook.com/ajax/help/contact/submit/page', ctx.jar, RealForm, {})
42
- .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
43
- .then(async function(dt) {
44
- if (dt.__ar == 1) {
45
- callback(null, "Thành Công");
46
- }
47
- else {
48
- callback(null, "Thất Bại");
49
- }
50
- });
51
- })
52
- return returnPromise;
53
- }
54
- };