-
Notifications
You must be signed in to change notification settings - Fork 38
/
home.html
350 lines (322 loc) · 18.2 KB
/
home.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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
<!doctype html>
<html lang="en">
<head>
<script type="text/javascript">
const showBuilder = false;
/* if you host this page yourself you can enter the encrypted ID prefix here to shorten the IDs
for example if you have IDs like: ABCD.1234, ABCD.5678
the line below should look like this:
const encryptedIdPrefix = 'ABCD';
and then you can share those IDs instead: 1234, 5678
*/
const encryptedIdPrefix = '';
</script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="dark.css">
<title>Google Drive - encrypted folder copy</title>
<style>
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 90px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 90px;
line-height: 30px;
background-color: #eee;
}
.footer > .container {
padding: 15px 0;
}
#account_list table td:first-child {
cursor: pointer;
}
.account_row.loading .close, .account_row:not(.loading) .spinner-border {
display: none;
}
pre{color:unset;}
</style>
</head>
<body>
<script type="text/javascript">
if(localStorage.getItem("theme") === "dark") {
document.body.classList.add("dark");
}
</script>
<nav class="navbar navbar-expand navbar-dark bg-primary">
<div class="container">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="./">Decrypt links</a>
</li>
<li id="builder" class="nav-item">
<a class="nav-link" href="build.html">How to encrypt links</a>
</li>
<li id="builder" class="nav-item">
<a class="nav-link" href="create.html">How to Create Shared Drive</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="modal" href="#instructions_modal">Instructions</a>
</li>
<li class="nav-item">
<a id="dark_toggle" class="nav-link" data-toggle="modal" href="#"><span class="dark_switch">Dark</span><span class="light_switch">Light</span> mode</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container"><div class="row"><div class="col">
<div id="browser_sucks" style="display: none;">
<div class="alert alert-danger mt-4">This page won't work properly in your browser. Use the newest Firefox or Chrome.</div>
</div>
<div id="browser_ok" style="display: none;">
<div class="alert alert-danger mt-4">Always use a dummy account for security reasons.</div>
<div class="card my-4">
<div class="card-body">
<div data-account-type="main">
<div class="select_acc">
<button class="select_acc_button btn btn-primary btn-block" data-toggle="modal" data-target="#account_selection">Select account</button>
</div>
<div class="acc_info" style="display: none;">
<div class="form-row align-items-center">
<div class="user_name col-12 col-lg"></div>
<div class="free_space col col-lg-2 text-lg-center"></div>
<div class="col-3 col-md-2">
<button class="btn btn-primary btn-block" data-toggle="modal" data-target="#account_selection">Switch</button>
</div>
</div>
</div>
</div>
<div data-account-type="dummy">
<div class="select_acc" style="display: none;">
<div class="form-row align-items-center pt-3">
<div class="col">
<button class="select_acc_button btn btn-primary btn-block" data-toggle="modal" data-target="#account_selection">Select a dummy account</button>
</div>
<div class="col">
<button id="mark_as_dummy" class="btn btn-danger btn-block">This is a dummy account</button>
</div>
</div>
</div>
<div class="acc_info" style="display: none;">
<hr>
<span>Dummy account:</span>
<div class="form-row align-items-center">
<div class="user_name col-12 col-lg"></div>
<div class="free_space col col-lg-2 text-lg-center"></div>
<div class="col-3 col-md-2">
<button class="btn btn-primary btn-block" data-toggle="modal" data-target="#account_selection">Switch</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="my_files" class="card my-4" style="display: none;">
<div class="file_list card-body"></div>
</div>
<div id="server_card" class="card my-4" style="display: none;">
<div class="card-body">
<div class="form-row align-items-center">
<div class="col">
<input id="folder_input" type="text" class="form-control" placeholder="Encrypted folder ID or normal folder link">
</div>
<div class="col-3 col-md-2">
<button id="folder_load" class="btn btn-primary btn-block">Load</button>
</div>
</div>
<div id="server_files" style="display: none;">
<hr><div class="file_list"></div>
</div>
</div>
</div>
</div></div></div>
<footer class="footer">
<div class="container">
<div class="text-muted">made by <b>anadius</b> | <a data-toggle="modal" href="#donate">Donate</a> | <a href="https://github.com/anadius/gd-efc">Github</a> (free source code) | <a href="https://discord.gg/mWgKtsD">Discord</a> | <a href="https://www.reddit.com/u/anadius1">Reddit</a></div>
<div class="text-muted">If you paid for this script you were scammed!</div>
</div>
</footer>
<div class="modal fade" id="account_selection" tabindex="-1" data-account-type="">
<div class="modal-dialog modal-lg modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Select account</h5>
<button type="button" class="close" data-dismiss="modal"><span>×</span></button>
</div>
<div class="modal-body">
<div id="account_list" style="display: none;">
<table class="table table-hover table-sm table-borderless"><tbody></tbody></table><hr>
</div>
<h5>Add another account:</h5>
<div class="form-row align-items-center pb-3">
<div class="col-3 col-lg-2">
<button id="get_auth" class="btn btn-primary btn-block">Get auth</button>
</div>
<div class="col">
<input id="auth_input" type="text" class="form-control" placeholder="Paste auth code here">
</div>
<div class="col-3 col-lg-2">
<button id="auth_continue" class="btn btn-primary btn-block">Continue</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="destination_selection" tabindex="-1">
<div class="modal-dialog modal-lg modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Select destination folder</h5>
<button type="button" class="close" data-dismiss="modal"><span>×</span></button>
</div>
<div class="modal-body">
<div id="drive_select"></div>
<p>Or enter the folder URL in one of the following formats:</p>
<code><pre>https://drive.google.com/drive/folders/<folder id>
https://drive.google.com/open?id=<folder id></pre></code>
<p>Leave it empty or type <code>root</code> if you want to use main folder of your Google Drive.
<div class="form-row align-items-center pb-3">
<div class="col">
<input id="destination_input" type="text" class="form-control" placeholder="Paste folder URL here">
</div>
<div class="col-3 col-lg-2">
<button id="destination_continue" class="btn btn-primary btn-block">Continue</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="modal_prompt" tabindex="-1">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"></h5>
<button type="button" class="close" data-dismiss="modal"><span>×</span></button>
</div>
<div class="modal-body">
<div class="prompt_body"></div>
<textarea class="form-control my-3" rows="3"></textarea>
<input class="form-control my-3" type="text">
<button class="btn btn-primary btn-block">Continue</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="share_links" tabindex="-1">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Share links</h5>
<button type="button" class="close" data-dismiss="modal"><span>×</span></button>
</div>
<div class="modal-body">
<textarea class="form-control" rows="6"></textarea>
</div>
</div>
</div>
</div>
<div class="modal fade" id="error_modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"></h5>
<button type="button" class="close" data-dismiss="modal"><span>×</span></button>
</div>
<div class="modal-body">
</div>
</div>
</div>
</div>
<div class="modal fade" id="loading_modal" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" data-keyboard="false"><div class="modal-dialog modal-dialog-centered justify-content-center" role="document"><div class="spinner-border" role="status"><span class="sr-only">Loading...</span></div></div></div>
<div class="modal fade" id="instructions_modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Instructions</h5>
<button type="button" class="close" data-dismiss="modal"><span>×</span></button>
</div>
<div class="modal-body">
<div class="alert alert-primary">If you get "Rate Limit Exceeded" error wait a minute and try again.</div>
<h5>1. Log in.</h5>
<p>Click on the <b>Select account</b> button. If you logged in before you can select your account from the list. If you want to add a new account click on the <b>Get auth</b> button, follow the steps on screen, copy authorization code, paste it to the input field and press <b>Continue</b>.</p>
<p>After logging in you will see your name, email and free space on your drive listed in the first box. Click on the <b>Switch</b> button to switch to another account.</p>
<h5>2. Select destination folder and manage your files.</h5>
<p>The second box lets you manage files on your drive. Click on the <b>Select</b> button to choose the destination folder for copied files. Click on the <b>Reload</b> button to load list of your files in this folder again.</p>
<div class="alert alert-warning">Only files copied using this tool are displayed there!</div>
<p>Select some files and press <b>Share</b> to copy their public links - this is useful if you're using <b>JDownloader</b> for downloading files. Click on the <b>Delete</b> or <b>Trash</b> buttons to remove files completely or move them to the trash.</p>
<h5>3. Copy files</h5>
<p>Paste encrypted folder ID or a normal folder link to the input field in the third box and press <b>Load</b>.
<div class="alert alert-danger">If you use encrypted folder ID then your access token is sent to the decryption server. Lifespan of that token is one hour. That means for one hour that server has access to your whole Google Drive! That's why you should always use a dummy account. The default decryption server code doesn't store anything but all it takes is one malicious person with a modified decryption server to wipe out your Google Drive or worse, steal your data. If you're using encrypted folder IDs with your main account - make sure you trust the person that shared it.</div>
<p>Click on the <b>.MD5</b> button to download MD5 hashsums for all listed files. Select some files and press <b>Copy</b> to copy them to your drive.</p>
<hr>
<h5>Best practices</h5>
<p>If you're just downloading files - use a dummy acc. Copy files to your drive, download them and then delete from your drive.</p>
<div class="alert alert-primary">Tip: if your destination folder is already made public all files copied to it are public too, that saves you some time.</div>
<p>If you want to store files on your main account - open two tabs. In the first tab log into your dummy account and use encrypted folder ID to copy files to dummy account. In second tab log into your main account and use folder link from the dummy account to copy files from dummy account to your main one.</p>
</div>
</div>
</div>
</div>
<div class="modal fade" id="donate" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog modal-dialog-scrollable modal-lg" role="document"><div class="modal-content"><div class="modal-header"><h5 class="modal-title">Donate</h5><button type="button" class="close" data-dismiss="modal"><span>×</span></button></div><div class="modal-body"><p>If you like this project you can donate to me (person who made this page/script, not the person who shared the encrypted folder!). You can send <a href="https://www.amazon.de/Digitaler-Amazon-Gutschein-Blaues-Amazon/dp/B07Q1JNC7R/?language=en_GB">Amazon Gift Cards</a> or anything else you want to <img class="donate-image" src=" data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAAAWCAIAAAB8GDRYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAILSURBVFhH7VbZdQIxDEyTdEIl28f2QR8UQnRZl+UsL4m5nudLkkdjaeIAX7eFOVjOzsJydhaWs7OwnJ2FRzl72U6n7SLReb9S8XdAKQ+WfTk83tm/gEyNf5frfn5NeytnZVhBm5ne2kWP3H41H6Cv67zv/ZuNZrvM6XkXsVy/dmoYzNnK3I1jtLJOZ0M03EUejNnQOxsWJkHOWFtOMBG5Ed8b4Xsh5nJotMyXXYxyLiSAjqi5y7AndHHMTVz2FNdpOCaHtlLj6NPAdrMIETOD1hMh6PAUkTFqFMDwtlI7R6oktlzqb6nvC5zqvkNybsKGJDJyFlsbuCWKZenMt00ZdjUwf3SW11IhBtSqJlO1+1Sf0Q6MAPCcqMg4IuN5ByUx6k8D49m9cYJY7/lhNgDmyueDkaBAdJkMCR0mFqTVnPlizI/MCjgi5+0qdM6mwezeOIFmI36ku1QbIiPxBc4XatJmQhBt3Umopf/qbNmUUDmrPXhBezVJTLMhnxI5QVJLIO4J3FkKEhmDdGotXijeRYndxhGXfWzNgmMy3RnKmgiKz1mkCUBEtTQguGzAB/DygPJXF8eNgL+TesEgpf0EEHEhkQhY3DYTlqM7nLXqHWS3HUAJhtE32OshbNuB1qSd/fLPxPs4C0DTCtuoXD6rZ+KtnCX4f0JGfMnL2U/HcnYWlrOzsJydg9vtG7hDy+03ULxsAAAAAElFTkSuQmCC">.</p></div></div></div></div>
<div id="templates" class="d-none">
<table><tbody>
<tr class="account_row"><td class="col"></td><td class="col-auto" style="padding-top: 2px;"><button type="button" class="close remove-acc"><span class="remove-acc">×</span></button><div role="status" class="spinner-border spinner-border-sm"></div></td></tr>
<tr class="file_row"><td><div class="custom-control custom-checkbox"><input type="checkbox" class="custom-control-input"><label class="filename custom-control-label"></label></div></td><td class="filesize text-right"></td></tr>
<tr class="folder_row"><td colspan="2"></td></tr>
</tbody></table>
<div class="file_button col-3 col-md-2"><button class="btn btn-primary btn-block"></button></div>
<div class="file_list"><div class="title_container form-row align-items-center"><h4 class="col-12 col-md" data-toggle="collapse"></h4></div><div class="collapse show"><div class="details_container form-row align-items-center pt-2"><div class="col-12 col-md pb-2 pb-md-0">Found <b class="files_count"></b> files. Total weight <b class="files_size"></b>.</div></div><table class="table table-sm table-hover mt-3 mb-0"><thead><tr><th scope="col" class="col"><div class="custom-control custom-checkbox custom-control-inline" style="margin-right: -5px"><input type="checkbox" class="custom-control-input"><label class="custom-control-label"> </label></div>Name</th><th scope="col" class="text-right">Size</th></tr></thead><tbody class="files"></tbody></table></div></div>
</div>
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script type="text/javascript">
$("#dark_toggle").click(event => {
event.preventDefault();
if($(document.body).toggleClass("dark").hasClass("dark")) {
localStorage.setItem("theme", "dark");
}
else {
localStorage.removeItem("theme");
}
});
</script>
<script type="text/javascript">
try {
eval("class A { async * a() { yield 1; } }");
if(!String.prototype.hasOwnProperty("matchAll")) {
throw Error("unsupported");
}
}
catch(e) {
$("#browser_sucks").show();
throw e;
}
$("#browser_ok").show();
if(showBuilder || ["localhost", "anadius.github.io"].includes(document.location.hostname)) {
$("#builder").show();
}
</script>
<script src="common.js"></script>
<script src="main.obf.js"></script>
</body>
</html>