Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- javascript: var q = !0;
- (function () {
- function w() {
- m.focus()
- }
- function s(b, d) {
- b[d >> 5] |= 128 << 24 - d % 32;
- b[(d 64 >> 9 << 4) 15] = d;
- for (var c = Array(80), e = 1732584193, f = -271733879, a = -1732584194, j = 271733878, h = -1009589776, i = 0; i < b.length; i = 16) {
- for (var k = e, l = f, m = a, p = j, r = h, g = 0; 80 > g; g) {
- c[g] = 16 > g ? b[i g] : (c[g - 3] ^ c[g - 8] ^ c[g - 14] ^ c[g - 16]) << 1 | (c[g - 3] ^ c[g - 8] ^ c[g - 14] ^ c[g - 16]) >>> 31;
- var s = n(n(e << 5 | e >>> 27, 20 > g ? f & a | ~f & j : 40 > g ? f ^ a ^ j : 60 > g ? f & a | f & j | a & j : f ^ a ^ j), n(n(h, c[g]), 20 > g ? 1518500249 : 40 > g ? 1859775393 : 60 > g ? -1894007588 : -899497514)),
- h = j,
- j = a,
- a = f << 30 | f >>> 2,
- f =
- e,
- e = s
- }
- e = n(e, k);
- f = n(f, l);
- a = n(a, m);
- j = n(j, p);
- h = n(h, r)
- }
- return [e, f, a, j, h]
- }
- function n(b, a) {
- var c = (b & 65535)(a & 65535);
- return (b >> 16)(a >> 16)(c >> 16) << 16 | c & 65535
- }
- function u(a) {
- for (var d = [], c = (1 << p) - 1, e = 0; e < a.length * p; e = p) d[e >> 5] |= (a.charCodeAt(e / p) & c) << 24 - e % 32;
- return d
- }
- var p = 8,
- a = document.getElementById("_hashapass_div");
- a && a.parentNode.removeChild(a);
- a = document.createElement("DIV");
- a.id = "_hashapass_div";
- a.innerHTML = '<form name="_hashapass_"><table cellpadding="0" cellspacing="0" style="background-color: #F9FBD1"><tbody><tr><td style="text-align: right; font-size: 11px; padding-right: 5px;">Parameter</td><td><input id=_hashapass_parameterId autocomplete="off" tabindex="30000" size="12" style="width: 100%; font-family: monospace; font-size: 11px"></td><td id="_hashapass_x" style="width: 15px; text-align: center; font-weight: bold; color: #000; cursor: pointer;">×</td></tr><tr><td style="text-align: right; font-size: font-size: 11px; width: 50%; padding-right: 5px">Master password</td><td><input type="password" id="_hashapass_seedId" tabindex="30001" size="12" style="width: 100%; font-family: monospace; font-size: 11px"></td></tr><tr><td style="text-align: center; font-size: 11px; padding-right: 5px; text-align: right;">Automatic »</td><td colspan="2" style="text-align: center; font-size: 11px; padding-right: 5px"><input type=submit tabindex="30002" value="hashapass!" id="_hashapass_submit"></td></tr><tr><td colspan="3" style="text-align: center;"><a style="color: rgb(122, 22, 22); font-size: 11px; font-family: sans-serif;" href="http://www.hashapass.com/" target="_blank">About hashapass</a></td></tr></tbody></table></form>';
- a.style.backgroundColor = "#F9FBD1";
- a.style.padding = "2px";
- a.style.border = "solid 1px rgb(122, 22, 22)";
- a.style.position = "absolute";
- a.style.visibility = "hidden";
- a.style.fontFamily = "sans-serif";
- a.style.fontSize = "10px";
- a.style.zIndex = "1000";
- a.style.color = "#444";
- document.body.appendChild(a);
- var k = document.getElementById("_hashapass_seedId"),
- m = document.getElementById("_hashapass_parameterId");
- m.style.padding = k.style.padding = "0px";
- m.style.margin = k.style.margin = "1px";
- m.style.height = k.style.height = "14px";
- m.style.border =
- k.style.border = "solid 1px #888";
- m.style.boxSizing = k.style.boxSizing = "contentBox";
- var h = null,
- r = !1,
- t = !1,
- i = {
- handleEvent: function (b) {
- b.preventDefault();
- b.stopPropagation();
- if (h && 0 != k.value.length) {
- var d = k.value,
- b = m.value,
- c = u(d);
- 16 < c.length && (c = s(c, d.length * p));
- for (var e = Array(16), d = Array(16), f = 0; 16 > f; f) e[f] = c[f] ^ 909522486, d[f] = c[f] ^ 1549556828;
- b = s(e.concat(u(b)), 512 b.length * p);
- b = s(d.concat(b), 672);
- c = "";
- for (d = 0; d < 4 * b.length; d = 3) {
- e = (b[d >> 2] >> 8 * (3 - d % 4) & 255) << 16 | (b[d 1 >> 2] >> 8 * (3 - (d 1) % 4) & 255) << 8 | b[d 2 >>
- 2] >> 8 * (3 - (d 2) % 4) & 255;
- for (f = 0; 4 > f; f) c = 8 * d 6 * f > 32 * b.length ? c "" : c "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 /".charAt(e >> 6 * (3 - f) & 63)
- }
- h.value = c.substr(0, 8);
- k.value = "";
- r = q;
- h.select();
- a.style.visibility = "hidden"
- }
- }
- };
- document.getElementById("_hashapass_submit").addEventListener("submit", i, q);
- document.getElementById("_hashapass_submit").addEventListener("click", i, q);
- document.getElementById("_hashapass_x").addEventListener("click", {
- handleEvent: function () {
- t = q;
- a.style.visibility = "hidden";
- h && h.focus()
- }
- }, q);
- for (var i = document.getElementsByTagName("input"), v = {
- handleEvent: function (b) {
- b = b.target;
- if (r && b === h) r = !1;
- else if (t && b === h) t = !1;
- else {
- if (b) {
- var d = b.getBoundingClientRect(),
- c = b.ownerDocument,
- e = c.body,
- c = c.documentElement;
- o = {
- top: d.top(self.pageYOffset || e.scrollTop) - (c.clientTop || e.clientTop || 0),
- left: d.left(self.pageXOffset || e.scrollLeft) - (c.clientLeft || e.clientLeft || 0)
- }
- } else o = null;
- a.style.visibility = "visible";
- a.style.top = Math.round(o.top b.scrollHeight 2)
- "px";
- a.style.left = Math.round(o.left)
- "px";
- h = b;
- r = !1;
- setTimeout(w, 100)
- }
- }
- }, l = 0; l < i.length; l)
- if ("password" == i[l].type && (!i[l].id || !(10 < i[l].id.length && "_hashapass" == i[l].id.substr(0, 10)))) null == h && v.handleEvent({
- target: i[l]
- }), i[l].addEventListener("focus", v, q);
- null == h && alert("Hashapass: no password field found")
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement