gj-boomlings-api 0.4.0 → 1.0.0
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/README.md +14 -3
- package/config.json +10 -1
- package/docs/blockUser.md +21 -0
- package/docs/deleteAccountPost.md +23 -0
- package/docs/getCreatorScores.md +60 -0
- package/docs/getGauntlets.md +2 -2
- package/docs/getLevelByID.md +51 -0
- package/docs/getMapPacks.md +88 -0
- package/docs/getTop100.md +56 -0
- package/docs/getUserLevels.md +84 -0
- package/docs/objects/level.md +1 -1
- package/docs/searchLevels.md +113 -0
- package/docs/updateLevelDesc.md +23 -0
- package/docs/uploadAccountPost.md +2 -2
- package/docs/uploadComment.md +28 -0
- package/functions/blockUser.js +60 -0
- package/functions/deleteAccountPost.js +52 -0
- package/functions/dlLevel.js +3 -2
- package/functions/getAccountPosts.js +13 -9
- package/functions/getCommentHistory.js +9 -0
- package/functions/getComments.js +4 -0
- package/functions/getCreatorScores.js +222 -0
- package/functions/getGauntlets.js +3 -0
- package/functions/getLevelByID.js +30 -0
- package/functions/getMapPacks.js +42 -0
- package/functions/getOfficialSongInfo.js +1 -7
- package/functions/getProfile.js +4 -2
- package/functions/getSongInfo.js +1 -0
- package/functions/getTop100.js +222 -0
- package/functions/getUserLevels.js +191 -0
- package/functions/reportLevel.js +2 -0
- package/functions/searchLevels.js +174 -0
- package/functions/updateLevelDesc.js +55 -0
- package/functions/uploadAccountPost.js +1 -0
- package/functions/uploadComment.js +66 -0
- package/index.js +21 -1
- package/misc/decodeAccountPost.js +6 -1
- package/misc/decodeLevel.js +166 -0
- package/misc/decodeMapPack.js +55 -0
- package/misc/decodeUserResult.js +53 -0
- package/misc/gjp.js +8 -0
- package/misc/officialsongs.json +0 -18
- package/package.json +2 -2
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
blockUser:
|
|
3
|
+
async function(target, username, password) {
|
|
4
|
+
if(!target || target == "") throw new Error("Please provide a player ID or username!");
|
|
5
|
+
if(!username || username == "") throw new Error("Please provide your player ID or username!");
|
|
6
|
+
if(!password || password == "") throw new Error("Please provide your password!");
|
|
7
|
+
const axios = require("axios");
|
|
8
|
+
const {headers, server} = require("../config.json");
|
|
9
|
+
|
|
10
|
+
const userData = {
|
|
11
|
+
gameVersion: 21,
|
|
12
|
+
binaryVersion: 35,
|
|
13
|
+
gdw: 0,
|
|
14
|
+
str: target,
|
|
15
|
+
secret: "Wmfd2893gb7"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let resp = await axios.post(server + "getGJUsers20.php", {
|
|
19
|
+
gameVersion: 21,
|
|
20
|
+
binaryVersion: 35,
|
|
21
|
+
gdw: 0,
|
|
22
|
+
str: username,
|
|
23
|
+
secret: "Wmfd2893gb7"
|
|
24
|
+
}, {
|
|
25
|
+
headers: headers
|
|
26
|
+
})
|
|
27
|
+
if(resp.data == -1) throw new Error(`Couldn't find a "${username}" user.`)
|
|
28
|
+
if(resp.data.toLowerCase() == "error code: 1020") throw new Error("1020 error: Request denied.");
|
|
29
|
+
let accID = resp.data.split(":16:")[1].split(":3:")[0];
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
let r = await axios.post(server + "getGJUsers20.php", userData, {
|
|
33
|
+
headers: headers
|
|
34
|
+
})
|
|
35
|
+
if(r.data == -1) throw new Error(`Couldn't find a "${username}" user.`)
|
|
36
|
+
if(r.data.toLowerCase() == "error code: 1020") throw new Error("1020 error: Request denied.");
|
|
37
|
+
let targetId = r.data.split(":16:")[1].split(":3:")[0];
|
|
38
|
+
|
|
39
|
+
const {gjp} = require("../misc/gjp.js");
|
|
40
|
+
|
|
41
|
+
const blockData = {
|
|
42
|
+
gameVersion: 21,
|
|
43
|
+
binaryVersion: 35,
|
|
44
|
+
gdw: 0,
|
|
45
|
+
secret: "Wmfd2893gb7",
|
|
46
|
+
targetAccountID: targetId,
|
|
47
|
+
accountID: accID,
|
|
48
|
+
gjp: gjp(password)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
let res = await axios.post(server + "blockGJUser20.php", blockData, {
|
|
52
|
+
headers: headers
|
|
53
|
+
}).catch(e => {
|
|
54
|
+
if(res.data.toLowerCase() == "error code: 1020") throw new Error("1020 error: Request denied.");
|
|
55
|
+
throw new Error(`${e}`)
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
return 1;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
deleteAccountPost:
|
|
3
|
+
async function(id, str, password) {
|
|
4
|
+
const {encURLSafeBase64} = require("./encURLSafeBase64.js");
|
|
5
|
+
if(!id || id == "") throw new Error("Please provide an account post ID!");
|
|
6
|
+
if(!str || str == "") throw new Error("Please provide a user ID or name!");
|
|
7
|
+
if(!password || password == "") throw new Error("Please provide a password!");
|
|
8
|
+
|
|
9
|
+
const axios = require("axios");
|
|
10
|
+
const { headers, server } = require("../config.json");
|
|
11
|
+
|
|
12
|
+
const data = {
|
|
13
|
+
gameVersion: 21,
|
|
14
|
+
binaryVersion: 35,
|
|
15
|
+
gdw: 0,
|
|
16
|
+
str: str,
|
|
17
|
+
secret: "Wmfd2893gb7"
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
let r = await axios.post(server + "getGJUsers20.php", data, {
|
|
21
|
+
headers: headers
|
|
22
|
+
}).catch(e => {
|
|
23
|
+
throw new Error(e.response.data);
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
if(r.data == -1) throw new Error("-1 This user is not found.")
|
|
27
|
+
|
|
28
|
+
let accId = r.data.split(":16:")[1].split(":3:")[0];
|
|
29
|
+
if(Number(accId) < 71 || accId.includes(":")) accId = r.data.split(":16:")[2].split(":3:")[0];
|
|
30
|
+
|
|
31
|
+
const XOR = require("../misc/xor.js");
|
|
32
|
+
const xor = new XOR();
|
|
33
|
+
|
|
34
|
+
let dACdata = {
|
|
35
|
+
gameVersion: 21,
|
|
36
|
+
binaryVersion: 35,
|
|
37
|
+
gdw: 0,
|
|
38
|
+
accountID: accId,
|
|
39
|
+
secret: "Wmfd2893gb7",
|
|
40
|
+
gjp: xor.encrypt(password, 37526),
|
|
41
|
+
commentID: id,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
let res = await axios.post(server + "deleteGJAccComment20.php", dACdata, {
|
|
45
|
+
headers: headers
|
|
46
|
+
}).catch(e => {
|
|
47
|
+
throw new Error(e.response.data);
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
return 1;
|
|
51
|
+
}
|
|
52
|
+
}
|
package/functions/dlLevel.js
CHANGED
|
@@ -22,8 +22,9 @@ module.exports = {
|
|
|
22
22
|
headers: headers
|
|
23
23
|
})
|
|
24
24
|
|
|
25
|
-
if(res.data == -1) throw new Error("-1 Not found.")
|
|
26
|
-
if(res.data.toLowerCase() == "error code:
|
|
25
|
+
if(res.data == -1) throw new Error("-1 Not found.");
|
|
26
|
+
if(res.data.toLowerCase() == "error code: 1020") throw new Error("1020 error: Request denied.");
|
|
27
|
+
if(res.data.toLowerCase() == "error code: 1005") throw new Error("1005 error: Your IP address has been blocked from sending requests to a server. It's recommended to use locally (directly from a PC).");
|
|
27
28
|
let split1 = res.data.split("1:")[1]; // id
|
|
28
29
|
let split2 = res.data.split(":2:")[1]; // name
|
|
29
30
|
let split3 = res.data.split(":3:")[1]; // description
|
|
@@ -19,6 +19,9 @@ module.exports = {
|
|
|
19
19
|
})
|
|
20
20
|
|
|
21
21
|
if(r.data == -1) throw new Error("-1 This user is not found.")
|
|
22
|
+
if(r.data.toLowerCase() == "error code: 1020") throw new Error("1020 error: Request denied.");
|
|
23
|
+
if(r.data.toLowerCase() == "error code: 1005") throw new Error("1005 error: Your IP address has been blocked from sending requests to a server. It's recommended to use locally (directly from a PC).")
|
|
24
|
+
|
|
22
25
|
let id = r.data.split(":16:")[1].split(":3:")[0];
|
|
23
26
|
if(Number(id) < 71 || id.includes(":")) id = r.data.split(":16:")[2].split(":3:")[0];
|
|
24
27
|
|
|
@@ -36,6 +39,7 @@ module.exports = {
|
|
|
36
39
|
})
|
|
37
40
|
|
|
38
41
|
if(res.data == -1) throw new Error("-1 Not found.")
|
|
42
|
+
if(res.data.toLowerCase() == "error code: 1020") throw new Error("1020 error: Request denied.");
|
|
39
43
|
if(res.data.toLowerCase() == "error code: 1005") throw new Error("1005 error: Your IP address has been blocked from sending requests to a server. It's recommended to use locally (directly from a PC).")
|
|
40
44
|
if(res.data.startsWith("#")) throw new Error("Whoops! Couldn't find anything!");
|
|
41
45
|
|
|
@@ -55,14 +59,14 @@ module.exports = {
|
|
|
55
59
|
if(res.data.split("|").length - 1 == 1) {
|
|
56
60
|
firstPost = res.data.split("|")[0];
|
|
57
61
|
secondPost = res.data.split("|")[1].split("|")[0];
|
|
58
|
-
result
|
|
62
|
+
result = [decodeAccountPost(firstPost),decodeAccountPost(secondPost)]
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
if(res.data.split("|").length - 1 == 2) {
|
|
62
66
|
firstPost = res.data.split("|")[0];
|
|
63
67
|
secondPost = res.data.split("|")[1].split("|")[0];
|
|
64
68
|
thirdPost = res.data.split("|")[2].split("|")[0];
|
|
65
|
-
result
|
|
69
|
+
result = [decodeAccountPost(firstPost),decodeAccountPost(secondPost),decodeAccountPost(thirdPost)]
|
|
66
70
|
}
|
|
67
71
|
|
|
68
72
|
if(res.data.split("|").length - 1 == 3) {
|
|
@@ -70,7 +74,7 @@ module.exports = {
|
|
|
70
74
|
secondPost = res.data.split("|")[1].split("|")[0];
|
|
71
75
|
thirdPost = res.data.split("|")[2].split("|")[0];
|
|
72
76
|
fourthPost = res.data.split("|")[3].split("|")[0];
|
|
73
|
-
result
|
|
77
|
+
result = [decodeAccountPost(firstPost),decodeAccountPost(secondPost),decodeAccountPost(thirdPost),decodeAccountPost(fourthPost)]
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
if(res.data.split("|").length - 1 == 4) {
|
|
@@ -79,7 +83,7 @@ module.exports = {
|
|
|
79
83
|
thirdPost = res.data.split("|")[2].split("|")[0];
|
|
80
84
|
fourthPost = res.data.split("|")[3].split("|")[0];
|
|
81
85
|
fifthPost = res.data.split("|")[4].split("|")[0];
|
|
82
|
-
result
|
|
86
|
+
result = [decodeAccountPost(firstPost),decodeAccountPost(secondPost),decodeAccountPost(thirdPost),decodeAccountPost(fourthPost),decodeAccountPost(fifthPost)]
|
|
83
87
|
}
|
|
84
88
|
|
|
85
89
|
if(res.data.split("|").length - 1 == 5) {
|
|
@@ -89,7 +93,7 @@ module.exports = {
|
|
|
89
93
|
fourthPost = res.data.split("|")[3].split("|")[0];
|
|
90
94
|
fifthPost = res.data.split("|")[4].split("|")[0];
|
|
91
95
|
sixthPost = res.data.split("|")[5].split("|")[0];
|
|
92
|
-
result
|
|
96
|
+
result = [decodeAccountPost(firstPost),decodeAccountPost(secondPost),decodeAccountPost(thirdPost),decodeAccountPost(fourthPost),decodeAccountPost(fifthPost),decodeAccountPost(sixthPost)]
|
|
93
97
|
}
|
|
94
98
|
|
|
95
99
|
if(res.data.split("|").length - 1 == 6) {
|
|
@@ -100,7 +104,7 @@ module.exports = {
|
|
|
100
104
|
fifthPost = res.data.split("|")[4].split("|")[0];
|
|
101
105
|
sixthPost = res.data.split("|")[5].split("|")[0];
|
|
102
106
|
seventhPost = res.data.split("|")[6].split("|")[0];
|
|
103
|
-
result
|
|
107
|
+
result = [decodeAccountPost(firstPost),decodeAccountPost(secondPost),decodeAccountPost(thirdPost),decodeAccountPost(fourthPost),decodeAccountPost(fifthPost),decodeAccountPost(sixthPost),decodeAccountPost(seventhPost)]
|
|
104
108
|
}
|
|
105
109
|
|
|
106
110
|
if(res.data.split("|").length - 1 == 7) {
|
|
@@ -112,7 +116,7 @@ module.exports = {
|
|
|
112
116
|
sixthPost = res.data.split("|")[5].split("|")[0];
|
|
113
117
|
seventhPost = res.data.split("|")[6].split("|")[0];
|
|
114
118
|
eighthPost = res.data.split("|")[7].split("|")[0];
|
|
115
|
-
result
|
|
119
|
+
result = [decodeAccountPost(firstPost),decodeAccountPost(secondPost),decodeAccountPost(thirdPost),decodeAccountPost(fourthPost),decodeAccountPost(fifthPost),decodeAccountPost(sixthPost),decodeAccountPost(seventhPost),decodeAccountPost(eighthPost)]
|
|
116
120
|
}
|
|
117
121
|
|
|
118
122
|
if(res.data.split("|").length - 1 == 8) {
|
|
@@ -125,7 +129,7 @@ module.exports = {
|
|
|
125
129
|
seventhPost = res.data.split("|")[6].split("|")[0];
|
|
126
130
|
eighthPost = res.data.split("|")[7].split("|")[0];
|
|
127
131
|
ninthPost = res.data.split("|")[8].split("|")[0];
|
|
128
|
-
result
|
|
132
|
+
result = [decodeAccountPost(firstPost),decodeAccountPost(secondPost),decodeAccountPost(thirdPost),decodeAccountPost(fourthPost),decodeAccountPost(fifthPost),decodeAccountPost(sixthPost),decodeAccountPost(seventhPost),decodeAccountPost(eighthPost),decodeAccountPost(ninthPost)]
|
|
129
133
|
}
|
|
130
134
|
|
|
131
135
|
if(res.data.split("|").length - 1 == 9) {
|
|
@@ -139,7 +143,7 @@ module.exports = {
|
|
|
139
143
|
eighthPost = res.data.split("|")[7].split("|")[0];
|
|
140
144
|
ninthPost = res.data.split("|")[8].split("|")[0];
|
|
141
145
|
tenthPost = res.data.split("|")[9].split("|")[0];
|
|
142
|
-
result
|
|
146
|
+
result = [decodeAccountPost(firstPost),decodeAccountPost(secondPost),decodeAccountPost(thirdPost),decodeAccountPost(fourthPost),decodeAccountPost(fifthPost),decodeAccountPost(sixthPost),decodeAccountPost(seventhPost),decodeAccountPost(eighthPost),decodeAccountPost(ninthPost),decodeAccountPost(tenthPost)]
|
|
143
147
|
}
|
|
144
148
|
|
|
145
149
|
return result;
|
|
@@ -19,6 +19,10 @@ module.exports = {
|
|
|
19
19
|
headers: headers
|
|
20
20
|
})
|
|
21
21
|
|
|
22
|
+
if(r.data == -1) throw new Error("-1 Not found.");
|
|
23
|
+
if(r.data.toLowerCase() == "error code: 1020") throw new Error("1020 error: Request denied.");
|
|
24
|
+
if(r.data.toLowerCase() == "error code: 1005") throw new Error("1005 error: Your IP address has been blocked from sending requests to a server. It's recommended to use locally (directly from a PC).")
|
|
25
|
+
|
|
22
26
|
let id = r.data.split(":2:")[1].split(":13:")[0];
|
|
23
27
|
|
|
24
28
|
const user = await getProfile(id);
|
|
@@ -37,6 +41,11 @@ module.exports = {
|
|
|
37
41
|
let res = await axios.post(server + "getGJCommentHistory.php", CHData, {
|
|
38
42
|
headers: headers
|
|
39
43
|
})
|
|
44
|
+
|
|
45
|
+
if(res.data == -1) throw new Error("-1 Not found.");
|
|
46
|
+
if(res.data.toLowerCase() == "error code: 1020") throw new Error("1020 error: Request denied.");
|
|
47
|
+
if(res.data.toLowerCase() == "error code: 1005") throw new Error("1005 error: Your IP address has been blocked from sending requests to a server. It's recommended to use locally (directly from a PC).")
|
|
48
|
+
|
|
40
49
|
|
|
41
50
|
let firstComment = res.data;
|
|
42
51
|
let secondComment;
|
package/functions/getComments.js
CHANGED
|
@@ -20,6 +20,10 @@ module.exports = {
|
|
|
20
20
|
let res = await axios.post(server + "getGJComments21.php", data, {
|
|
21
21
|
headers: headers
|
|
22
22
|
})
|
|
23
|
+
|
|
24
|
+
if(res.data == -1) throw new Error("-1 Not found.");
|
|
25
|
+
if(res.data.toLowerCase() == "error code: 1020") throw new Error("1020 error: Request denied.");
|
|
26
|
+
if(res.data.toLowerCase() == "error code: 1005") throw new Error("1005 error: Your IP address has been blocked from sending requests to a server. It's recommended to use locally (directly from a PC).")
|
|
23
27
|
|
|
24
28
|
let firstComment = res.data;
|
|
25
29
|
let secondComment;
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
getCreatorScores:
|
|
3
|
+
async function() {
|
|
4
|
+
const { decodeUserResult } = require("../misc/decodeUserResult.js");
|
|
5
|
+
const axios = require("axios");
|
|
6
|
+
const { headers, server, secret } = require("../config.json");
|
|
7
|
+
|
|
8
|
+
const data = {
|
|
9
|
+
secret: secret,
|
|
10
|
+
type: "creators",
|
|
11
|
+
count: 100
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let res = await axios.post(server + "getGJScores20.php", data, {
|
|
15
|
+
headers: headers
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
let p1 = res.data.split("|")[0];
|
|
19
|
+
let p2 = res.data.split("|")[1].split("|")[0];
|
|
20
|
+
let p3 = res.data.split("|")[2].split("|")[0];
|
|
21
|
+
let p4 = res.data.split("|")[3].split("|")[0];
|
|
22
|
+
let p5 = res.data.split("|")[4].split("|")[0];
|
|
23
|
+
let p6 = res.data.split("|")[5].split("|")[0];
|
|
24
|
+
let p7 = res.data.split("|")[6].split("|")[0];
|
|
25
|
+
let p8 = res.data.split("|")[7].split("|")[0];
|
|
26
|
+
let p9 = res.data.split("|")[8].split("|")[0];
|
|
27
|
+
let p10 = res.data.split("|")[9].split("|")[0];
|
|
28
|
+
let p11 = res.data.split("|")[10].split("|")[0];
|
|
29
|
+
let p12 = res.data.split("|")[11].split("|")[0];
|
|
30
|
+
let p13 = res.data.split("|")[12].split("|")[0];
|
|
31
|
+
let p14 = res.data.split("|")[13].split("|")[0];
|
|
32
|
+
let p15 = res.data.split("|")[14].split("|")[0];
|
|
33
|
+
let p16 = res.data.split("|")[15].split("|")[0];
|
|
34
|
+
let p17 = res.data.split("|")[16].split("|")[0];
|
|
35
|
+
let p18 = res.data.split("|")[17].split("|")[0];
|
|
36
|
+
let p19 = res.data.split("|")[18].split("|")[0];
|
|
37
|
+
let p20 = res.data.split("|")[19].split("|")[0];
|
|
38
|
+
let p21 = res.data.split("|")[20].split("|")[0];
|
|
39
|
+
let p22 = res.data.split("|")[21].split("|")[0];
|
|
40
|
+
let p23 = res.data.split("|")[22].split("|")[0];
|
|
41
|
+
let p24 = res.data.split("|")[23].split("|")[0];
|
|
42
|
+
let p25 = res.data.split("|")[24].split("|")[0];
|
|
43
|
+
let p26 = res.data.split("|")[25].split("|")[0];
|
|
44
|
+
let p27 = res.data.split("|")[26].split("|")[0];
|
|
45
|
+
let p28 = res.data.split("|")[27].split("|")[0];
|
|
46
|
+
let p29 = res.data.split("|")[28].split("|")[0];
|
|
47
|
+
let p30 = res.data.split("|")[29].split("|")[0];
|
|
48
|
+
let p31 = res.data.split("|")[30].split("|")[0];
|
|
49
|
+
let p32 = res.data.split("|")[31].split("|")[0];
|
|
50
|
+
let p33 = res.data.split("|")[32].split("|")[0];
|
|
51
|
+
let p34 = res.data.split("|")[33].split("|")[0];
|
|
52
|
+
let p35 = res.data.split("|")[34].split("|")[0];
|
|
53
|
+
let p36 = res.data.split("|")[35].split("|")[0];
|
|
54
|
+
let p37 = res.data.split("|")[36].split("|")[0];
|
|
55
|
+
let p38 = res.data.split("|")[37].split("|")[0];
|
|
56
|
+
let p39 = res.data.split("|")[38].split("|")[0];
|
|
57
|
+
let p40 = res.data.split("|")[39].split("|")[0];
|
|
58
|
+
let p41 = res.data.split("|")[40].split("|")[0];
|
|
59
|
+
let p42 = res.data.split("|")[41].split("|")[0];
|
|
60
|
+
let p43 = res.data.split("|")[42].split("|")[0];
|
|
61
|
+
let p44 = res.data.split("|")[43].split("|")[0];
|
|
62
|
+
let p45 = res.data.split("|")[44].split("|")[0];
|
|
63
|
+
let p46 = res.data.split("|")[45].split("|")[0];
|
|
64
|
+
let p47 = res.data.split("|")[46].split("|")[0];
|
|
65
|
+
let p48 = res.data.split("|")[47].split("|")[0];
|
|
66
|
+
let p49 = res.data.split("|")[48].split("|")[0];
|
|
67
|
+
let p50 = res.data.split("|")[49].split("|")[0];
|
|
68
|
+
let p51 = res.data.split("|")[50].split("|")[0];
|
|
69
|
+
let p52 = res.data.split("|")[51].split("|")[0];
|
|
70
|
+
let p53 = res.data.split("|")[52].split("|")[0];
|
|
71
|
+
let p54 = res.data.split("|")[53].split("|")[0];
|
|
72
|
+
let p55 = res.data.split("|")[54].split("|")[0];
|
|
73
|
+
let p56 = res.data.split("|")[55].split("|")[0];
|
|
74
|
+
let p57 = res.data.split("|")[56].split("|")[0];
|
|
75
|
+
let p58 = res.data.split("|")[57].split("|")[0];
|
|
76
|
+
let p59 = res.data.split("|")[58].split("|")[0];
|
|
77
|
+
let p60 = res.data.split("|")[59].split("|")[0];
|
|
78
|
+
let p61 = res.data.split("|")[60].split("|")[0];
|
|
79
|
+
let p62 = res.data.split("|")[61].split("|")[0];
|
|
80
|
+
let p63 = res.data.split("|")[62].split("|")[0];
|
|
81
|
+
let p64 = res.data.split("|")[63].split("|")[0];
|
|
82
|
+
let p65 = res.data.split("|")[64].split("|")[0];
|
|
83
|
+
let p66 = res.data.split("|")[65].split("|")[0];
|
|
84
|
+
let p67 = res.data.split("|")[66].split("|")[0];
|
|
85
|
+
let p68 = res.data.split("|")[67].split("|")[0];
|
|
86
|
+
let p69 = res.data.split("|")[68].split("|")[0];
|
|
87
|
+
let p70 = res.data.split("|")[69].split("|")[0];
|
|
88
|
+
let p71 = res.data.split("|")[70].split("|")[0];
|
|
89
|
+
let p72 = res.data.split("|")[71].split("|")[0];
|
|
90
|
+
let p73 = res.data.split("|")[72].split("|")[0];
|
|
91
|
+
let p74 = res.data.split("|")[73].split("|")[0];
|
|
92
|
+
let p75 = res.data.split("|")[74].split("|")[0];
|
|
93
|
+
let p76 = res.data.split("|")[75].split("|")[0];
|
|
94
|
+
let p77 = res.data.split("|")[76].split("|")[0];
|
|
95
|
+
let p78 = res.data.split("|")[77].split("|")[0];
|
|
96
|
+
let p79 = res.data.split("|")[78].split("|")[0];
|
|
97
|
+
let p80 = res.data.split("|")[79].split("|")[0];
|
|
98
|
+
let p81 = res.data.split("|")[80].split("|")[0];
|
|
99
|
+
let p82 = res.data.split("|")[81].split("|")[0];
|
|
100
|
+
let p83 = res.data.split("|")[82].split("|")[0];
|
|
101
|
+
let p84 = res.data.split("|")[83].split("|")[0];
|
|
102
|
+
let p85 = res.data.split("|")[84].split("|")[0];
|
|
103
|
+
let p86 = res.data.split("|")[85].split("|")[0];
|
|
104
|
+
let p87 = res.data.split("|")[86].split("|")[0];
|
|
105
|
+
let p88 = res.data.split("|")[87].split("|")[0];
|
|
106
|
+
let p89 = res.data.split("|")[88].split("|")[0];
|
|
107
|
+
let p90 = res.data.split("|")[89].split("|")[0];
|
|
108
|
+
let p91 = res.data.split("|")[90].split("|")[0];
|
|
109
|
+
let p92 = res.data.split("|")[91].split("|")[0];
|
|
110
|
+
let p93 = res.data.split("|")[92].split("|")[0];
|
|
111
|
+
let p94 = res.data.split("|")[93].split("|")[0];
|
|
112
|
+
let p95 = res.data.split("|")[94].split("|")[0];
|
|
113
|
+
let p96 = res.data.split("|")[95].split("|")[0];
|
|
114
|
+
let p97 = res.data.split("|")[96].split("|")[0];
|
|
115
|
+
let p98 = res.data.split("|")[97].split("|")[0];
|
|
116
|
+
let p99 = res.data.split("|")[98].split("|")[0];
|
|
117
|
+
let p100 = res.data.split("|")[99].split("|")[0];
|
|
118
|
+
|
|
119
|
+
return [
|
|
120
|
+
decodeUserResult(p1),
|
|
121
|
+
decodeUserResult(p2),
|
|
122
|
+
decodeUserResult(p3),
|
|
123
|
+
decodeUserResult(p4),
|
|
124
|
+
decodeUserResult(p5),
|
|
125
|
+
decodeUserResult(p6),
|
|
126
|
+
decodeUserResult(p7),
|
|
127
|
+
decodeUserResult(p8),
|
|
128
|
+
decodeUserResult(p9),
|
|
129
|
+
decodeUserResult(p10),
|
|
130
|
+
decodeUserResult(p11),
|
|
131
|
+
decodeUserResult(p12),
|
|
132
|
+
decodeUserResult(p13),
|
|
133
|
+
decodeUserResult(p14),
|
|
134
|
+
decodeUserResult(p15),
|
|
135
|
+
decodeUserResult(p16),
|
|
136
|
+
decodeUserResult(p17),
|
|
137
|
+
decodeUserResult(p18),
|
|
138
|
+
decodeUserResult(p19),
|
|
139
|
+
decodeUserResult(p20),
|
|
140
|
+
decodeUserResult(p21),
|
|
141
|
+
decodeUserResult(p22),
|
|
142
|
+
decodeUserResult(p23),
|
|
143
|
+
decodeUserResult(p24),
|
|
144
|
+
decodeUserResult(p25),
|
|
145
|
+
decodeUserResult(p26),
|
|
146
|
+
decodeUserResult(p27),
|
|
147
|
+
decodeUserResult(p28),
|
|
148
|
+
decodeUserResult(p29),
|
|
149
|
+
decodeUserResult(p30),
|
|
150
|
+
decodeUserResult(p31),
|
|
151
|
+
decodeUserResult(p32),
|
|
152
|
+
decodeUserResult(p33),
|
|
153
|
+
decodeUserResult(p34),
|
|
154
|
+
decodeUserResult(p35),
|
|
155
|
+
decodeUserResult(p36),
|
|
156
|
+
decodeUserResult(p37),
|
|
157
|
+
decodeUserResult(p38),
|
|
158
|
+
decodeUserResult(p39),
|
|
159
|
+
decodeUserResult(p40),
|
|
160
|
+
decodeUserResult(p41),
|
|
161
|
+
decodeUserResult(p42),
|
|
162
|
+
decodeUserResult(p43),
|
|
163
|
+
decodeUserResult(p44),
|
|
164
|
+
decodeUserResult(p45),
|
|
165
|
+
decodeUserResult(p46),
|
|
166
|
+
decodeUserResult(p47),
|
|
167
|
+
decodeUserResult(p48),
|
|
168
|
+
decodeUserResult(p49),
|
|
169
|
+
decodeUserResult(p50),
|
|
170
|
+
decodeUserResult(p51),
|
|
171
|
+
decodeUserResult(p52),
|
|
172
|
+
decodeUserResult(p53),
|
|
173
|
+
decodeUserResult(p54),
|
|
174
|
+
decodeUserResult(p55),
|
|
175
|
+
decodeUserResult(p56),
|
|
176
|
+
decodeUserResult(p57),
|
|
177
|
+
decodeUserResult(p58),
|
|
178
|
+
decodeUserResult(p59),
|
|
179
|
+
decodeUserResult(p60),
|
|
180
|
+
decodeUserResult(p61),
|
|
181
|
+
decodeUserResult(p62),
|
|
182
|
+
decodeUserResult(p63),
|
|
183
|
+
decodeUserResult(p64),
|
|
184
|
+
decodeUserResult(p65),
|
|
185
|
+
decodeUserResult(p66),
|
|
186
|
+
decodeUserResult(p67),
|
|
187
|
+
decodeUserResult(p68),
|
|
188
|
+
decodeUserResult(p69),
|
|
189
|
+
decodeUserResult(p70),
|
|
190
|
+
decodeUserResult(p71),
|
|
191
|
+
decodeUserResult(p72),
|
|
192
|
+
decodeUserResult(p73),
|
|
193
|
+
decodeUserResult(p74),
|
|
194
|
+
decodeUserResult(p75),
|
|
195
|
+
decodeUserResult(p76),
|
|
196
|
+
decodeUserResult(p77),
|
|
197
|
+
decodeUserResult(p78),
|
|
198
|
+
decodeUserResult(p79),
|
|
199
|
+
decodeUserResult(p80),
|
|
200
|
+
decodeUserResult(p81),
|
|
201
|
+
decodeUserResult(p82),
|
|
202
|
+
decodeUserResult(p83),
|
|
203
|
+
decodeUserResult(p84),
|
|
204
|
+
decodeUserResult(p85),
|
|
205
|
+
decodeUserResult(p86),
|
|
206
|
+
decodeUserResult(p87),
|
|
207
|
+
decodeUserResult(p88),
|
|
208
|
+
decodeUserResult(p89),
|
|
209
|
+
decodeUserResult(p90),
|
|
210
|
+
decodeUserResult(p91),
|
|
211
|
+
decodeUserResult(p92),
|
|
212
|
+
decodeUserResult(p93),
|
|
213
|
+
decodeUserResult(p94),
|
|
214
|
+
decodeUserResult(p95),
|
|
215
|
+
decodeUserResult(p96),
|
|
216
|
+
decodeUserResult(p97),
|
|
217
|
+
decodeUserResult(p98),
|
|
218
|
+
decodeUserResult(p99),
|
|
219
|
+
decodeUserResult(p100)
|
|
220
|
+
];
|
|
221
|
+
}
|
|
222
|
+
}
|
|
@@ -15,6 +15,9 @@ module.exports = {
|
|
|
15
15
|
let res = await axios.post(server + "getGJGauntlets21.php", data, {
|
|
16
16
|
headers: headers
|
|
17
17
|
})
|
|
18
|
+
|
|
19
|
+
if(res.data.toLowerCase() == "error code: 1020") throw new Error("1020 error: Request denied.");
|
|
20
|
+
if(res.data.toLowerCase() == "error code: 1005") throw new Error("1005 error: Your IP address has been blocked from sending requests to a server. It's recommended to use locally (directly from a PC).")
|
|
18
21
|
|
|
19
22
|
let first = res.data.split("|")[0];
|
|
20
23
|
let second = res.data.split("|")[1].split("|")[0];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
getLevelByID:
|
|
3
|
+
async function(id) {
|
|
4
|
+
if(!id || id == "") throw new Error("Please provide a level ID!");
|
|
5
|
+
if(isNaN(id)) throw new Error("The level ID should be a number!");
|
|
6
|
+
|
|
7
|
+
const {decodeLevel} = require("../misc/decodeLevel.js");
|
|
8
|
+
const axios = require("axios");
|
|
9
|
+
const {headers, server, secret} = require("../config.json");
|
|
10
|
+
|
|
11
|
+
const data = {
|
|
12
|
+
secret: secret,
|
|
13
|
+
str: id,
|
|
14
|
+
gameVersion: 21,
|
|
15
|
+
binaryVersion: 35,
|
|
16
|
+
gdw: 0,
|
|
17
|
+
type: 0
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
let res = await axios.post(server + "getGJLevels21.php", data, {
|
|
21
|
+
headers: headers
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
if(res.data == -1) throw new Error("-1 Not found.");
|
|
25
|
+
if(res.data.toLowerCase() == "error code: 1020") throw new Error("1020 error: Request denied.");
|
|
26
|
+
if(res.data.toLowerCase() == "error code: 1005") throw new Error("1005 error: Your IP address has been blocked from sending requests to a server. It's recommended to use locally (directly from a PC).")
|
|
27
|
+
|
|
28
|
+
return decodeLevel(res.data);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
getMapPacks:
|
|
3
|
+
async function(page = 1) {
|
|
4
|
+
const { decodeMapPack } = require("../misc/decodeMapPack.js");
|
|
5
|
+
const axios = require("axios");
|
|
6
|
+
const { headers, server } = require("../config.json");
|
|
7
|
+
const data = {
|
|
8
|
+
secret: "Wmfd2893gb7",
|
|
9
|
+
page: page - 1
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
let res = await axios.post(server + "getGJMapPacks21.php", data, {
|
|
13
|
+
headers: headers
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
if(res.data.toLowerCase() == "error code: 1020") throw new Error("1020 error: Request denied.");
|
|
17
|
+
if(res.data.toLowerCase() == "error code: 1005") throw new Error("1005 error: Your IP address has been blocked from sending requests to a server. It's recommended to use locally (directly from a PC).")
|
|
18
|
+
|
|
19
|
+
let firstMapPack = res.data.split("|")[0];
|
|
20
|
+
let secondMapPack = res.data.split("|")[1].split("|")[0];
|
|
21
|
+
let thirdMapPack = res.data.split("|")[2].split("|")[0];
|
|
22
|
+
let fourthMapPack = res.data.split("|")[3].split("|")[0];
|
|
23
|
+
let fifthMapPack = res.data.split("|")[4].split("|")[0];
|
|
24
|
+
let sixthMapPack;
|
|
25
|
+
let seventhMapPack;
|
|
26
|
+
let eighthMapPack;
|
|
27
|
+
let ninthMapPack;
|
|
28
|
+
let tenthMapPack;
|
|
29
|
+
let result = [decodeMapPack(firstMapPack),decodeMapPack(secondMapPack),decodeMapPack(thirdMapPack),decodeMapPack(fourthMapPack),decodeMapPack(fifthMapPack)]
|
|
30
|
+
|
|
31
|
+
if(res.data.split("|").length - 1 == 9) {
|
|
32
|
+
sixthMapPack = res.data.split("|")[5].split("|")[0];
|
|
33
|
+
seventhMapPack = res.data.split("|")[6].split("|")[0];
|
|
34
|
+
eighthMapPack = res.data.split("|")[7].split("|")[0];
|
|
35
|
+
ninthMapPack = res.data.split("|")[8].split("|")[0];
|
|
36
|
+
tenthMapPack = res.data.split("|")[9].split("|")[0];
|
|
37
|
+
result.push(decodeMapPack(sixthMapPack),decodeMapPack(seventhMapPack),decodeMapPack(eighthMapPack),decodeMapPack(ninthMapPack),decodeMapPack(tenthMapPack))
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -39,9 +39,6 @@ module.exports = {
|
|
|
39
39
|
e,
|
|
40
40
|
round,
|
|
41
41
|
mdo,
|
|
42
|
-
ps,
|
|
43
|
-
ne,
|
|
44
|
-
pt,
|
|
45
42
|
unknown
|
|
46
43
|
} = require("../misc/officialsongs.json");
|
|
47
44
|
const jsons = {
|
|
@@ -79,10 +76,7 @@ module.exports = {
|
|
|
79
76
|
32: s,
|
|
80
77
|
33: e,
|
|
81
78
|
34: round,
|
|
82
|
-
35: mdo
|
|
83
|
-
36: ps,
|
|
84
|
-
37: ne,
|
|
85
|
-
38: pt
|
|
79
|
+
35: mdo
|
|
86
80
|
}
|
|
87
81
|
let result = jsons[Number(song)];
|
|
88
82
|
if(result == undefined) result = unknown;
|
package/functions/getProfile.js
CHANGED
|
@@ -33,6 +33,7 @@ module.exports = {
|
|
|
33
33
|
})
|
|
34
34
|
|
|
35
35
|
if(res.data == -1) throw new Error("-1 Not found.")
|
|
36
|
+
if(res.data.toLowerCase() == "error code: 1020") throw new Error("1020 error: Request denied.");
|
|
36
37
|
if(res.data.toLowerCase() == "error code: 1005") throw new Error("1005 error: Your IP address has been blocked from sending requests to a server. It's recommended to use locally (directly from a PC).")
|
|
37
38
|
|
|
38
39
|
let dataWoSkins = `${res.data.split("21:")[0]}${res.data.split(":48:")[1]}`;
|
|
@@ -73,13 +74,14 @@ module.exports = {
|
|
|
73
74
|
} else {
|
|
74
75
|
stars = stars;
|
|
75
76
|
}
|
|
76
|
-
|
|
77
|
+
|
|
78
|
+
if(dataWoSkins.split("3:")[3] !== undefined) {
|
|
77
79
|
if(dataWoSkins.split("3:")[3].split(":46:")[0] == "") {
|
|
78
80
|
stars = dataWoSkins.split("3:")[4].split(":46:")[0];
|
|
79
81
|
} else {
|
|
80
82
|
stars = stars;
|
|
81
83
|
}
|
|
82
|
-
}
|
|
84
|
+
}
|
|
83
85
|
|
|
84
86
|
let ytLnk = `htps://youtube.com/channel/${youtube}`;
|
|
85
87
|
let twitterLnk = `https://twitter.com/${twitter}`;
|
package/functions/getSongInfo.js
CHANGED
|
@@ -16,6 +16,7 @@ module.exports = {
|
|
|
16
16
|
})
|
|
17
17
|
|
|
18
18
|
if(res.data == -2) throw new Error(`-2. Couldn't find a song with ID ${song}.`)
|
|
19
|
+
if(res.data.toLowerCase() == "error code: 1020") throw new Error("1020 error: Request denied.");
|
|
19
20
|
if(res.data.toLowerCase() == "error code: 1005") throw new Error("1005 error: Your IP address has been blocked from sending requests to a server. It's recommended to use locally (directly from a PC).")
|
|
20
21
|
|
|
21
22
|
const result = {
|