gj-boomlings-api 1.5.7 → 2.0.1
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.
- package/LICENSE +1 -1
- package/README.md +31 -7
- package/functions/blockUser.js +29 -30
- package/functions/deleteAccountPost.js +22 -32
- package/functions/deleteComment.js +20 -20
- package/functions/deleteLevel.js +23 -29
- package/functions/dlLevel.js +157 -6
- package/functions/dlMessage.js +30 -36
- package/functions/getAccountPosts.js +23 -36
- package/functions/getBlockedList.js +47 -63
- package/functions/getCommentHistory.js +59 -39
- package/functions/getComments.js +46 -27
- package/functions/getCreatorScores.js +18 -30
- package/functions/getDailyLevel.js +5 -9
- package/functions/getFriendsList.js +48 -56
- package/functions/getGauntlets.js +18 -24
- package/functions/getLevelByID.js +9 -156
- package/functions/getLevelScores.js +63 -46
- package/functions/getMapPacks.js +40 -28
- package/functions/getMessages.js +36 -41
- package/functions/getOfficialSongInfo.js +9 -87
- package/functions/getProfile.js +159 -7
- package/functions/getSongInfo.js +22 -31
- package/functions/getSongsLibrary.js +80 -0
- package/functions/getTab.js +16 -7
- package/functions/getTop100.js +18 -27
- package/functions/getTopLists.js +14 -0
- package/functions/getUserLevels.js +24 -88
- package/functions/getWeeklyDemon.js +5 -9
- package/functions/reportLevel.js +9 -22
- package/functions/searchLevels.js +15 -84
- package/functions/searchLists.js +15 -0
- package/functions/unblockUser.js +29 -30
- package/functions/updateLevelDesc.js +27 -43
- package/functions/uploadAccountPost.js +23 -36
- package/functions/uploadComment.js +43 -57
- package/functions/uploadMessage.js +32 -41
- package/gjReq.js +18 -0
- package/index.js +36 -1
- package/misc/GJDecode.js +210 -1
- package/misc/colors.json +1 -1
- package/misc/gauntlets.json +1 -0
- package/misc/officialsongs.json +1 -1
- package/misc/rgbToHEX.js +1 -1
- package/package.json +2 -6
- package/.nvmrc +0 -1
- package/config.json +0 -1
- package/functions/searchUsers.js +0 -27
- package/misc/decB64.js +0 -4
- package/misc/demonlist.js +0 -1
- package/misc/encB64.js +0 -1
- package/misc/gjReq.js +0 -1
- package/misc/gjWReq.js +0 -1
- package/misc/gjp.js +0 -1
- /package/{misc/xor.js → xor.js} +0 -0
|
@@ -1,86 +1,17 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
type: 0,
|
|
18
|
-
str: query,
|
|
19
|
-
page: Number(page) - 1,
|
|
20
|
-
secret: secret
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
let res = await gjReq("getGJLevels21", data)
|
|
24
|
-
|
|
25
|
-
if(res.data == "error code: 1005") {
|
|
26
|
-
res = await gjWReq("searchLevels", `${query}?page=${page}`);
|
|
27
|
-
if(res.status == 403) throw new Error(res.data.error);
|
|
28
|
-
return res.data;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
let levels = res.data.split("#")[0].split("|");
|
|
32
|
-
let creators = res.data.split("#")[1].split("|");
|
|
33
|
-
let songs = res.data.split("#")[2].split("~:~");
|
|
34
|
-
|
|
35
|
-
let result = [];
|
|
36
|
-
|
|
37
|
-
let encCreators = {};
|
|
38
|
-
let encSongs = {};
|
|
39
|
-
|
|
40
|
-
creators.forEach(c => {
|
|
41
|
-
let playerID = c.split(":")[0];
|
|
42
|
-
let username = c.split(":")[1];
|
|
43
|
-
encCreators[playerID] = username;
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
songs.forEach(s => {
|
|
47
|
-
let songId = s.split("~|~")[1];
|
|
48
|
-
let songName = s.split("~|~")[3];
|
|
49
|
-
let songArtistID = s.split("~|~")[5];
|
|
50
|
-
let songArtist = s.split("~|~")[7];
|
|
51
|
-
let size = s.split("~|~")[9];
|
|
52
|
-
let link = s.split("~|~")[13];
|
|
53
|
-
|
|
54
|
-
encSongs[songId] = {
|
|
55
|
-
"name": songName,
|
|
56
|
-
"id": Number(songId),
|
|
57
|
-
"artist": songArtist,
|
|
58
|
-
"artistId": Number(songArtistID),
|
|
59
|
-
"fileSize": `${size} MB`,
|
|
60
|
-
"link": decodeURIComponent(link)
|
|
61
|
-
};
|
|
62
|
-
})
|
|
63
|
-
|
|
64
|
-
for(const l of levels) {
|
|
65
|
-
let decLvl = decodeLevelRes(l);
|
|
66
|
-
const { getOfficialSongInfo } = require("./getOfficialSongInfo.js");
|
|
67
|
-
|
|
68
|
-
let lvl = decLvl.res;
|
|
69
|
-
let officialSongID = Number(decLvl.officialSong);
|
|
70
|
-
let songID = Number(decLvl.customSong);
|
|
71
|
-
let playerId = decLvl.playerID;
|
|
72
|
-
let song;
|
|
73
|
-
|
|
74
|
-
if(officialSongID == 0 && songID != 0 || officialSongID != 0 && songID != 0) song = encSongs[songID.toString()];
|
|
75
|
-
if(officialSongID != 0 && songID == 0) song = getOfficialSongInfo(officialSongID + 1);
|
|
76
|
-
if(officialSongID == 0 && songID == 0) song = getOfficialSongInfo(1);
|
|
77
|
-
|
|
78
|
-
lvl['creator'] = encCreators[playerId] != undefined ? encCreators[playerId] : "-";
|
|
79
|
-
lvl['song'] = song;
|
|
80
|
-
|
|
81
|
-
result.push(lvl);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return result;
|
|
85
|
-
}
|
|
2
|
+
searchLevels: async function (query, page = 1) {
|
|
3
|
+
const { gjReq } = require("../gjReq");
|
|
4
|
+
let GJDecode = require("../misc/GJDecode");
|
|
5
|
+
const { decodeSearchResults } = new GJDecode;
|
|
6
|
+
|
|
7
|
+
let res = await gjReq("getGJLevels21", {
|
|
8
|
+
type: 0,
|
|
9
|
+
str: query,
|
|
10
|
+
page: Number(page) - 1,
|
|
11
|
+
secret: "Wmfd2893gb7"
|
|
12
|
+
});
|
|
13
|
+
if (res.data == -1) return [];
|
|
14
|
+
|
|
15
|
+
return decodeSearchResults(res.data);
|
|
16
|
+
}
|
|
86
17
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
searchLists: async function (query, page = 1) {
|
|
3
|
+
const { gjReq } = require("../gjReq");
|
|
4
|
+
const GJDecode = require("../misc/GJDecode");
|
|
5
|
+
const { decodeLists } = new GJDecode;
|
|
6
|
+
const res = await gjReq("getGJLevelLists", {
|
|
7
|
+
type: 0,
|
|
8
|
+
str: query,
|
|
9
|
+
secret: "Wmfd2893gb7",
|
|
10
|
+
page: Number(page) - 1
|
|
11
|
+
})
|
|
12
|
+
if (res.data == -1) return [];
|
|
13
|
+
return decodeLists(res.data);
|
|
14
|
+
}
|
|
15
|
+
}
|
package/functions/unblockUser.js
CHANGED
|
@@ -1,38 +1,37 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* @param {*} password - The unblocking person's password.
|
|
7
|
-
*/
|
|
8
|
-
unblockUser:
|
|
9
|
-
async function(target, username, password) {
|
|
10
|
-
if(!target) throw new Error("Please provide a target's player ID or username!");
|
|
11
|
-
if(!username) throw new Error("Please provide your player ID or username!");
|
|
12
|
-
if(!password) throw new Error("Please provide your password!");
|
|
2
|
+
unblockUser: async function (target, username, password) {
|
|
3
|
+
if (!target) throw new Error("Please provide a target's player ID or username!");
|
|
4
|
+
if (!username) throw new Error("Please provide a player ID or username!");
|
|
5
|
+
if (!password) throw new Error("Please provide a password!");
|
|
13
6
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
const { gjReq } = require("../gjReq");
|
|
8
|
+
const XOR = require("../xor");
|
|
9
|
+
const xor = new XOR;
|
|
17
10
|
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
let userSearch = await gjReq("getGJUsers20", {
|
|
12
|
+
str: username,
|
|
13
|
+
secret: "Wmfd2893gb7"
|
|
14
|
+
});
|
|
15
|
+
if (userSearch.data == -1) throw new Error(-1);
|
|
16
|
+
let userAccID = userSearch.data.split(":")[21];
|
|
20
17
|
|
|
21
|
-
|
|
18
|
+
let recSearch = await gjReq("getGJUsers20", {
|
|
19
|
+
str: target,
|
|
20
|
+
secret: "Wmfd2893gb7"
|
|
21
|
+
});
|
|
22
|
+
if (recSearch.data == -1) throw new Error(-1);
|
|
23
|
+
let targetAccID = recSearch.data.split(":")[21];
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
let res = await gjReq("unblockGJUser20", data)
|
|
31
|
-
if(res.data == -1) throw new Error(-1);
|
|
25
|
+
const data = {
|
|
26
|
+
secret: "Wmfd2893gb7",
|
|
27
|
+
targetAccountID: targetAccID,
|
|
28
|
+
accountID: userAccID,
|
|
29
|
+
gjp: xor.encrypt(password, 37526)
|
|
30
|
+
}
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
let res = await gjReq("unblockGJUser20", data);
|
|
33
|
+
if (res.data == -1) throw new Error(-1);
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
return res.data;
|
|
36
|
+
}
|
|
38
37
|
}
|
|
@@ -1,45 +1,29 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const uLDdata = {
|
|
30
|
-
accountID: userObj.accountID,
|
|
31
|
-
gjp: gjp(password),
|
|
32
|
-
levelID: level,
|
|
33
|
-
levelDesc: encB64(desc),
|
|
34
|
-
secret: secret
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
let res = await gjReq("updateGJDesc20", uLDdata);
|
|
38
|
-
if(res.data == -1) throw new Error("-1 Failed to update the description.");
|
|
39
|
-
|
|
40
|
-
if(res.data == "error code: 1005") res = await gjWReq("updateLevelDesc", `${level}?content=${encB64(desc)}&user=${user}&password=${password}`);
|
|
41
|
-
if(res.status == 403) throw new Error(res.data.error);
|
|
42
|
-
|
|
43
|
-
return res.data;
|
|
44
|
-
}
|
|
2
|
+
updateLevelDesc: async function (level, desc, user, password) {
|
|
3
|
+
if (isNaN(level)) throw new Error("Please provide a valid level ID!");
|
|
4
|
+
if (!user) throw new Error("Please provide a player ID or name!");
|
|
5
|
+
if (!password) throw new Error("Please provide a password!");
|
|
6
|
+
|
|
7
|
+
const { gjReq } = require("../gjReq");
|
|
8
|
+
const XOR = require("../xor");
|
|
9
|
+
const xor = new XOR;
|
|
10
|
+
|
|
11
|
+
let search = await gjReq("getGJUsers20", {
|
|
12
|
+
str: user,
|
|
13
|
+
secret: "Wmfd2893gb7"
|
|
14
|
+
});
|
|
15
|
+
if (search.data == -1) throw new Error(-1);
|
|
16
|
+
let accID = search.data.split(":")[21];
|
|
17
|
+
|
|
18
|
+
let res = await gjReq("updateGJDesc20", {
|
|
19
|
+
accountID: accID,
|
|
20
|
+
gjp: xor.encrypt(password, 37526),
|
|
21
|
+
levelID: level,
|
|
22
|
+
levelDesc: Buffer.from(desc).toString("base64"),
|
|
23
|
+
secret: "Wmfd2893gb7"
|
|
24
|
+
});
|
|
25
|
+
if (res.data == -1) throw new Error("-1: Failed to update the description.");
|
|
26
|
+
|
|
27
|
+
return res.data;
|
|
28
|
+
}
|
|
45
29
|
}
|
|
@@ -1,42 +1,29 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* @param {*} password - The posting person's password.
|
|
7
|
-
*/
|
|
8
|
-
uploadAccountPost:
|
|
9
|
-
async function(content, str, password) {
|
|
10
|
-
const {encB64} = require("../misc/encB64.js");
|
|
11
|
-
if(!content) throw new Error("Please provide an account post content!");
|
|
12
|
-
if(!str) throw new Error("Please provide a user ID or name!");
|
|
13
|
-
if(!password) throw new Error("Please provide a password!");
|
|
14
|
-
|
|
15
|
-
const {gjReq} = require("../misc/gjReq.js");
|
|
16
|
-
const {gjWReq} = require("../misc/gjWReq.js");
|
|
17
|
-
const { searchUsers } = require("./searchUsers.js");
|
|
2
|
+
uploadAccountPost: async function (content, str, password) {
|
|
3
|
+
if (!content) throw new Error("Please provide an account post content!");
|
|
4
|
+
if (!str) throw new Error("Please provide a user ID or name!");
|
|
5
|
+
if (!password) throw new Error("Please provide a password!");
|
|
18
6
|
|
|
19
|
-
|
|
7
|
+
const { gjReq } = require("../gjReq");
|
|
8
|
+
const XOR = require("../xor");
|
|
9
|
+
const xor = new XOR;
|
|
20
10
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
let search = await gjReq("getGJUsers20", {
|
|
12
|
+
str: str,
|
|
13
|
+
secret: "Wmfd2893gb7"
|
|
14
|
+
});
|
|
15
|
+
if (search.data == -1) throw new Error(-1);
|
|
16
|
+
let accID = search.data.split(":")[21];
|
|
25
17
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
let res = await gjReq("uploadGJAccComment20", {
|
|
19
|
+
accountID: accID,
|
|
20
|
+
secret: "Wmfd2893gb7",
|
|
21
|
+
gjp: xor.encrypt(password, 37526),
|
|
22
|
+
comment: Buffer.from(content).toString("base64"),
|
|
23
|
+
cType: 1
|
|
24
|
+
});
|
|
25
|
+
if (res.status == 500) throw new Error("500 Error: couldn't post!");
|
|
33
26
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if(res.data == "error code: 1005") res = await gjWReq("uploadAccountPost", `?content=${encB64(content)}&user=${str}&password=${password}`);
|
|
38
|
-
if(res.status == 403) throw new Error(res.data.error);
|
|
39
|
-
|
|
40
|
-
return res.data;
|
|
41
|
-
}
|
|
27
|
+
return res.data;
|
|
28
|
+
}
|
|
42
29
|
}
|
|
@@ -1,59 +1,45 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
secret: "Wmfd2893gb7"
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
let res = await gjReq("uploadGJComment21", uCdata);
|
|
49
|
-
|
|
50
|
-
if (res.data == -1) throw new Error("Whoops, the servers have rejected your request!");
|
|
51
|
-
if (res.data == -10) throw new Error("You're permanently banned from commenting!");
|
|
52
|
-
if (res.data.startsWith("temp_")) throw new Error(`You're temporarily banned from commenting!\nRemaining duration: ${res.data.split("_")[1]} seconds\nReason: ${res.data.split("_")[2]}`);
|
|
53
|
-
|
|
54
|
-
if (res.data == "error code: 1005") res = await gjWReq("uploadComment", `${id}?comment=${encB64(comment)}&user=${user}&password=${password}&percent=${percent}`)
|
|
55
|
-
if (res.status == 403) throw new Error(res.data.error)
|
|
56
|
-
|
|
57
|
-
return res.data;
|
|
58
|
-
}
|
|
2
|
+
uploadComment: async function (comment, id, user, password, percent = 0) {
|
|
3
|
+
if (!comment) throw new Error("Please provide a comment!");
|
|
4
|
+
if (!id) throw new Error("Please provide a level ID!");
|
|
5
|
+
if (!user) throw new Error("Please provide a username or a player ID!");
|
|
6
|
+
if (!password) throw new Error("Please provide a password!");
|
|
7
|
+
if (Number(percent) > 100) throw new Error("The percentage cannot be more than 100!");
|
|
8
|
+
|
|
9
|
+
const { gjReq } = require("../gjReq.js");
|
|
10
|
+
const crypto = require('crypto')
|
|
11
|
+
|
|
12
|
+
function sha1(data) { return crypto.createHash("sha1").update(data, "binary").digest("hex"); }
|
|
13
|
+
|
|
14
|
+
let search = await gjReq("getGJUsers20", {
|
|
15
|
+
str: user,
|
|
16
|
+
secret: "Wmfd2893gb7"
|
|
17
|
+
});
|
|
18
|
+
if (search.data == -1) throw new Error(-1);
|
|
19
|
+
let username = search.data.split(":")[1];
|
|
20
|
+
let accID = search.data.split(":")[21];
|
|
21
|
+
|
|
22
|
+
const XOR = require("../xor.js");
|
|
23
|
+
const xor = new XOR;
|
|
24
|
+
|
|
25
|
+
let chkStr = username.toLowerCase() + Buffer.from(comment).toString("base64") + id + percent + "0xPT6iUrtws0J";
|
|
26
|
+
let chk = xor.encrypt(sha1(chkStr), 29481);
|
|
27
|
+
|
|
28
|
+
let res = await gjReq("uploadGJComment21", {
|
|
29
|
+
accountID: accID,
|
|
30
|
+
gjp: xor.encrypt(password, 37526),
|
|
31
|
+
userName: username.toLowerCase(),
|
|
32
|
+
comment: Buffer.from(comment).toString("base64"),
|
|
33
|
+
levelID: id,
|
|
34
|
+
percent: percent,
|
|
35
|
+
chk: chk,
|
|
36
|
+
secret: "Wmfd2893gb7"
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
if (res.data == -1) throw new Error("Whoops, the servers have rejected your request!");
|
|
40
|
+
if (res.data == -10) throw new Error("You're permanently banned from commenting!");
|
|
41
|
+
if (res.data.startsWith("temp_")) throw new Error(`You're temporarily banned from commenting!\nBan duration: ${res.data.split("_")[1]} seconds\nReason: ${res.data.split("_")[2]}`);
|
|
42
|
+
|
|
43
|
+
return res.data;
|
|
44
|
+
}
|
|
59
45
|
}
|
|
@@ -1,48 +1,39 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* @param {*} pass - The sending person's password.
|
|
9
|
-
*/
|
|
10
|
-
uploadMessage:
|
|
11
|
-
async function(receiver, subj, content, user, pass) {
|
|
12
|
-
if(!receiver) throw new Error("Please specify a message receiver!");
|
|
13
|
-
if(!subj) throw new Error("Please specify a message subject!");
|
|
14
|
-
if(!content) throw new Error("Please specify a message content!");
|
|
15
|
-
if(!user) throw new Error("Please provide a username or a player ID!");
|
|
16
|
-
if(!pass) throw new Error("Please provide a password!");
|
|
2
|
+
uploadMessage: async function (receiver, subj, content, user, pass) {
|
|
3
|
+
if (!receiver) throw new Error("Please specify a message receiver!");
|
|
4
|
+
if (!subj) throw new Error("Please specify a message subject!");
|
|
5
|
+
if (!content) throw new Error("Please specify a message content!");
|
|
6
|
+
if (!user) throw new Error("Please provide a username or a player ID!");
|
|
7
|
+
if (!pass) throw new Error("Please provide a password!");
|
|
17
8
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const {gjWReq} = require("../misc/gjWReq.js");
|
|
22
|
-
const { secret } = require("../config.json");
|
|
23
|
-
const { searchUsers } = require("./searchUsers.js");
|
|
24
|
-
|
|
25
|
-
let receiverObj = await searchUsers(receiver);
|
|
26
|
-
let userObj = await searchUsers(user);
|
|
9
|
+
const { gjReq } = require("../gjReq");
|
|
10
|
+
const XOR = require("../xor");
|
|
11
|
+
const xor = new XOR;
|
|
27
12
|
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
let userSearch = await gjReq("getGJUsers20", {
|
|
14
|
+
str: user,
|
|
15
|
+
secret: "Wmfd2893gb7"
|
|
16
|
+
});
|
|
17
|
+
if (userSearch.data == -1) throw new Error(-1);
|
|
18
|
+
let userAccID = userSearch.data.split(":")[21];
|
|
30
19
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
secret: secret
|
|
38
|
-
}
|
|
20
|
+
let recSearch = await gjReq("getGJUsers20", {
|
|
21
|
+
str: receiver,
|
|
22
|
+
secret: "Wmfd2893gb7"
|
|
23
|
+
});
|
|
24
|
+
if (recSearch.data == -1) throw new Error(-1);
|
|
25
|
+
let recAccID = recSearch.data.split(":")[21];
|
|
39
26
|
|
|
40
|
-
|
|
41
|
-
|
|
27
|
+
let res = await gjReq("uploadGJMessage20", {
|
|
28
|
+
accountID: userAccID,
|
|
29
|
+
toAccountID: recAccID,
|
|
30
|
+
gjp: xor.encrypt(pass, 37526),
|
|
31
|
+
subject: Buffer.from(subj).toString("base64"),
|
|
32
|
+
body: xor.encrypt(content, 14251),
|
|
33
|
+
secret: "Wmfd2893gb7"
|
|
34
|
+
});
|
|
35
|
+
if (res.data == -1) throw new Error(-1);
|
|
42
36
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return res.data;
|
|
47
|
-
}
|
|
37
|
+
return res.data;
|
|
38
|
+
}
|
|
48
39
|
}
|
package/gjReq.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const fetch = require("node-fetch");
|
|
2
|
+
module.exports = {
|
|
3
|
+
gjReq: async function (endpoint, data) {
|
|
4
|
+
let r = await fetch(`https://www.boomlings.com/database/${endpoint.endsWith(".php") ? endpoint.split(".php")[0] : endpoint}.php`, {
|
|
5
|
+
method: "POST",
|
|
6
|
+
headers: {
|
|
7
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
8
|
+
"User-Agent": " "
|
|
9
|
+
},
|
|
10
|
+
body: new URLSearchParams(data)
|
|
11
|
+
});
|
|
12
|
+
let res = await r.text();
|
|
13
|
+
return {
|
|
14
|
+
data: res,
|
|
15
|
+
status: r.status
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
package/index.js
CHANGED
|
@@ -1 +1,36 @@
|
|
|
1
|
-
const{dlLevel}=require("./functions/dlLevel
|
|
1
|
+
const { dlLevel } = require("./functions/dlLevel");
|
|
2
|
+
const { getProfile } = require("./functions/getProfile");
|
|
3
|
+
const { getSongsLibrary } = require("./functions/getSongsLibrary");
|
|
4
|
+
const { getSongInfo } = require("./functions/getSongInfo");
|
|
5
|
+
const { getAccountPosts } = require("./functions/getAccountPosts");
|
|
6
|
+
const { getGauntlets } = require("./functions/getGauntlets");
|
|
7
|
+
const { getMapPacks } = require("./functions/getMapPacks");
|
|
8
|
+
const { getOfficialSongInfo } = require("./functions/getOfficialSongInfo");
|
|
9
|
+
const { getDailyLevel } = require("./functions/getDailyLevel");
|
|
10
|
+
const { getWeeklyDemon } = require("./functions/getWeeklyDemon");
|
|
11
|
+
const { getCreatorScores } = require("./functions/getCreatorScores");
|
|
12
|
+
const { getTop100 } = require("./functions/getTop100");
|
|
13
|
+
const { reportLevel } = require("./functions/reportLevel");
|
|
14
|
+
const { uploadMessage } = require("./functions/uploadMessage");
|
|
15
|
+
const { getMessages } = require("./functions/getMessages");
|
|
16
|
+
const { dlMessage } = require("./functions/dlMessage");
|
|
17
|
+
const { getBlockedList } = require("./functions/getBlockedList");
|
|
18
|
+
const { getFriendsList } = require("./functions/getFriendsList");
|
|
19
|
+
const { deleteLevel } = require("./functions/deleteLevel");
|
|
20
|
+
const { blockUser } = require("./functions/blockUser");
|
|
21
|
+
const { unblockUser } = require("./functions/unblockUser");
|
|
22
|
+
const { uploadAccountPost } = require("./functions/uploadAccountPost");
|
|
23
|
+
const { deleteAccountPost } = require("./functions/deleteAccountPost");
|
|
24
|
+
const { updateLevelDesc } = require("./functions/updateLevelDesc");
|
|
25
|
+
const { getLevelByID } = require("./functions/getLevelByID");
|
|
26
|
+
const { searchLevels } = require("./functions/searchLevels");
|
|
27
|
+
const { getComments } = require("./functions/getComments");
|
|
28
|
+
const { getTopLists } = require("./functions/getTopLists");
|
|
29
|
+
const { searchLists } = require("./functions/searchLists");
|
|
30
|
+
const { getTab } = require("./functions/getTab");
|
|
31
|
+
const { getUserLevels } = require("./functions/getUserLevels");
|
|
32
|
+
const { deleteComment } = require("./functions/deleteComment");
|
|
33
|
+
const { getCommentHistory } = require("./functions/getCommentHistory");
|
|
34
|
+
const { getLevelScores } = require("./functions/getLevelScores");
|
|
35
|
+
const { uploadComment } = require("./functions/uploadComment");
|
|
36
|
+
module.exports = { dlLevel, getProfile, getSongsLibrary, getSongInfo, getAccountPosts, getGauntlets, getMapPacks, getOfficialSongInfo, getDailyLevel, getWeeklyDemon, getCreatorScores, getTop100, reportLevel, uploadMessage, getMessages, dlMessage, getBlockedList, getFriendsList, deleteLevel, blockUser, unblockUser, uploadAccountPost, deleteAccountPost, updateLevelDesc, getLevelByID, searchLevels, getComments, getTopLists, searchLists, getTab, getUserLevels, deleteComment, getCommentHistory, getLevelScores, uploadComment };
|