Skip to content

Instantly share code, notes, and snippets.

@lahwaacz
Created November 11, 2013 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lahwaacz/7419470 to your computer and use it in GitHub Desktop.
Save lahwaacz/7419470 to your computer and use it in GitHub Desktop.
dbxlz7mhc2.html (see https://aur.archlinux.org/packages/dropbox/ for relevant discussion)
<!DOCTYPE html>
<!-- the following line is required for our script to run in IE -->
<!-- saved from url=(0023)https://www.dropbox.com -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
(function () {
"use strict";
function go() {
var c = '<86 hex chars long hash>';
var b = window.location.hash.substr(1);
window.location.hash = '';
var a = '';
if (c.length !== b.length || (c.length % 2) !== 0) {
a = '**' + c; // XXX - See note2 above
} else {
// hex-decode and xor
for (var i = 0; i !== c.length; i += 2) {
a += String.fromCharCode(parseInt(c.slice(i, i + 2), 16) ^ parseInt(b.slice(i, i + 2), 16));
}
}
var n = document.getElementById('n');
n.setAttribute('value', a);
document.desktop_login.submit();
setTimeout(function() { window.location = "https://www.dropbox.com/home"; }, 30000);
}
window.onload = go;
})();
</script>
<style type="text/css">
div.center {
text-align: center;
margin: 40px 0;
}
img {
margin: auto;
}
body {
font-family: Sans-Serif;
font-size: 14pt;
padding: 80px 0;
}
</style>
<title>Dropbox</title>
</head>
<body>
<form name="desktop_login" action="https://www.dropbox.com/desktop_login" method="post">
<input type="hidden" name="i" value="321487158">
<input id='n' type="hidden" name="n" value="">
<input type="hidden" name="u" value="home">
<input type="hidden" name="c" value="">
<noscript>
<div class="center">
<meta id="meta-refresh" http-equiv="refresh" content="2;URL='https://www.dropbox.com/login?cont=/home'">
<p>Dropbox cannot log you in automatically because your browser has scripts disabled.</p>
<a href="https://www.dropbox.com/login?cont=/home">Sign in manually</a>
</div>
</noscript>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment