-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbookmarklet.min.html
20 lines (19 loc) · 6.03 KB
/
bookmarklet.min.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!--
How to obtain the compressed code:
1) copy the bookmarklet code from https://raw.githubusercontent.com/waldyrious/hash-my-pass/gh-pages/bookmarklet.js
OPTIONAL: to bake in a password (not recommended!):
- remove the pressHashMyPass(), removeElement() and init() functions
- remove the line "window['removeElement'] = removeElement;"
- remove the argument from the hmp() function
- replace the call to init() at the end with a call to hmp()
- remove the "if (master !== '' && master !== null) {" wrapping the contents of hmp()
- replace masterpw by the string with the desired password
in line "var p = b64_sha1(masterpw+':'+domain).substr(0,8);"
2) run the code through http://closure-compiler.appspot.com/home (use the advanced optimization option)
3) encode the result at http://meyerweb.com/eric/tools/dencoder/
4) add "javascript:" to the beginning and place in the href attribute of the <a> below
5) change the version number in the link text (format YY.MM.DD)
6) replace the UPDATED marker below (format YYYY-MM-DD):
UPDATED: 2019-03-18
-->
<a href="javascript:var%20m%3Dfunction%20l(b)%7Bfunction%20c(a%2Cb)%7Breturn%20a%3E%3E%3Eb%7Ca%3C%3C32-b%7Dfor(var%20a%2Cf%2Cg%3DMath.pow%2Cd%3Dg(2%2C32)%2Cp%3D%22%22%2Ch%3D%5B%5D%2Cn%3D8*b.length%2Ce%3Dl.b%3Dl.b%7C%7C%5B%5D%2Cv%3Dl.k%3Dl.k%7C%7C%5B%5D%2Cr%3Dv.length%2Cq%3D%7B%7D%2Ct%3D2%3B64%3Er%3Bt%2B%2B)if(!q%5Bt%5D)%7Bfor(a%3D0%3B313%3Ea%3Ba%2B%3Dt)q%5Ba%5D%3Dt%3Be%5Br%5D%3Dg(t%2C.5)*d%7C0%3Bv%5Br%2B%2B%5D%3Dg(t%2C1%2F3)*d%7C0%7Dfor(b%2B%3D%22%5Cu0080%22%3Bb.length%2564-56%3B)b%2B%3D%22%5Cx00%22%3Bfor(a%3D0%3Ba%3Cb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Child(document.getElementById(b))%3Bdocument.body.removeChild(document.getElementById(k))%7D%3B%0Afunction%20u(b)%7Bif(%22%22!%3D%3Db%26%26null!%3D%3Db)%7Bvar%20k%3Ddocument.location.href.match(%2F%5E%5B%5E%3A%5D%2B%3F%3A%5C%2F%5C%2F%5C%2F%3F(www%5Cd%3F%5C.)%3F(%5B%5E%5C%2F%5D%2B)%2F)%5B2%5D%2Cc%3Bk%3D(c%3Dk.match(%2F%5B%5E.%5D%2B(%5C.(aero%7Carpa%7Casia%7Cbiz%7Ccat%7Ccom%7Ccoop%7Cco%7Cedu%7Cgov%7Cinfo%7Cint%7Cjobs%7Cmil%7Cmobi%7Cmuseum%7Cname%7Cnet%7Corg%7Cpro%7Ctel%7Ctravel%7Cxxx))%3F(%5C.%5Ba-z%5D%7B2%7D)%3F%24%2F))%3Fc%5B0%5D%3Ak%3Bc%3D%7B%22wikipedia.org%22%3A%2F%5E(wiki(%5Bpm%5Dedia%7Cbooks%7Csource%7Cquote%7Cnews%7Cspecies%7Cdata%7Cvoyage)%7Cmediawiki%7Cwiktionary)%5C.org%24%2F%2C%22amazon.com%22%3A%2F%5Eamazon%5C.(com%7Cco%5C.uk%7Cde)%24%2F%7D%3Bfor(var%20a%20in%20c)k.match(c%5Ba%5D)%26%26(k%3Da)%3Bb%3Dm(b%2B%22%3A%22%2Bk).substr(0%2C8)%3BString.prototype.a%3Dfunction(a%2C%0Ab)%7Breturn%20this.substr(0%2Ca)%2Bb%2Bthis.substr(a%2Bb.toString().length)%7D%3Ba%3Db.charCodeAt(0)%3Bc%3Da%25b.length%3Bb.match(%2F%5Cd%2F)%7C%7C(b%3Db.a(c%2Ca%2510))%3Bvar%20f%3D!0%2Cg%3D%22aliexpress.com%20ebikemaps.com%20gnome-look.org%20klect.com%20netemprego.gov.pt%20nozbe.com%20roomsketcher.com%20tvtropes.org%20viactt.pt%20viaverde.pt%20wikicfp.com%22.split(%22%20%22)%3Bfor(d%20in%20g)if(!isNaN(d)%26%26k.match(g%5Bd%5D))%7Bf%3D!1%3Bbreak%7Dif(f)%7Bvar%20d%3Db.length-c-1%3Bd%3D%3D%3Dc%26%26d%2B%2B%3Bb%3Db.a(d%2CString.fromCharCode(33%2Ba%2514))%7Da%3Dd%3D0%3Bc%3Ddocument.forms%3Bf%3D!1%3Bfor(d%3D0%3Bd%3Cc.length%3Bd%2B%2B)for(g%3Dc%5Bd%5D.elements%2Ca%3D0%3Ba%3Cg.length%3Ba%2B%2B)%7Bvar%20p%3D%0Ag%5Ba%5D%3Bif(%22password%22%3D%3D%3Dp.type%7C%7C%22text%22%3D%3D%3Dp.type%26%26p.name.match(%2Fp(ass%7Cw(or)%3Fd%3F)%2Fi))p.value%3Db%2Cp.focus()%2Cf%3D!0%7Df%7C%7Cwindow.prompt(%22Your%20password%20for%20%22%2Bk%2B%22%20is%22%2Cb)%7D%7Dwindow.hmp%3Du%3B%0Aif(%22undefined%22%3D%3D%3Dtypeof%20masterpw%7C%7C%22%22%3D%3D%3Dmasterpw)%7Bvar%20w%3Ddocument.createElement(%22div%22)%3Bw.setAttribute(%22id%22%2C%22overlay%22)%3Bw.style.height%3D%22100%25%22%3Bw.style.width%3D%22100%25%22%3Bw.style.position%3D%22fixed%22%3Bw.style.left%3D0%3Bw.style.top%3D0%3Bw.style.zIndex%3D1E4%3Bw.style.backgroundColor%3D%22black%22%3Bw.style.opacity%3D%220.75%22%3Bdocument.body.appendChild(w)%3Bvar%20x%3Ddocument.createElement(%22div%22)%3Bx.setAttribute(%22id%22%2C%22hashMypAssBox%22)%3Bx.style.padding%3D%2210px%22%3Bx.style.backgroundColor%3D%22%23dfdfdf%22%3Bx.style.borderRadius%3D%225px%22%3Bx.style.position%3D%22fixed%22%3Bx.style.top%3D%0A%2230%25%22%3Bx.style.left%3D%2240%25%22%3Bx.style.zIndex%3D1E4%3Bx.innerHTML%3D%27%3Clabel%20for%3D%22hmp-pw%22%3EEnter%20your%20master%20password%3C%2Flabel%3E%3Cbr%3E%3Cinput%20type%3D%22password%22%20id%3D%22hmp-pw%22%20width%3D%22100%22%3E%3Cbr%3E%3Cinput%20type%3D%22button%22%20name%3D%22send%22%20value%3D%22hash!%22onclick%3D%22javascript%3Ahmp(this.previousSibling.previousSibling.value)%3B%20removeElement(%5C%27hashMypAssBox%5C%27%2C%5C%27overlay%5C%27)%3B%22%3E%3Ca%20href%3D%22javascript%3AremoveElement(%5C%27hashMypAssBox%5C%27%2C%5C%27overlay%5C%27)%22%20title%3D%22Close%20HashMypAss%20Box%22%20class%3D%22closeButton%22style%3D%22float%3Aright%3B%20font-size%3Axx-small%3B%20position%3Arelative%3B%20top%3A1em%3B%22%3E(close)%3C%2Fa%3E%27%3B%0Adocument.body.appendChild(x)%3Bdocument.getElementById(%22hmp-pw%22).focus()%7Delse%20u(masterpw)%3B" onclick="return false;">HMP v19.03.18</a>