meta-horizonn 1.1.7 → 1.1.9

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.
@@ -0,0 +1,24 @@
1
+ name: Publish
2
+ on:
3
+ push:
4
+ branches: ["main"]
5
+ # branches:
6
+ # - main
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: write # read
12
+ id-token: write
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ - uses: actions/setup-node@v3
16
+ with:
17
+ node-version: '14.17.0'
18
+ registry-url: 'https://registry.npmjs.org'
19
+ ############# NPM RELEASE ##############
20
+ - run: npm i
21
+ - run: npm ci
22
+ - run: npm publish --provenance --access public
23
+ env:
24
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/.prettierrc CHANGED
@@ -1,4 +1,4 @@
1
- {
2
- "tabWidth": 2,
3
- "useTabs": false
1
+ {
2
+ "tabWidth": 2,
3
+ "useTabs": false
4
4
  }
@@ -1,234 +1,234 @@
1
- /** By @KanzuWakazaki 03/05/2024 - DD/MM/YYYY */
2
- // !Type - change password is not required
3
- function Find_And_Parse(Data) {
4
- const regex = /<script\s+type="application\/json"\s+data-content-len="([0-9]+)"\s+data-sjs\s*(.*?)\s*<\/script>/gs;
5
- const matches = Data.matchAll(regex);
6
- let Data_resp;
7
- for (const match of matches) {
8
- if (JSON.parse(JSON.stringify((match[2]))).includes('any_eligible_challenges')) {
9
- const Data_ = JSON.parse(match[2].replace('>', ''))
10
- Data_resp = findAnyEligibleChallengesAndSiblings(Data_)
11
- }
12
-
13
- }
14
-
15
-
16
- function findAnyEligibleChallengesAndSiblings(data) {
17
- const screenData = findScreenData(data);
18
- if (!screenData) {
19
- return null;
20
- }
21
-
22
- const siblings = {};
23
- for (const [key, value] of Object.entries(screenData)) {
24
- if (key === 'any_eligible_challenges') {
25
- siblings[key] = value;
26
- }
27
- else {
28
- siblings[key] = value;
29
- }
30
- }
31
-
32
- return siblings;
33
- }
34
-
35
- function findScreenData(data) {
36
- if (Array.isArray(data)) {
37
- for (const item of data) {
38
- const result = findScreenData(item);
39
- if (result) {
40
- return result;
41
- }
42
- }
43
- }
44
- else if (typeof data === 'object' && data !== null) {
45
- if (data.screen) {
46
- return data.screen;
47
- }
48
- for (const value of Object.values(data)) {
49
- const result = findScreenData(value);
50
- if (result) {
51
- return result;
52
- }
53
- }
54
- }
55
- return null;
56
- }
57
- return Data_resp.token || null
58
- }
59
-
60
- module.exports.Check = Find_And_Parse
61
- module.exports.Cook_And_Work = async function(ctx, defaultFuncs) {
62
- const utils = require('../../../utils');
63
- var Form_P1;
64
- var CanResolve_P1;
65
- var NextToken_P1;
66
- var lsd;
67
-
68
- const Level_1 = () => new Promise((re, rj) => {
69
- try {
70
- utils.get('https://www.facebook.com/checkpoint/828281030927956/?next=https%3A%2F%2Faccountscenter.facebook.com%2Fpassword_and_security', ctx.jar, null, ctx.globalOptions)
71
- .then(function(data) {
72
- lsd = utils.getFrom(data.body, "[\"LSD\",[],{\"token\":\"", "\"}")
73
- Form_P1 = {
74
- lsd: lsd,
75
- fb_api_caller_class: 'RelayModern',
76
- fb_api_req_friendly_name: 'useEpsilonNavigateMutation',
77
- variables: JSON.stringify({
78
- input:{
79
- client_mutation_id:"1",
80
- actor_id: ctx.userId,
81
- step:"STEPPER_CONFIRMATION",
82
- token : JSON.stringify({
83
- sensitive_string_value: Find_And_Parse(data.body)
84
- })
85
- },
86
- scale:1
87
- }),
88
- server_timestamps: true,
89
- doc_id: 7414856831926043
90
- };
91
- })
92
- .then(function() {
93
- defaultFuncs.postFormData('https://www.facebook.com/api/graphql/', ctx.jar, Form_P1, {})
94
- .then(function(resp) {
95
- let checkpoint = resp.data.epsilon_navigate.epsilon_checkpoint;
96
- if (checkpoint.id == '__EPSILON_CLIENT__' && checkpoint.__typename == "EpsilonStepperScreen" && checkpoint.screen.next_screen == 'CONTACT_POINT_REVIEW' && checkpoint.screen.steps.length === 3 && checkpoint.screen.steps[1].active == true) {
97
- NextToken_P1 = checkpoint.screen.token;
98
- CanResolve_P1 = true;
99
- re(CanResolve_P1)
100
- }
101
- else {
102
- CanResolve_P1 = false;
103
- re(CanResolve_P1)
104
- }
105
- });
106
- })
107
- }
108
- catch (e) {
109
- rj(e);
110
- }
111
- })
112
-
113
- await Level_1();
114
-
115
- var CanResolve_P2;
116
- var NextToken_P2;
117
-
118
- const Level_2 = () => new Promise((re, rj) => {
119
- let Form_P2 = {
120
- doc_id: 7414856831926043,
121
- lsd: lsd,
122
- fb_api_caller_class: "RelayModern",
123
- fb_api_req_friendly_name: "useEpsilonNavigateMutation",
124
- server_timestamps: true,
125
- variables: JSON.stringify({
126
- input: {
127
- client_mutation_id: 2,
128
- actor_id: ctx.userId,
129
- step:"CONTACT_POINT_REVIEW",
130
- token: JSON.stringify({
131
- sensitive_string_value: NextToken_P1
132
- })
133
- },
134
- scale: 1
135
- })
136
- }
137
-
138
- defaultFuncs.postFormData('https://www.facebook.com/api/graphql/', ctx.jar, Form_P2, {}).then(function(resp) {
139
- let checkpoint = resp.data.epsilon_navigate.epsilon_checkpoint;
140
- if (checkpoint.id == '__EPSILON_CLIENT__' && checkpoint.__typename == "EpsilonContactPointReview" && checkpoint.screen.contact_points.length >= 1 && checkpoint.screen.contact_points[0].suspicious == "UNSUSPICIOUS") {
141
- NextToken_P2 = checkpoint.screen.token;
142
- CanResolve_P2 = true;
143
- re(CanResolve_P2)
144
- }
145
- else {
146
- CanResolve_P2 = false;
147
- re(CanResolve_P2)
148
- }
149
- });
150
- })
151
-
152
- if (CanResolve_P1 == true) await Level_2();
153
- else return CanResolve_P1;
154
-
155
- var CanResolve_P3;
156
- var NextToken_P3;
157
-
158
- const Level_3 = () => new Promise((re, rj) => {
159
- let Form_P3 ={
160
- doc_id: 7414856831926043,
161
- lsd: lsd,
162
- fb_api_caller_class: "RelayModern",
163
- fb_api_req_friendly_name: "useEpsilonNavigateMutation",
164
- server_timestamps: true,
165
- variables: JSON.stringify({
166
- input: {
167
- client_mutation_id: 3,
168
- actor_id: ctx.userId,
169
- step: "CHANGE_PASSWORD", //bro where's change password :d?
170
- token: JSON.stringify({
171
- sensitive_string_value: NextToken_P2
172
- })
173
- },
174
- scale:1
175
- })
176
- }
177
-
178
- defaultFuncs.postFormData('https://www.facebook.com/api/graphql/', ctx.jar, Form_P3, {}).then(function(resp) {
179
- let checkpoint = resp.data.epsilon_navigate.epsilon_checkpoint;
180
- if (checkpoint.id == '__EPSILON_CLIENT__' && checkpoint.__typename == "EpsilonLoginDetailsConfirmationScreen" && checkpoint.screen.contact_points.length >= 1) {
181
- NextToken_P3 = checkpoint.screen.token;
182
- CanResolve_P3 = true;
183
- re(CanResolve_P3)
184
- }
185
- else {
186
- CanResolve_P3 = false;
187
- rj(CanResolve_P3)
188
- }
189
- });
190
- })
191
-
192
- if (CanResolve_P2 == true) await Level_3();
193
- else return CanResolve_P2
194
-
195
- var CanResolve_P4;
196
- var NextToken_P4;
197
-
198
- const Level_Final = () => new Promise((re, rj) => {
199
- let Form_P4 ={
200
- doc_id: 7414856831926043,
201
- lsd: lsd,
202
- fb_api_caller_class: "RelayModern",
203
- fb_api_req_friendly_name: "useEpsilonNavigateMutation",
204
- server_timestamps: true,
205
- variables: JSON.stringify({
206
- input: {
207
- client_mutation_id: 4,
208
- actor_id: ctx.userId,
209
- step: "OUTRO",
210
- token: JSON.stringify({
211
- sensitive_string_value: NextToken_P3
212
- })
213
- },
214
- scale:1
215
- })
216
- }
217
-
218
- defaultFuncs.postFormData('https://www.facebook.com/api/graphql/', ctx.jar, Form_P4, {}).then(function(resp) {
219
- let checkpoint = resp.data.epsilon_navigate.epsilon_checkpoint;
220
- if (checkpoint.id == '__EPSILON_CLIENT__' && checkpoint.__typename == "EpsilonOutroScreen" && checkpoint.screen.fallback.uri == 'https://www.facebook.com/') {
221
- NextToken_P4 = checkpoint.screen.token;
222
- CanResolve_P4 = true;
223
- re(CanResolve_P4)
224
- }
225
- else {
226
- CanResolve_P4 = false;
227
- re(CanResolve_P4)
228
- }
229
- });
230
- });
231
-
232
- if (CanResolve_P3 == true) return await Level_Final();
233
- else return (CanResolve_P3);
1
+ /** By @KanzuWakazaki 03/05/2024 - DD/MM/YYYY */
2
+ // !Type - change password is not required
3
+ function Find_And_Parse(Data) {
4
+ const regex = /<script\s+type="application\/json"\s+data-content-len="([0-9]+)"\s+data-sjs\s*(.*?)\s*<\/script>/gs;
5
+ const matches = Data.matchAll(regex);
6
+ let Data_resp;
7
+ for (const match of matches) {
8
+ if (JSON.parse(JSON.stringify((match[2]))).includes('any_eligible_challenges')) {
9
+ const Data_ = JSON.parse(match[2].replace('>', ''))
10
+ Data_resp = findAnyEligibleChallengesAndSiblings(Data_)
11
+ }
12
+
13
+ }
14
+
15
+
16
+ function findAnyEligibleChallengesAndSiblings(data) {
17
+ const screenData = findScreenData(data);
18
+ if (!screenData) {
19
+ return null;
20
+ }
21
+
22
+ const siblings = {};
23
+ for (const [key, value] of Object.entries(screenData)) {
24
+ if (key === 'any_eligible_challenges') {
25
+ siblings[key] = value;
26
+ }
27
+ else {
28
+ siblings[key] = value;
29
+ }
30
+ }
31
+
32
+ return siblings;
33
+ }
34
+
35
+ function findScreenData(data) {
36
+ if (Array.isArray(data)) {
37
+ for (const item of data) {
38
+ const result = findScreenData(item);
39
+ if (result) {
40
+ return result;
41
+ }
42
+ }
43
+ }
44
+ else if (typeof data === 'object' && data !== null) {
45
+ if (data.screen) {
46
+ return data.screen;
47
+ }
48
+ for (const value of Object.values(data)) {
49
+ const result = findScreenData(value);
50
+ if (result) {
51
+ return result;
52
+ }
53
+ }
54
+ }
55
+ return null;
56
+ }
57
+ return Data_resp.token || null
58
+ }
59
+
60
+ module.exports.Check = Find_And_Parse
61
+ module.exports.Cook_And_Work = async function(ctx, defaultFuncs) {
62
+ const utils = require('../../../utils');
63
+ var Form_P1;
64
+ var CanResolve_P1;
65
+ var NextToken_P1;
66
+ var lsd;
67
+
68
+ const Level_1 = () => new Promise((re, rj) => {
69
+ try {
70
+ utils.get('https://www.facebook.com/checkpoint/828281030927956/?next=https%3A%2F%2Faccountscenter.facebook.com%2Fpassword_and_security', ctx.jar, null, ctx.globalOptions)
71
+ .then(function(data) {
72
+ lsd = utils.getFrom(data.body, "[\"LSD\",[],{\"token\":\"", "\"}")
73
+ Form_P1 = {
74
+ lsd: lsd,
75
+ fb_api_caller_class: 'RelayModern',
76
+ fb_api_req_friendly_name: 'useEpsilonNavigateMutation',
77
+ variables: JSON.stringify({
78
+ input:{
79
+ client_mutation_id:"1",
80
+ actor_id: ctx.userId,
81
+ step:"STEPPER_CONFIRMATION",
82
+ token : JSON.stringify({
83
+ sensitive_string_value: Find_And_Parse(data.body)
84
+ })
85
+ },
86
+ scale:1
87
+ }),
88
+ server_timestamps: true,
89
+ doc_id: 7414856831926043
90
+ };
91
+ })
92
+ .then(function() {
93
+ defaultFuncs.postFormData('https://www.facebook.com/api/graphql/', ctx.jar, Form_P1, {})
94
+ .then(function(resp) {
95
+ let checkpoint = resp.data.epsilon_navigate.epsilon_checkpoint;
96
+ if (checkpoint.id == '__EPSILON_CLIENT__' && checkpoint.__typename == "EpsilonStepperScreen" && checkpoint.screen.next_screen == 'CONTACT_POINT_REVIEW' && checkpoint.screen.steps.length === 3 && checkpoint.screen.steps[1].active == true) {
97
+ NextToken_P1 = checkpoint.screen.token;
98
+ CanResolve_P1 = true;
99
+ re(CanResolve_P1)
100
+ }
101
+ else {
102
+ CanResolve_P1 = false;
103
+ re(CanResolve_P1)
104
+ }
105
+ });
106
+ })
107
+ }
108
+ catch (e) {
109
+ rj(e);
110
+ }
111
+ })
112
+
113
+ await Level_1();
114
+
115
+ var CanResolve_P2;
116
+ var NextToken_P2;
117
+
118
+ const Level_2 = () => new Promise((re, rj) => {
119
+ let Form_P2 = {
120
+ doc_id: 7414856831926043,
121
+ lsd: lsd,
122
+ fb_api_caller_class: "RelayModern",
123
+ fb_api_req_friendly_name: "useEpsilonNavigateMutation",
124
+ server_timestamps: true,
125
+ variables: JSON.stringify({
126
+ input: {
127
+ client_mutation_id: 2,
128
+ actor_id: ctx.userId,
129
+ step:"CONTACT_POINT_REVIEW",
130
+ token: JSON.stringify({
131
+ sensitive_string_value: NextToken_P1
132
+ })
133
+ },
134
+ scale: 1
135
+ })
136
+ }
137
+
138
+ defaultFuncs.postFormData('https://www.facebook.com/api/graphql/', ctx.jar, Form_P2, {}).then(function(resp) {
139
+ let checkpoint = resp.data.epsilon_navigate.epsilon_checkpoint;
140
+ if (checkpoint.id == '__EPSILON_CLIENT__' && checkpoint.__typename == "EpsilonContactPointReview" && checkpoint.screen.contact_points.length >= 1 && checkpoint.screen.contact_points[0].suspicious == "UNSUSPICIOUS") {
141
+ NextToken_P2 = checkpoint.screen.token;
142
+ CanResolve_P2 = true;
143
+ re(CanResolve_P2)
144
+ }
145
+ else {
146
+ CanResolve_P2 = false;
147
+ re(CanResolve_P2)
148
+ }
149
+ });
150
+ })
151
+
152
+ if (CanResolve_P1 == true) await Level_2();
153
+ else return CanResolve_P1;
154
+
155
+ var CanResolve_P3;
156
+ var NextToken_P3;
157
+
158
+ const Level_3 = () => new Promise((re, rj) => {
159
+ let Form_P3 ={
160
+ doc_id: 7414856831926043,
161
+ lsd: lsd,
162
+ fb_api_caller_class: "RelayModern",
163
+ fb_api_req_friendly_name: "useEpsilonNavigateMutation",
164
+ server_timestamps: true,
165
+ variables: JSON.stringify({
166
+ input: {
167
+ client_mutation_id: 3,
168
+ actor_id: ctx.userId,
169
+ step: "CHANGE_PASSWORD", //bro where's change password :d?
170
+ token: JSON.stringify({
171
+ sensitive_string_value: NextToken_P2
172
+ })
173
+ },
174
+ scale:1
175
+ })
176
+ }
177
+
178
+ defaultFuncs.postFormData('https://www.facebook.com/api/graphql/', ctx.jar, Form_P3, {}).then(function(resp) {
179
+ let checkpoint = resp.data.epsilon_navigate.epsilon_checkpoint;
180
+ if (checkpoint.id == '__EPSILON_CLIENT__' && checkpoint.__typename == "EpsilonLoginDetailsConfirmationScreen" && checkpoint.screen.contact_points.length >= 1) {
181
+ NextToken_P3 = checkpoint.screen.token;
182
+ CanResolve_P3 = true;
183
+ re(CanResolve_P3)
184
+ }
185
+ else {
186
+ CanResolve_P3 = false;
187
+ rj(CanResolve_P3)
188
+ }
189
+ });
190
+ })
191
+
192
+ if (CanResolve_P2 == true) await Level_3();
193
+ else return CanResolve_P2
194
+
195
+ var CanResolve_P4;
196
+ var NextToken_P4;
197
+
198
+ const Level_Final = () => new Promise((re, rj) => {
199
+ let Form_P4 ={
200
+ doc_id: 7414856831926043,
201
+ lsd: lsd,
202
+ fb_api_caller_class: "RelayModern",
203
+ fb_api_req_friendly_name: "useEpsilonNavigateMutation",
204
+ server_timestamps: true,
205
+ variables: JSON.stringify({
206
+ input: {
207
+ client_mutation_id: 4,
208
+ actor_id: ctx.userId,
209
+ step: "OUTRO",
210
+ token: JSON.stringify({
211
+ sensitive_string_value: NextToken_P3
212
+ })
213
+ },
214
+ scale:1
215
+ })
216
+ }
217
+
218
+ defaultFuncs.postFormData('https://www.facebook.com/api/graphql/', ctx.jar, Form_P4, {}).then(function(resp) {
219
+ let checkpoint = resp.data.epsilon_navigate.epsilon_checkpoint;
220
+ if (checkpoint.id == '__EPSILON_CLIENT__' && checkpoint.__typename == "EpsilonOutroScreen" && checkpoint.screen.fallback.uri == 'https://www.facebook.com/') {
221
+ NextToken_P4 = checkpoint.screen.token;
222
+ CanResolve_P4 = true;
223
+ re(CanResolve_P4)
224
+ }
225
+ else {
226
+ CanResolve_P4 = false;
227
+ re(CanResolve_P4)
228
+ }
229
+ });
230
+ });
231
+
232
+ if (CanResolve_P3 == true) return await Level_Final();
233
+ else return (CanResolve_P3);
234
234
  }