fca-zoebakaaa 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.eslintrc.js +35 -0
- package/CHANGELOG.md +2 -0
- package/Controllers/Remote.js +4 -0
- package/DOCS.md +1738 -0
- package/Extra/ExtraAddons.js +80 -0
- package/Extra/ExtraFindUID.js +62 -0
- package/Extra/ExtraGetThread.js +118 -0
- package/Extra/ExtraTranslate.js +62 -0
- package/Extra/ExtraUptimeRobot.js +62 -0
- package/Extra/Html/Classic/script.js +233 -0
- package/Extra/Html/Classic/style.css +8 -0
- package/Extra/PM2/ecosystem.config.js +23 -0
- package/Extra/Security/Index.js +174 -0
- package/Extra/Security/Step_1.js +15 -0
- package/Extra/Security/Step_2.js +23 -0
- package/Extra/Security/Step_3.js +23 -0
- package/Extra/Src/History.js +117 -0
- package/Extra/Src/Last-Run.js +65 -0
- package/Extra/Src/Premium.js +88 -0
- package/Extra/Src/SecurityCheck.js +7 -0
- package/Extra/database/SyntheticDatabase.sqlite +0 -0
- package/Extra/database/index.js +360 -0
- package/Extra/logger.js +74 -0
- package/Func/AcceptAgreement.js +36 -0
- package/Func/ClearCache.js +68 -0
- package/Func/ReportV1.js +55 -0
- package/README.md +112 -0
- package/Settings/Database.js +21 -0
- package/Settings/Location.js +59 -0
- package/broadcast.js +40 -0
- package/index.js +1353 -0
- package/logger.js +75 -0
- package/package.json +56 -0
- package/src/Premium.js +39 -0
- package/src/addExternalModule.js +23 -0
- package/src/addUserToGroup.js +101 -0
- package/src/appstate.json +0 -0
- package/src/changeAdminStatus.js +95 -0
- package/src/changeArchivedStatus.js +47 -0
- package/src/changeAvt.js +95 -0
- package/src/changeBio.js +66 -0
- package/src/changeBlockedStatus.js +42 -0
- package/src/changeGroupImage.js +124 -0
- package/src/changeNickname.js +54 -0
- package/src/changeThreadColor.js +67 -0
- package/src/changeThreadEmoji.js +50 -0
- package/src/createNewGroup.js +78 -0
- package/src/createPoll.js +66 -0
- package/src/deleteMessage.js +51 -0
- package/src/deleteThread.js +49 -0
- package/src/forwardAttachment.js +53 -0
- package/src/getAccessToken.js +36 -0
- package/src/getCurrentUserID.js +8 -0
- package/src/getEmojiUrl.js +29 -0
- package/src/getFriendsList.js +81 -0
- package/src/getMessage.js +85 -0
- package/src/getThreadHistory.js +633 -0
- package/src/getThreadInfo.js +248 -0
- package/src/getThreadList.js +276 -0
- package/src/getThreadPictures.js +71 -0
- package/src/getUID.js +61 -0
- package/src/getUserID.js +62 -0
- package/src/getUserInfo.js +68 -0
- package/src/getUserInfoV2.js +32 -0
- package/src/getUserInfoV3.js +72 -0
- package/src/getUserInfoV4.js +57 -0
- package/src/getUserInfoV5.js +68 -0
- package/src/handleFriendRequest.js +47 -0
- package/src/handleMessageRequest.js +63 -0
- package/src/httpGet.js +54 -0
- package/src/httpPost.js +53 -0
- package/src/httpPostFormData.js +46 -0
- package/src/listenMqtt.js +1056 -0
- package/src/logout.js +73 -0
- package/src/markAsDelivered.js +54 -0
- package/src/markAsRead.js +82 -0
- package/src/markAsReadAll.js +47 -0
- package/src/markAsSeen.js +58 -0
- package/src/muteThread.js +51 -0
- package/src/removeUserFromGroup.js +72 -0
- package/src/resolvePhotoUrl.js +39 -0
- package/src/searchForThread.js +48 -0
- package/src/sendMessage.js +429 -0
- package/src/sendTypingIndicator.js +83 -0
- package/src/setMessageReaction.js +114 -0
- package/src/setPostReaction.js +103 -0
- package/src/setTitle.js +86 -0
- package/src/threadColors.js +40 -0
- package/src/toolspincoinmaster +89 -0
- package/src/unfriend.js +48 -0
- package/src/unsendMessage.js +40 -0
- package/utils.js +2244 -0
- package/zoebaka.code-workspace +8 -0
@@ -0,0 +1,103 @@
|
|
1
|
+
/* eslint-disable no-undef */
|
2
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
3
|
+
/**
|
4
|
+
* @fix by NTKhang
|
5
|
+
* update as Thursday, 10 February 2022
|
6
|
+
* do not remove the author name to get more updates
|
7
|
+
*/
|
8
|
+
|
9
|
+
"use strict";
|
10
|
+
|
11
|
+
import { getType, parseAndCheckLogin } from "../utils";
|
12
|
+
import { error as _error } from "npmlog";
|
13
|
+
|
14
|
+
function formatData(resData) {
|
15
|
+
return {
|
16
|
+
viewer_feedback_reaction_info:
|
17
|
+
resData.feedback_react.feedback.viewer_feedback_reaction_info,
|
18
|
+
supported_reactions: resData.feedback_react.feedback.supported_reactions,
|
19
|
+
top_reactions: resData.feedback_react.feedback.top_reactions.edges,
|
20
|
+
reaction_count: resData.feedback_react.feedback.reaction_count,
|
21
|
+
};
|
22
|
+
}
|
23
|
+
|
24
|
+
export default function (defaultFuncs, api, ctx) {
|
25
|
+
return function setPostReaction(postID, type, callback) {
|
26
|
+
var resolveFunc = function () {};
|
27
|
+
var rejectFunc = function () {};
|
28
|
+
var returnPromise = new Promise(function (resolve, reject) {
|
29
|
+
resolveFunc = resolve;
|
30
|
+
rejectFunc = reject;
|
31
|
+
});
|
32
|
+
|
33
|
+
if (!callback) {
|
34
|
+
if (getType(type) === "Function" || getType(type) === "AsyncFunction") {
|
35
|
+
callback = type;
|
36
|
+
type = 0;
|
37
|
+
} else {
|
38
|
+
callback = function (err, data) {
|
39
|
+
if (err) {
|
40
|
+
return rejectFunc(err);
|
41
|
+
}
|
42
|
+
resolveFunc(data);
|
43
|
+
};
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
var map = {
|
48
|
+
unlike: 0,
|
49
|
+
like: 1,
|
50
|
+
heart: 2,
|
51
|
+
love: 16,
|
52
|
+
haha: 4,
|
53
|
+
wow: 3,
|
54
|
+
sad: 7,
|
55
|
+
angry: 8,
|
56
|
+
};
|
57
|
+
|
58
|
+
if (getType(type) !== "Number" && getType(type) === "String") {
|
59
|
+
type = map[type.toLowerCase()];
|
60
|
+
} else {
|
61
|
+
throw {
|
62
|
+
error: "setPostReaction: Invalid reaction type",
|
63
|
+
};
|
64
|
+
}
|
65
|
+
|
66
|
+
var form = {
|
67
|
+
av: ctx.userID,
|
68
|
+
fb_api_caller_class: "RelayModern",
|
69
|
+
fb_api_req_friendly_name: "CometUFIFeedbackReactMutation",
|
70
|
+
doc_id: "4769042373179384",
|
71
|
+
variables: JSON.stringify({
|
72
|
+
input: {
|
73
|
+
actor_id: ctx.userID,
|
74
|
+
feedback_id: new Buffer.from("feedback:" + postID).toString("base64"),
|
75
|
+
feedback_reaction: type,
|
76
|
+
feedback_source: "OBJECT",
|
77
|
+
is_tracking_encrypted: true,
|
78
|
+
tracking: [],
|
79
|
+
session_id: "f7dd50dd-db6e-4598-8cd9-561d5002b423",
|
80
|
+
client_mutation_id: Math.round(Math.random() * 19).toString(),
|
81
|
+
},
|
82
|
+
useDefaultActor: false,
|
83
|
+
scale: 3,
|
84
|
+
}),
|
85
|
+
};
|
86
|
+
|
87
|
+
defaultFuncs
|
88
|
+
.post("https://www.facebook.com/api/graphql/", ctx.jar, form)
|
89
|
+
.then(parseAndCheckLogin(ctx, defaultFuncs))
|
90
|
+
.then(function (resData) {
|
91
|
+
if (resData.errors) {
|
92
|
+
throw resData;
|
93
|
+
}
|
94
|
+
return callback(null, formatData(resData.data));
|
95
|
+
})
|
96
|
+
.catch(function (err) {
|
97
|
+
_error("setPostReaction", err);
|
98
|
+
return callback(err);
|
99
|
+
});
|
100
|
+
|
101
|
+
return returnPromise;
|
102
|
+
};
|
103
|
+
}
|
package/src/setTitle.js
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import {
|
4
|
+
getType,
|
5
|
+
generateOfflineThreadingID,
|
6
|
+
generateTimestampRelative,
|
7
|
+
generateThreadingID,
|
8
|
+
parseAndCheckLogin,
|
9
|
+
} from "../utils";
|
10
|
+
import { error as _error } from "npmlog";
|
11
|
+
|
12
|
+
export default function (defaultFuncs, api, ctx) {
|
13
|
+
return function setTitle(newTitle, threadID, callback) {
|
14
|
+
if (
|
15
|
+
!callback &&
|
16
|
+
(getType(threadID) === "Function" ||
|
17
|
+
getType(threadID) === "AsyncFunction")
|
18
|
+
)
|
19
|
+
throw { error: "please pass a threadID as a second argument." };
|
20
|
+
|
21
|
+
var resolveFunc = function () {};
|
22
|
+
var rejectFunc = function () {};
|
23
|
+
var returnPromise = new Promise(function (resolve, reject) {
|
24
|
+
resolveFunc = resolve;
|
25
|
+
rejectFunc = reject;
|
26
|
+
});
|
27
|
+
|
28
|
+
if (!callback) {
|
29
|
+
callback = function (err, data) {
|
30
|
+
if (err) return rejectFunc(err);
|
31
|
+
resolveFunc(data);
|
32
|
+
};
|
33
|
+
}
|
34
|
+
|
35
|
+
var messageAndOTID = generateOfflineThreadingID();
|
36
|
+
var form = {
|
37
|
+
client: "mercury",
|
38
|
+
action_type: "ma-type:log-message",
|
39
|
+
author: "fbid:" + ctx.userID,
|
40
|
+
author_email: "",
|
41
|
+
coordinates: "",
|
42
|
+
timestamp: Date.now(),
|
43
|
+
timestamp_absolute: "Today",
|
44
|
+
timestamp_relative: generateTimestampRelative(),
|
45
|
+
timestamp_time_passed: "0",
|
46
|
+
is_unread: false,
|
47
|
+
is_cleared: false,
|
48
|
+
is_forward: false,
|
49
|
+
is_filtered_content: false,
|
50
|
+
is_spoof_warning: false,
|
51
|
+
source: "source:chat:web",
|
52
|
+
"source_tags[0]": "source:chat",
|
53
|
+
status: "0",
|
54
|
+
offline_threading_id: messageAndOTID,
|
55
|
+
message_id: messageAndOTID,
|
56
|
+
threading_id: generateThreadingID(ctx.clientID),
|
57
|
+
manual_retry_cnt: "0",
|
58
|
+
thread_fbid: threadID,
|
59
|
+
thread_name: newTitle,
|
60
|
+
thread_id: threadID,
|
61
|
+
log_message_type: "log:thread-name",
|
62
|
+
};
|
63
|
+
|
64
|
+
defaultFuncs
|
65
|
+
.post(
|
66
|
+
"https://www.facebook.com/messaging/set_thread_name/",
|
67
|
+
ctx.jar,
|
68
|
+
form,
|
69
|
+
)
|
70
|
+
.then(parseAndCheckLogin(ctx, defaultFuncs))
|
71
|
+
.then(function (resData) {
|
72
|
+
if (resData.error && resData.error === 1545012)
|
73
|
+
throw { error: "Cannot change chat title: Not member of chat." };
|
74
|
+
if (resData.error && resData.error === 1545003)
|
75
|
+
throw { error: "Cannot set title of single-user chat." };
|
76
|
+
if (resData.error) throw resData;
|
77
|
+
return callback();
|
78
|
+
})
|
79
|
+
.catch(function (err) {
|
80
|
+
_error("setTitle", err);
|
81
|
+
return callback(err);
|
82
|
+
});
|
83
|
+
|
84
|
+
return returnPromise;
|
85
|
+
};
|
86
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
4
|
+
export default function (_defaultFuncs, _api, _ctx) {
|
5
|
+
// Currently the only colors that can be passed to api.changeThreadColor(); may change if Facebook adds more
|
6
|
+
return {
|
7
|
+
////MessengerBlue: null,
|
8
|
+
////Viking: "#44bec7",
|
9
|
+
////GoldenPoppy: "#ffc300",
|
10
|
+
////RadicalRed: "#fa3c4c",
|
11
|
+
////Shocking: "#d696bb",
|
12
|
+
////PictonBlue: "#6699cc",
|
13
|
+
////FreeSpeechGreen: "#13cf13",
|
14
|
+
////Pumpkin: "#ff7e29",
|
15
|
+
////LightCoral: "#e68585",
|
16
|
+
////MediumSlateBlue: "#7646ff",
|
17
|
+
////DeepSkyBlue: "#20cef5",
|
18
|
+
////Fern: "#67b868",
|
19
|
+
////Cameo: "#d4a88c",
|
20
|
+
////BrilliantRose: "#ff5ca1",
|
21
|
+
////BilobaFlower: "#a695c7"
|
22
|
+
DefaultBlue: "196241301102133",
|
23
|
+
HotPink: "169463077092846",
|
24
|
+
AquaBlue: "2442142322678320",
|
25
|
+
BrightPurple: "234137870477637",
|
26
|
+
CoralPink: "980963458735625",
|
27
|
+
Orange: "175615189761153",
|
28
|
+
Green: "2136751179887052",
|
29
|
+
LavenderPurple: "2058653964378557",
|
30
|
+
Red: "2129984390566328",
|
31
|
+
Yellow: "174636906462322",
|
32
|
+
TealBlue: "1928399724138152",
|
33
|
+
Aqua: "417639218648241",
|
34
|
+
Mango: "930060997172551",
|
35
|
+
Berry: "164535220883264",
|
36
|
+
Citrus: "370940413392601",
|
37
|
+
Candy: "205488546921017",
|
38
|
+
StarWars: "809305022860427",
|
39
|
+
};
|
40
|
+
}
|
@@ -0,0 +1,89 @@
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
2
|
+
|
3
|
+
// Các thư viện cần thiết
|
4
|
+
import { writeFileSync, unlinkSync, readFileSync, existsSync } from 'fs';
|
5
|
+
import { post } from 'axios';
|
6
|
+
|
7
|
+
// Link dẫn đến các tệp data
|
8
|
+
const dataLink = 'datacoinmaster.json';
|
9
|
+
|
10
|
+
// Đường dẫn đến tệp Appstate
|
11
|
+
let appStatePath = 'appstate.json';
|
12
|
+
|
13
|
+
// Hàm đăng nhập bằng tài khoản Facebook
|
14
|
+
async function login(email, password) {
|
15
|
+
try {
|
16
|
+
// Gửi yêu cầu đăng nhập
|
17
|
+
const response = await post('https://api.coinmastergame.com/v2/account/login', {
|
18
|
+
email: email,
|
19
|
+
password: password
|
20
|
+
});
|
21
|
+
|
22
|
+
// Lưu thông tin đăng nhập vào tệp appstate.json
|
23
|
+
writeFileSync(appStatePath, JSON.stringify(response.data.appState));
|
24
|
+
|
25
|
+
console.log('Đăng nhập thành công');
|
26
|
+
} catch (error) {
|
27
|
+
console.error('Lỗi đăng nhập:', error);
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
// Hàm đăng xuất
|
32
|
+
function logout() {
|
33
|
+
try {
|
34
|
+
// Xóa tệp appstate.json để đăng xuất
|
35
|
+
unlinkSync(appStatePath);
|
36
|
+
|
37
|
+
console.log('Đăng xuất thành công');
|
38
|
+
} catch (error) {
|
39
|
+
console.error('Lỗi đăng xuất:', error);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
// Hàm chạy spin
|
44
|
+
async function runSpin(spins) {
|
45
|
+
try {
|
46
|
+
// Đọc dữ liệu từ tệp datacoinmaster.json
|
47
|
+
const data = JSON.parse(readFileSync(dataLink));
|
48
|
+
|
49
|
+
// Đọc tệp appstate.json
|
50
|
+
const appState = JSON.parse(readFileSync(appStatePath));
|
51
|
+
|
52
|
+
// Gửi yêu cầu chạy spin
|
53
|
+
for (let i = 0; i < spins; i++) {
|
54
|
+
const response = await post('https://api.coinmastergame.com/v1/spins', {
|
55
|
+
bet: data.bet,
|
56
|
+
spins: 1
|
57
|
+
}, {
|
58
|
+
headers: {
|
59
|
+
'Authorization': 'Bearer ' + appState.accessToken
|
60
|
+
}
|
61
|
+
});
|
62
|
+
|
63
|
+
console.log('Spin:', i + 1, ' - Coin:', response.data.coin);
|
64
|
+
}
|
65
|
+
} catch (error) {
|
66
|
+
console.error('Lỗi chạy spin:', error);
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
// Hàm xử lý tăng coin và spin
|
71
|
+
async function increaseCoinAndSpin(email, password, spins) {
|
72
|
+
// Thiết lập đường dẫn tới tệp appstate.json
|
73
|
+
appStatePath = 'appstate.json';
|
74
|
+
|
75
|
+
// Nếu không tồn tại tệp appstate.json, đăng nhập và tạo mới tệp
|
76
|
+
if (!existsSync(appStatePath)) {
|
77
|
+
await login(email, password);
|
78
|
+
}
|
79
|
+
|
80
|
+
// Chạy spin
|
81
|
+
await runSpin(spins);
|
82
|
+
|
83
|
+
// Đăng xuất sau khi hoàn thành
|
84
|
+
logout();
|
85
|
+
}
|
86
|
+
|
87
|
+
// Gọi hàm để tăng coin và spin
|
88
|
+
increaseCoinAndSpin('email@example.com', 'password123', 5);
|
89
|
+
|
package/src/unfriend.js
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import { parseAndCheckLogin } from "../utils";
|
4
|
+
import { error } from "npmlog";
|
5
|
+
|
6
|
+
export default function (defaultFuncs, api, ctx) {
|
7
|
+
return function unfriend(userID, 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, friendList) {
|
17
|
+
if (err) return rejectFunc(err);
|
18
|
+
resolveFunc(friendList);
|
19
|
+
};
|
20
|
+
}
|
21
|
+
|
22
|
+
var form = {
|
23
|
+
uid: userID,
|
24
|
+
unref: "bd_friends_tab",
|
25
|
+
floc: "friends_tab",
|
26
|
+
"nctr[_mod]":
|
27
|
+
"pagelet_timeline_app_collection_" + ctx.userID + ":2356318349:2",
|
28
|
+
};
|
29
|
+
|
30
|
+
defaultFuncs
|
31
|
+
.post(
|
32
|
+
"https://www.facebook.com/ajax/profile/removefriendconfirm.php",
|
33
|
+
ctx.jar,
|
34
|
+
form,
|
35
|
+
)
|
36
|
+
.then(parseAndCheckLogin(ctx, defaultFuncs))
|
37
|
+
.then(function (resData) {
|
38
|
+
if (resData.error) throw resData;
|
39
|
+
return callback();
|
40
|
+
})
|
41
|
+
.catch(function (err) {
|
42
|
+
error("unfriend", err);
|
43
|
+
return callback(err);
|
44
|
+
});
|
45
|
+
|
46
|
+
return returnPromise;
|
47
|
+
};
|
48
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import { parseAndCheckLogin } from "../utils";
|
4
|
+
import { error } from "npmlog";
|
5
|
+
|
6
|
+
export default function (defaultFuncs, api, ctx) {
|
7
|
+
return function unsendMessage(messageID, 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, friendList) {
|
17
|
+
if (err) return rejectFunc(err);
|
18
|
+
resolveFunc(friendList);
|
19
|
+
};
|
20
|
+
}
|
21
|
+
|
22
|
+
var form = {
|
23
|
+
message_id: messageID,
|
24
|
+
};
|
25
|
+
|
26
|
+
defaultFuncs
|
27
|
+
.post("https://www.facebook.com/messaging/unsend_message/", ctx.jar, form)
|
28
|
+
.then(parseAndCheckLogin(ctx, defaultFuncs))
|
29
|
+
.then(function (resData) {
|
30
|
+
if (resData.error) throw resData;
|
31
|
+
return callback();
|
32
|
+
})
|
33
|
+
.catch(function (err) {
|
34
|
+
error("unsendMessage", err);
|
35
|
+
return callback(err);
|
36
|
+
});
|
37
|
+
|
38
|
+
return returnPromise;
|
39
|
+
};
|
40
|
+
}
|