|
1 | 1 | /* eslint-disable */ |
2 | 2 |
|
3 | 3 | // Node.js 22.12.0+ is required for native ESM support |
4 | | -const { login, Utils } = require('meta-messenger.js'); |
| 4 | +const { login, Utils } = require("meta-messenger.js"); |
5 | 5 |
|
6 | 6 | login( |
7 | | - // C3C UFC Utility / EditThisCookie |
8 | | - Utils.parseCookies([ |
9 | | - { |
10 | | - domain: '.facebook.com', |
11 | | - expirationDate: 1000000000, |
12 | | - hostOnly: false, |
13 | | - httpOnly: false, |
14 | | - name: 'c_user', |
15 | | - path: '/', |
16 | | - sameSite: 'no_restriction', |
17 | | - secure: true, |
18 | | - session: false, |
19 | | - storeId: '1', |
20 | | - value: '<uid>', |
21 | | - id: 1, |
22 | | - }, |
23 | | - { |
24 | | - domain: '.facebook.com', |
25 | | - expirationDate: 1000000000, |
26 | | - hostOnly: false, |
27 | | - httpOnly: true, |
28 | | - name: 'datr', |
29 | | - path: '/', |
30 | | - sameSite: 'no_restriction', |
31 | | - secure: true, |
32 | | - session: false, |
33 | | - storeId: '1', |
34 | | - value: '<secret>', |
35 | | - id: 2, |
36 | | - }, |
37 | | - { |
38 | | - domain: '.facebook.com', |
39 | | - expirationDate: 1000000000, |
40 | | - hostOnly: false, |
41 | | - httpOnly: true, |
42 | | - name: 'fr', |
43 | | - path: '/', |
44 | | - sameSite: 'no_restriction', |
45 | | - secure: true, |
46 | | - session: false, |
47 | | - storeId: '1', |
48 | | - value: '<secret>', |
49 | | - id: 3, |
50 | | - }, |
51 | | - { |
52 | | - domain: '.facebook.com', |
53 | | - expirationDate: 1000000000, |
54 | | - hostOnly: false, |
55 | | - httpOnly: true, |
56 | | - name: 'xs', |
57 | | - path: '/', |
58 | | - sameSite: 'no_restriction', |
59 | | - secure: true, |
60 | | - session: false, |
61 | | - storeId: '1', |
62 | | - value: '<secret>', |
63 | | - id: 4, |
64 | | - }, |
65 | | - ]), |
66 | | -).then((api) => { |
67 | | - api.on('fullyReady', () => { |
68 | | - console.log(`Logged in as ${api.user.name} (${api.currentUserId})`); |
69 | | - }); |
70 | | - api.on('message', (message) => { |
71 | | - if (message.senderId === api.currentUserId) return; |
72 | | - api.sendMessage(message.threadId, `You said: ${message.text}`); |
73 | | - }); |
74 | | - api.on('e2eeMessage', (message) => { |
75 | | - if (message.senderId === api.currentUserId) return; |
76 | | - api.sendE2EEMessage( |
77 | | - message.chatJid, |
78 | | - `You said (e2ee): ${message.text}`, |
79 | | - ); |
80 | | - }); |
| 7 | + // C3C UFC Utility / EditThisCookie |
| 8 | + Utils.parseCookies([ |
| 9 | + { |
| 10 | + domain: ".facebook.com", |
| 11 | + expirationDate: 1000000000, |
| 12 | + hostOnly: false, |
| 13 | + httpOnly: false, |
| 14 | + name: "c_user", |
| 15 | + path: "/", |
| 16 | + sameSite: "no_restriction", |
| 17 | + secure: true, |
| 18 | + session: false, |
| 19 | + storeId: "1", |
| 20 | + value: "<uid>", |
| 21 | + id: 1, |
| 22 | + }, |
| 23 | + { |
| 24 | + domain: ".facebook.com", |
| 25 | + expirationDate: 1000000000, |
| 26 | + hostOnly: false, |
| 27 | + httpOnly: true, |
| 28 | + name: "datr", |
| 29 | + path: "/", |
| 30 | + sameSite: "no_restriction", |
| 31 | + secure: true, |
| 32 | + session: false, |
| 33 | + storeId: "1", |
| 34 | + value: "<secret>", |
| 35 | + id: 2, |
| 36 | + }, |
| 37 | + { |
| 38 | + domain: ".facebook.com", |
| 39 | + expirationDate: 1000000000, |
| 40 | + hostOnly: false, |
| 41 | + httpOnly: true, |
| 42 | + name: "fr", |
| 43 | + path: "/", |
| 44 | + sameSite: "no_restriction", |
| 45 | + secure: true, |
| 46 | + session: false, |
| 47 | + storeId: "1", |
| 48 | + value: "<secret>", |
| 49 | + id: 3, |
| 50 | + }, |
| 51 | + { |
| 52 | + domain: ".facebook.com", |
| 53 | + expirationDate: 1000000000, |
| 54 | + hostOnly: false, |
| 55 | + httpOnly: true, |
| 56 | + name: "xs", |
| 57 | + path: "/", |
| 58 | + sameSite: "no_restriction", |
| 59 | + secure: true, |
| 60 | + session: false, |
| 61 | + storeId: "1", |
| 62 | + value: "<secret>", |
| 63 | + id: 4, |
| 64 | + }, |
| 65 | + ]), |
| 66 | +).then(api => { |
| 67 | + api.on("fullyReady", () => { |
| 68 | + console.log(`Logged in as ${api.user.name} (${api.currentUserId})`); |
| 69 | + }); |
| 70 | + api.on("message", message => { |
| 71 | + if (message.senderId === api.currentUserId) return; |
| 72 | + api.sendMessage(message.threadId, `You said: ${message.text}`); |
| 73 | + }); |
| 74 | + api.on("e2eeMessage", message => { |
| 75 | + if (message.senderId === api.currentUserId) return; |
| 76 | + api.sendE2EEMessage(message.chatJid, `You said (e2ee): ${message.text}`); |
| 77 | + }); |
81 | 78 | }); |
0 commit comments