From 6e1370e7cb6c6b0651c0b63eeabc64c32b3f11be Mon Sep 17 00:00:00 2001 From: smege1001 Date: Thu, 30 Jul 2020 18:39:45 +0200 Subject: [PATCH 01/10] Initial commit --- .gitignore | 51 +++++++++++++++++++++++ LICENSE | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 + 3 files changed, 172 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..c0df46a43 --- /dev/null +++ b/.gitignore @@ -0,0 +1,51 @@ +# ---> Emacs +# -*- mode: gitignore; -*- +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + +# network security +/network-security.data + + diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..a343ccd43 --- /dev/null +++ b/LICENSE @@ -0,0 +1,119 @@ +Creative Commons Legal Code + +CC0 1.0 Universal CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES +NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE +AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION +ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE +OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS +LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION +OR WORKS PROVIDED HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer exclusive +Copyright and Related Rights (defined below) upon the creator and subsequent +owner(s) (each and all, an "owner") of an original work of authorship and/or +a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later claims +of infringement build upon, modify, incorporate in other works, reuse and +redistribute as freely as possible in any form whatsoever and for any purposes, +including without limitation commercial purposes. These owners may contribute +to the Commons to promote the ideal of a free culture and the further production +of creative, cultural and scientific works, or to gain reputation or greater +distribution for their Work in part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with +a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or +her Copyright and Related Rights in the Work and the meaning and intended +legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be protected +by copyright and related or neighboring rights ("Copyright and Related Rights"). +Copyright and Related Rights include, but are not limited to, the following: + +i. the right to reproduce, adapt, distribute, perform, display, communicate, +and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + +iii. publicity and privacy rights pertaining to a person's image or likeness +depicted in a Work; + +iv. rights protecting against unfair competition in regards to a Work, subject +to the limitations in paragraph 4(a), below; + +v. rights protecting the extraction, dissemination, use and reuse of data +in a Work; + +vi. database rights (such as those arising under Directive 96/9/EC of the +European Parliament and of the Council of 11 March 1996 on the legal protection +of databases, and under any national implementation thereof, including any +amended or successor version of such directive); and + +vii. other similar, equivalent or corresponding rights throughout the world +based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time extensions), +(iii) in any current or future medium and for any number of copies, and (iv) +for any purpose whatsoever, including without limitation commercial, advertising +or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the +benefit of each member of the public at large and to the detriment of Affirmer's +heirs and successors, fully intending that such Waiver shall not be subject +to revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account Affirmer's +express Statement of Purpose. In addition, to the extent the Waiver is so +judged Affirmer hereby grants to each affected person a royalty-free, non +transferable, non sublicensable, non exclusive, irrevocable and unconditional +license to exercise Affirmer's Copyright and Related Rights in the Work (i) +in all territories worldwide, (ii) for the maximum duration provided by applicable +law or treaty (including future time extensions), (iii) in any current or +future medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional purposes +(the "License"). The License shall be deemed effective as of the date CC0 +was applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder of +the License, and in such case Affirmer hereby affirms that he or she will +not (i) exercise any of his or her remaining Copyright and Related Rights +in the Work or (ii) assert any associated claims and causes of action with +respect to the Work, in either case contrary to Affirmer's express Statement +of Purpose. + + 4. Limitations and Disclaimers. + +a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, +licensed or otherwise affected by this document. + +b. Affirmer offers the Work as-is and makes no representations or warranties +of any kind concerning the Work, express, implied, statutory or otherwise, +including without limitation warranties of title, merchantability, fitness +for a particular purpose, non infringement, or the absence of latent or other +defects, accuracy, or the present or absence of errors, whether or not discoverable, +all to the greatest extent permissible under applicable law. + +c. Affirmer disclaims responsibility for clearing rights of other persons +that may apply to the Work or any use thereof, including without limitation +any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims +responsibility for obtaining any necessary consents, permissions or other +rights required for any use of the Work. + +d. Affirmer understands and acknowledges that Creative Commons is not a party +to this document and has no duty or obligation with respect to this CC0 or +use of the Work. diff --git a/README.md b/README.md new file mode 100644 index 000000000..067c0ba60 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# cf_email_decoder + From 8831bc9eb2984ef4c8f38faaff10cde8d92cef24 Mon Sep 17 00:00:00 2001 From: smege1001 Date: Thu, 30 Jul 2020 18:56:22 +0100 Subject: [PATCH 02/10] add the script --- cfemail.user.js | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 cfemail.user.js diff --git a/cfemail.user.js b/cfemail.user.js new file mode 100644 index 000000000..eaf7b13a0 --- /dev/null +++ b/cfemail.user.js @@ -0,0 +1,52 @@ +// ==UserScript== +// @name Decode Cloudflare-encoded email addresses +// @namespace https://codeberg.org/smege1001/cf_email_decoder +// @match *://*/* +// @grant none +// @version 1.0 +// @author smege1001 +// ==/UserScript== + +/** +* @license CC0-1.0 +**/ + +const emailprotectionURLHashRegex = /\/cdn-cgi\/l\/email-protection#([aA0-fF9]*)/; +const emailprotectionURLNoHashRegex = /\/cdn-cgi\/l\/email-protection/; //hash is stored on data-cfemail + +function decodeEmail(hash) { //cloudflare email address decoder + var hashArray = []; //split the hash into bytes + for (var hAIndex = 0; hAIndex < hash.length; hAIndex += 2) { + hashArray.push(parseInt(hash.substring(hAIndex, hAIndex + 2), 16)); + } + + var decoded = ""; + var key = hashArray[0]; //get the decode key + + for (var index = 1; index < hashArray.length; index++) { + decoded += String.fromCharCode(hashArray[index] ^ key); + } + return decoded; +} + +var links = document.querySelectorAll("a"); //get all the links + +for (var linksIndex = 0; linksIndex < links.length; linksIndex++) { + var link = links[linksIndex]; + if (emailprotectionURLHashRegex.test(link.href)) { + var hash = link.href.match(emailprotectionURLHashRegex)[1]; + link.href = "mailto:" + decodeEmail(hash); //replace the stupid email protection with just a mailto link + } else if (emailprotectionURLNoHashRegex.test(link.href) && link.hasAttribute("data-cfemail")) { + var hash = link.getAttribute("data-cfemail"); + var decodedEmail = decodeEmail(hash); + + link.href = "mailto:" + decodedEmail; + link.innerText = decodedEmail; //the inner text is just [email protected] + + //remove the useless attributes + link.removeAttribute("data-cfemail"); + link.classList.remove("__cf_email__"); + + if (link.getAttribute("class") == "") link.removeAttribute("class"); + } +} From 88e388581fb9fedbdf988461ac01830c77a9c1a6 Mon Sep 17 00:00:00 2001 From: smege1001 Date: Thu, 30 Jul 2020 19:47:19 +0100 Subject: [PATCH 03/10] adding more in readme --- README.md | 9 ++++++++- readme/compare_decoded_address.png | Bin 0 -> 3000 bytes readme/compare_decoded_namedlink.png | Bin 0 -> 15097 bytes readme/compare_encoded_address.png | Bin 0 -> 2442 bytes readme/compare_encoded_namedlink.png | Bin 0 -> 53465 bytes 5 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 readme/compare_decoded_address.png create mode 100644 readme/compare_decoded_namedlink.png create mode 100644 readme/compare_encoded_address.png create mode 100644 readme/compare_encoded_namedlink.png diff --git a/README.md b/README.md index 067c0ba60..403da032b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,9 @@ -# cf_email_decoder +# cf\_email\_decoder +cf\_email\_decoder is a userscript that decodes email addresses that are protected by Cloudflare +## Comparisons + +| Encoded | Decoded | +|-----------------------------------------|-----------------------------------------| +|![](readme/compare_encoded_namedlink.png)|![](readme/compare_decoded_namedlink.png)| +|![](readme/compare_encoded_address.png) |![](readme/compare_decoded_address.png) | diff --git a/readme/compare_decoded_address.png b/readme/compare_decoded_address.png new file mode 100644 index 0000000000000000000000000000000000000000..f570e429982dac9f1ccea0c08e5c116d081c3a17 GIT binary patch literal 3000 zcmV;p3rF;cP)MKed#2%2TU zLvkVp!HHvQa2y8`5|ZJAGTaW3ko?{uCm{*RFhfp45|UwtoP;DK z!whw}9e5UzmKJF1Zt@nT(fH4~Z3Ne?RAis1%e(6Nl4|_#9D;{l6=~lUaOY6?%+Ahs#oW4e>rfOO7}tgm-vukYqZcwl zBHXqhDa`{PaHIT9vGJ`WFPHdPm1ILMJ#V z*ERjB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}ZSSfFN#*M`uc{3hWh#W4LCg^A)&dsnZ;r~dGe&+5LHvR zw6qMiw6rAG^xoa&gHL@nW-&Z`)psiimCS9)I`7}^u`0elbcWxKJoY=&l~pCGTbCKW z<1N_o7JT76eZH>gj;glYf*HfdUsHF(sFri*uk>2E-Kqqa*^$19-=aJ(?ZbaEe8&sY z@>xOCsUg;c_dKE#jT)t*@_e81;88nG`_M1-1k)!#eear4tMZ6W*_l!w)|Lk`FfY|@q)WLrX&ddct1%vJqCPwKM zqB*(JoLom*g#()y)&Ko)@K!KN>mdhk5sv$igW=-HAqT_dU)$!K&9mVNOaK4?07*qo IM6N<$f*OgkqyPW_ literal 0 HcmV?d00001 diff --git a/readme/compare_encoded_namedlink.png b/readme/compare_encoded_namedlink.png new file mode 100644 index 0000000000000000000000000000000000000000..8e0b3ccacf2c81e912bd8eea81c8be210b40c1c6 GIT binary patch literal 53465 zcmeHQ2YePq)1N@32SO91_bM$APyrDH5k+d~y#+#fMFb>BZ=ofjLkJ`^@f8cA=%*m< zRaB}JDFH$WEkTgbg9-4>f5Sbw=W=&@6<>hofnS@)XHo*T;_^&3tId=x0b2sL1Z)Y|5_onbU@I%nPFvcX*b=ZM zU`xQ3fGvS%QUbcl%7DQ`Xx;kt&m_ZYriS{Dq|d)xt4^}tRT5~{x-IQL$Ohym5M*s5 z%YOnSla?lJ{7KOCxav&Hyxob5qj8f02>lm-k2^ds^QDm-Q%l}Ya=tO*?NQR7cKRQM zSG}^2oBtHK@P9CT1l4`*Rch6uxr1iCG)HDCzI^zRKQ(LGleI736)RdKS=q_cX3(~ue=2EG7B^ruR_kANh#$E6;=$I0vee%Vgn z^O&1DX*_M*yoG+>v6Dvof8>xr+s@r6Ha6A~S6;@A@~78cd4)D_*-BC8&Qj>Yd6YG4 zRwY|(Qr3R+EnUBHgDO?5Nbe8yqx|{uIr7b3u)#?wEa+eR?Rq+X`~=;+b&Ea;UrKrN z<}s_zDNhD}?fP{J4O>P#ckiLNJ9o&tMs*tG*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I`U=9fpSSbXjEyvT{5awL z7tJ$tmCA_+)$j&X#|41SPi5AOe&UhbfSpAUaOvB~R_fv5LGQiOgcgM^6_UgmNo?#j zc2d~RcIQTHS}Dw~?em1W2cEe&ApY{}Z}?z52fmKs{ zKtWH)(lFt9)UHiyy2D5xhEMA=L;pd5cZiKqq z;EmU5>9UnHdgMo<9l}5RMz;zJj(*`7XgR$L*G!CA>S8Y6nJ=woj+d{cPb!gC#-&+xvjRIvh; zE|s_)(;JJjzHQbw^zf-^vqF=)yxu#m2SBqf&L&J~!O%v_mMQJHf~SSS)g)Xs9LOdZ zE1|`E@6oJz^QnBfX=S=itPK51_znKQi(pd;bm> z**Nsaea-Vc-Vn~Pc@>&)!2&O_m$!W0F@wiAgBzbJR-%)2&;!pgnu{@nW=G5H*so@?c_$=X<;R_8$~iG4AjkYHW9~P%2+ix^m?* z9p*cY2s`=Qs4Cx`hT5kW7l}GQ9asqn;=8(CdiExdY#!{n)Shwe)+w2o)VFs}VRH;y zzLKt7`I|g>OI?)}B+nckq5!-d;UfMwZ)7)O1`Q(#BoE{j9=1Z8E~;dwi4zim&onPNi*RyvXtu zJZbTnT4N+F@@CUyOTd+UG_#-T?R*;(TIR3#mww0ibE9v$#NdjqI zM%X#y4lJAtE?@qek1`fhb+!;_6%}wK<3*OAB$a3QtyGKj?4G3d1$c&;wOO+zU`yb6 zmVi6XnI2b2NQmceM8`SqfTpw_d|?Jbp;a4CDc)xpF0ISx`i<-2Xa!%8^WZbgs#Pje zukKwPZLDq^885PYHLkSwo?2rht?^~kV@tr6fGvU4kN|F>+_@P?ZritSe{4rWsX?fX z!OTdp`wf8Z~S9RfFym{vW{(dTsy! literal 0 HcmV?d00001 From 9e05025a6aa8f998e6617c61233f0529eaa130da Mon Sep 17 00:00:00 2001 From: smege1001 Date: Fri, 31 Jul 2020 03:37:18 +0100 Subject: [PATCH 04/10] text on a child of a link that is email protected bug fixed --- cfemail.user.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/cfemail.user.js b/cfemail.user.js index eaf7b13a0..24a6d4690 100644 --- a/cfemail.user.js +++ b/cfemail.user.js @@ -35,14 +35,26 @@ for (var linksIndex = 0; linksIndex < links.length; linksIndex++) { var link = links[linksIndex]; if (emailprotectionURLHashRegex.test(link.href)) { var hash = link.href.match(emailprotectionURLHashRegex)[1]; - link.href = "mailto:" + decodeEmail(hash); //replace the stupid email protection with just a mailto link + var decodedEmail = decodeEmail(hash); + + link.href = "mailto:" + decodedEmail; //replace the stupid email protection with just a mailto link + + if (link.getElementsByClassName("__cf_email__")) { + var linkChild = link.getElementsByClassName("__cf_email__")[0]; + linkChild.innerText = decodedEmail; + + link.removeAttribute("data-cfemail"); + link.classList.remove("__cf_email__"); + + if (link.getAttribute("class") == "") link.removeAttribute("class"); + } } else if (emailprotectionURLNoHashRegex.test(link.href) && link.hasAttribute("data-cfemail")) { var hash = link.getAttribute("data-cfemail"); var decodedEmail = decodeEmail(hash); link.href = "mailto:" + decodedEmail; link.innerText = decodedEmail; //the inner text is just [email protected] - + //remove the useless attributes link.removeAttribute("data-cfemail"); link.classList.remove("__cf_email__"); From 29485e3b1f28cfb63c5424f273d8c32d47ec1d88 Mon Sep 17 00:00:00 2001 From: smege1001 Date: Fri, 31 Jul 2020 03:48:16 +0100 Subject: [PATCH 05/10] oops --- cfemail.user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cfemail.user.js b/cfemail.user.js index 24a6d4690..2dbfe3342 100644 --- a/cfemail.user.js +++ b/cfemail.user.js @@ -43,10 +43,10 @@ for (var linksIndex = 0; linksIndex < links.length; linksIndex++) { var linkChild = link.getElementsByClassName("__cf_email__")[0]; linkChild.innerText = decodedEmail; - link.removeAttribute("data-cfemail"); - link.classList.remove("__cf_email__"); + linkChild.removeAttribute("data-cfemail"); + linkChild.classList.remove("__cf_email__"); - if (link.getAttribute("class") == "") link.removeAttribute("class"); + if (linkChild.getAttribute("class") == "") linkChild.removeAttribute("class"); } } else if (emailprotectionURLNoHashRegex.test(link.href) && link.hasAttribute("data-cfemail")) { var hash = link.getAttribute("data-cfemail"); From 5a7c92c782ed858caed56a06d4afe5a26f536bef Mon Sep 17 00:00:00 2001 From: smege1001 Date: Fri, 31 Jul 2020 06:05:52 +0200 Subject: [PATCH 06/10] update version --- cfemail.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfemail.user.js b/cfemail.user.js index 2dbfe3342..b4678b83e 100644 --- a/cfemail.user.js +++ b/cfemail.user.js @@ -3,7 +3,7 @@ // @namespace https://codeberg.org/smege1001/cf_email_decoder // @match *://*/* // @grant none -// @version 1.0 +// @version 1.1 // @author smege1001 // ==/UserScript== From 9077c0a7e6620cb5b6f98843cae206b91b3a5fda Mon Sep 17 00:00:00 2001 From: smege1001 Date: Fri, 31 Jul 2020 18:25:20 +0100 Subject: [PATCH 07/10] error fixed --- cfemail.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfemail.user.js b/cfemail.user.js index 2dbfe3342..d406d334a 100644 --- a/cfemail.user.js +++ b/cfemail.user.js @@ -39,7 +39,7 @@ for (var linksIndex = 0; linksIndex < links.length; linksIndex++) { link.href = "mailto:" + decodedEmail; //replace the stupid email protection with just a mailto link - if (link.getElementsByClassName("__cf_email__")) { + if (link.getElementsByClassName("__cf_email__").length < 0) { var linkChild = link.getElementsByClassName("__cf_email__")[0]; linkChild.innerText = decodedEmail; From 5647f47d6750d394a6544c63e67802af15e6d756 Mon Sep 17 00:00:00 2001 From: smege1001 Date: Fri, 31 Jul 2020 18:27:02 +0100 Subject: [PATCH 08/10] update version --- cfemail.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfemail.user.js b/cfemail.user.js index 6f3532557..9d1056240 100644 --- a/cfemail.user.js +++ b/cfemail.user.js @@ -3,7 +3,7 @@ // @namespace https://codeberg.org/smege1001/cf_email_decoder // @match *://*/* // @grant none -// @version 1.1 +// @version 1.2 // @author smege1001 // ==/UserScript== From 84995d87f7134f93a82487048217012ef2919598 Mon Sep 17 00:00:00 2001 From: smege1001 Date: Fri, 31 Jul 2020 19:03:51 +0100 Subject: [PATCH 09/10] oops again --- cfemail.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfemail.user.js b/cfemail.user.js index 9d1056240..a1de18dac 100644 --- a/cfemail.user.js +++ b/cfemail.user.js @@ -39,7 +39,7 @@ for (var linksIndex = 0; linksIndex < links.length; linksIndex++) { link.href = "mailto:" + decodedEmail; //replace the stupid email protection with just a mailto link - if (link.getElementsByClassName("__cf_email__").length < 0) { + if (link.getElementsByClassName("__cf_email__").length > 0) { var linkChild = link.getElementsByClassName("__cf_email__")[0]; linkChild.innerText = decodedEmail; From a7fabb1837b55f6b7514d0f7a1587671539033a6 Mon Sep 17 00:00:00 2001 From: smege1001 Date: Fri, 31 Jul 2020 19:04:23 +0100 Subject: [PATCH 10/10] update version --- cfemail.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfemail.user.js b/cfemail.user.js index a1de18dac..673f898ff 100644 --- a/cfemail.user.js +++ b/cfemail.user.js @@ -3,7 +3,7 @@ // @namespace https://codeberg.org/smege1001/cf_email_decoder // @match *://*/* // @grant none -// @version 1.2 +// @version 1.2.2 // @author smege1001 // ==/UserScript==