66 lines
2.4 KiB
HTML
66 lines
2.4 KiB
HTML
<!doctype html>
|
|
<html class="staticrypt-html">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>{{ gallery.title }} · {{ settings.title }}</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<!-- do not cache this page -->
|
|
<meta http-equiv="cache-control" content="max-age=0"/>
|
|
<meta http-equiv="cache-control" content="no-cache"/>
|
|
<meta http-equiv="expires" content="0"/>
|
|
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT"/>
|
|
<meta http-equiv="pragma" content="no-cache"/>
|
|
<link type="text/css" rel="stylesheet" href="../static/css/style-page.css" media="screen,projection"/>
|
|
</head>
|
|
|
|
<body class="staticrypt-body">
|
|
<div class="staticrypt-page">
|
|
<div class="staticrypt-form">
|
|
<div class="staticrypt-instructions">
|
|
<img id="logo" src="./../static/img/logo.svg">
|
|
<p class="staticrypt-title">{{ gallery.title }}</p>
|
|
</div>
|
|
|
|
<hr class="staticrypt-hr">
|
|
|
|
<form id="staticrypt-form" action="#" method="post">
|
|
<div id="error" style="color: red; padding-bottom: 10px; height: 20px;"></div>
|
|
<input id="staticrypt-password"
|
|
type="password"
|
|
name="password"
|
|
placeholder="passphrase"
|
|
autofocus/>
|
|
|
|
<input type="submit" class="staticrypt-decrypt-button" value="ENTER"/>
|
|
</form>
|
|
</div>
|
|
|
|
</div>
|
|
<footer style="position: absolute;">
|
|
<p>Generated using <a href="https://github.com/psycojoker/prosopopee">Prosopopée</a> · content under <a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a> · atom logo by <a href="https://thenounproject.com/jjjon/">Jonathan Li</a> under <a href="https://creativecommons.org/licenses/by/3.0/">CC-BY</a></p>
|
|
</footer>
|
|
<script type="text/javascript" src="../static/js/crypto-js.min.js" charset="utf-8"></script>
|
|
|
|
<script>
|
|
document.getElementById('staticrypt-form').addEventListener('submit', function(e) {
|
|
e.preventDefault();
|
|
|
|
var passphrase = document.getElementById('staticrypt-password').value,
|
|
encryptedMsg = '{{ ciphertext }}';
|
|
|
|
try{
|
|
var plainHTML = CryptoJS.AES.decrypt(encryptedMsg, passphrase).toString(CryptoJS.enc.Utf8);
|
|
}
|
|
catch(err) {
|
|
document.getElementById("error").innerHTML = "Wrong keyword entry."
|
|
return;
|
|
}
|
|
|
|
document.write(plainHTML);
|
|
document.close();
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|