-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
6 lines (6 loc) · 16 KB
/
index.html
1
2
3
4
5
6
<!DOCTYPE html><html lang="en"><head><script type="text/javascript">const showBuilder = false;
const encryptedIdPrefix = "";
const defaultClientId = "";
const defaultClientSecret = "";</script><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><link rel="icon" href="favicon.ico"><link rel="stylesheet" href="./app.css"><title>Google Drive - encrypted folder copy</title><style>html{position:relative;min-height:100%}body{margin-bottom:90px}.footer{position:absolute;bottom:0;width:100%;min-height:10px;line-height:30px;background-color:#eee}.footer>.container{padding:10px}#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">("dark"===localStorage.getItem("theme")||null===localStorage.getItem("theme")&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches)&&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" style="display:none"><a class="nav-link" href="build.html">How to encrypt links</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="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 text-center mx-auto">Made with <svg style="fill:#343a40" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><path d="M19 6.734c0 4.164-3.75 6.98-3.75 10.266h-1.992c.001-2.079.997-3.826 1.968-5.513.912-1.585 1.774-3.083 1.774-4.753 0-3.108-2.517-4.734-5.004-4.734-2.483 0-4.996 1.626-4.996 4.734 0 1.67.862 3.168 1.774 4.753.971 1.687 1.966 3.434 1.967 5.513h-1.991c0-3.286-3.75-6.103-3.75-10.266 0-4.343 3.498-6.734 6.996-6.734 3.502 0 7.004 2.394 7.004 6.734zm-4 11.766c0 .276-.224.5-.5.5h-5c-.276 0-.5-.224-.5-.5s.224-.5.5-.5h5c.276 0 .5.224.5.5zm0 2c0 .276-.224.5-.5.5h-5c-.276 0-.5-.224-.5-.5s.224-.5.5-.5h5c.276 0 .5.224.5.5zm-1.701 3.159c-.19.216-.465.341-.753.341h-1.093c-.288 0-.562-.125-.752-.341l-1.451-1.659h5.5l-1.451 1.659zm-2.182-11.123l3.633-5.536h-2.113l1.05-3.463-3.794 5.463h2.302l-1.078 3.536z"/></svg> by <a rel="noopener noreferrer" target="_blank" href="https://github.com/anadius/gd-efc">anadius</a> | Modified with <svg style="fill:#dc3545" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><path d="M12 4.435c-1.989-5.399-12-4.597-12 3.568 0 4.068 3.06 9.481 12 14.997 8.94-5.516 12-10.929 12-14.997 0-8.118-10-8.999-12-3.568z"/></svg> by <a rel="noopener noreferrer" target="_blank" href="https://github.com/mandarnaik016">mandarnaik016</a></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"><div class="custom-control custom-checkbox"><input type="checkbox" class="custom-control-input" id="custom_oauth" data-toggle="collapse" data-target="#custom_oauth_rows" autocomplete="off"> <label class="custom-control-label" for="custom_oauth">Use custom OAuth credentials</label> <span id="custom_oauth_info1"><a data-toggle="modal" href="#oauth_modal">(what is that?)</a></span> <span id="custom_oauth_info2">(log out from all accounts to change)</span></div></div></div><div id="custom_oauth_rows2"><div id="custom_oauth_rows" class="collapse"><div class="form-row align-items-center pb-3"><div class="col"><input id="client_id" type="text" class="form-control" placeholder="Paste client ID here"></div><div class="col-3 col-lg-2"><button id="reset_oauth" class="btn btn-primary btn-block">Reset</button></div></div><div class="form-row align-items-center pb-3"><div class="col"><input id="client_secret" type="text" class="form-control" placeholder="Paste client secret here"></div><div class="col-3 col-lg-2"><button id="save_oauth" class="btn btn-primary btn-block">Save</button></div></div></div></div><div class="form-row align-items-center pb-3"><div class="col"><span>Click on "Get auth" and allow the application to use your Drive. You will be redirected to a page that doesn't load. It's all fine, just copy the address, paste in the box below and click "Continue".</span></div></div><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 the redirected link 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.</p><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"><h5>Video instructions</h5><p><iframe style="width:100%;aspect-ratio:16/9" src="https://www.youtube.com/embed/Af6Zlt5SeEY" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></p><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 the address of the final page (the one that doesn't load), 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>.</p><p>Select some files and press <b>Copy</b> to copy them to your drive. Click on the <b>.MD5</b> button to download MD5 hashsums for all listed files.</p><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><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="oauth_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">Custom OAuth credentials</h5><button type="button" class="close" data-dismiss="modal"><span>×</span></button></div><div class="modal-body"><p>If you're tired of getting "Rate Limit Exceeded" error or just don't want to use <code>rclone</code> credentials you can always use your own. To do this you need to create a Google Drive app.</p><p>You can make one following <a href="https://rclone.org/drive/#making-your-own-client-id">this guide</a>.</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><script src="./app.js"></script></body></html>