-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlimbus-company.html
256 lines (204 loc) · 8.59 KB
/
limbus-company.html
1
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Limbus Company Booster</title>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<style>
html, body {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
padding: 0;
margin: 0;
overflow: hidden;
font-size: 30px;
font-family: "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
color: white;
background-color: #000000;
height: 100%;
width: 100%;
}
div {
padding: 5px;
}
input[type=text] {
font-size:16px;
width: 150px;
padding: 12px 20px;
margin-top: 10px;
margin-bottom: 5px;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
button {
text-decoration: none;
margin: 10px;
padding: 10px 20px;
font-size:16px;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
.dropbox {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-top: 10px;
padding: 30px;
border: 3px dotted #a3a3a3;
}
.ready {
background-color: rgb(31, 85, 31);
}
.unready {
background-color: rgb(82, 22, 22);
}
.waiting {
background-color: rgb(102, 80, 17);
}
a:link {
color: #60c5ff;
background-color: transparent;
text-decoration: none;
}
a:visited {
color: #60c5ff;
background-color: transparent;
text-decoration: none;
}
a:hover {
color: #c485ff;
background-color: transparent;
text-decoration: underline;
}
a:active {
color: #c485ff;
background-color: transparent;
text-decoration: underline;
}
</style>
</head>
<body>
<div style="font-size:32px; color:rgb(255, 174, 0);"><b>PERMANENTLY ARCHIVED - NO LONGER FUNCTIONAL</b></div>
<div style="font-size:24px; color:rgb(255, 115, 0);"><b>Running the CORS Anywhere proxy costs money so I won't be maintaining this service.</b></div>
<div style="font-size:24px; color:rgb(208, 255, 0);"><b>Feel free to fork on <a href="https://github.com/x753/x753.github.io/blob/master/limbus-company.html">GitHub</a></b></div>
<div style="font-size:32px; color:red;"><b>USE AT YOUR OWN RISK</b></div>
<div style="font-size:26px;"><b>Select your Player.log file, found here:</b></div>
<div style="font-size:22px;">%USERPROFILE%\AppData\LocalLow\ProjectMoon\LimbusCompany</div>
<div class="dropbox" ondragenter="dragEnterHandler(event);" ondragover="dragOverHandler(event);" ondragleave="dragLeaveHandler(event);" ondrop="dropHandler(event);">
<div style="font-size:26px;"><b>Drag and drop Player.log file here</b></div>
<input id="fileinput" type="file" hidden accept=".log" id="fileID" style="display:none;">
<button id="choosefile" class="choosefile unready">or Choose File</button>
</div>
<form id="generateByName" onsubmit="generateByName(); return false;" autocomplete="off"> <!-- Wrapping this in a form lets you hit enter to submit, return false; prevents the page from refreshing on submission -->
<div class="centerpoint">
<input type="text" id="uid" placeholder="uid" style="width: 200px" readonly>
<input type="text" id="authCode" placeholder="authCode" style="width: 200px" readonly>
</div>
</form>
<button id="boost" style="font-size:32px;" class="choosefile unready">Boost my Account</button>
<div style="font-size:14px;">Experience is granted to your current team as if they had just completed stage 2-1.</div>
<div style="font-size:14px;">Some Battle Pass missions will be cleared automatically.</div>
<script>
const boostButton = document.getElementById('boost');
var boostNum = 0;
boostButton.addEventListener('click', async _ => {
boostButton.classList.remove("ready");
boostButton.classList.add("waiting");
boostButton.disabled = true;
var requestData = '{"userAuth":{"uid":uidPlaceholder,"dbid":0,"authCode":"authCodePlaceholder","version":"1.0.0","synchronousDataVersion":2},"parameters":{"mainchapterid":1,"subchapterid":101,"nodeid":10102,"stageid":10101,"iswin":true,"turn":4,"formationid":0,"battlePassParameters":{"enemyKillCount":1000,"abnormalityKillCount":100,"isUsedDailyChar":true,"isUsedSeasonEgo":true,"isUsedSeasonAnnouncer":true},"supportCharacterId":-1,"supportParticipate":true}}';
requestData = requestData.replace('uidPlaceholder',document.getElementById("uid").value);
requestData = requestData.replace('authCodePlaceholder',document.getElementById("authCode").value);
try {
const response = await fetch('https://limbus-corrs-anywhere.herokuapp.com/https://www.limbuscompanyapi.com/api/ExitStageBattle', {
method: 'post',
headers: {
"Content-Type": "application/json"
},
body: requestData,
});
console.log('Success!', response);
if(response.status == 200)
{
boostNum++;
boostButton.textContent = "Boost my Account +" + boostNum;
boostButton.classList.remove("waiting");
boostButton.classList.add("ready");
boostButton.disabled = false;
}
else
{
boostButton.classList.remove("waiting");
boostButton.classList.add("unready");
boostButton.textContent = "ERROR, REFRESH THE PAGE";
}
} catch(err) {
console.error(`Error: ${err}`);
}
});
</script>
<script>
var choosefile = document.getElementById("choosefile");
var input = document.getElementById("fileinput");
var boost = document.getElementById("boost");
choosefile.onclick = () => {
input.click();
};
input.addEventListener("change", function (e) {
var file = e.target.files[0];
choosefile.innerHTML = file.name;
var reader = new FileReader();
reader.readAsText(file);
reader.onload = () => {
extractAuth(reader.result);
};
});
function dragEnterHandler(e) {
e.preventDefault();
}
function dragOverHandler(e) {
e.preventDefault();
}
function dragLeaveHandler(e) {
e.preventDefault();
}
function dropHandler(e) {
e.preventDefault();
var file = e.dataTransfer.files[0];
if(file.name.includes('.log'))
{
choosefile.innerHTML = file.name;
var reader = new FileReader();
reader.readAsText(file);
reader.onload = () => {
extractAuth(reader.result);
};
}
}
function extractAuth(result)
{
if(result.includes('"serverInfo":{"version":"dev"},"state":"ok","result"'))
{
choosefile.classList.add("ready");
choosefile.classList.remove("unready");
boost.classList.add("ready");
boost.classList.remove("unready");
var uid = getStringBetween(result, '{"userAuth":{"uid":', ',"public_id"');
var authCode = getStringBetween(result, '"auth_code":"', '","last_login_date"');
document.getElementById("uid").value = uid;
document.getElementById("authCode").value = authCode;
}
}
function getStringBetween(str, start, end) {
const result = str.match(new RegExp(start + "(.*)" + end));
return result[1];
}
</script>
</body>
</html>