From 2a67f2a66f34014dbe5a5f7545efb0a7e55b6b28 Mon Sep 17 00:00:00 2001 From: 409H Date: Thu, 14 Sep 2017 21:19:54 +0100 Subject: [PATCH 01/10] Added better styling for settings.html and history checker functionality --- css/settings.css | 116 ++++++++++++++++++++----------------- css/settings.css.map | 7 +++ css/settings.scss | 102 ++++++++++++++++++++++++++++++++ js/app/historyInspector.js | 0 js/app/lib/URI.min.js | 0 settings.html | 30 +++++++++- 6 files changed, 199 insertions(+), 56 deletions(-) create mode 100644 css/settings.css.map create mode 100644 css/settings.scss create mode 100644 js/app/historyInspector.js create mode 100644 js/app/lib/URI.min.js diff --git a/css/settings.css b/css/settings.css index e7e1bcb8..c98407e8 100644 --- a/css/settings.css +++ b/css/settings.css @@ -1,65 +1,73 @@ body { - background: #00c2c1; - padding: 50px; - font-family: 'Montserrat', sans-serif; - color: #ffffff; - font-weight: 600; -} - -h3 { - font-size: 23pt; -} + background: #00c2c1; + padding: 50px; + font-family: 'Montserrat', sans-serif; + color: #fff; + font-weight: 600; } + body .hide-me { + display: none; } + body h3 { + font-size: 23pt; } .pure-g { - margin-bottom: 5%; -} - -.pure-u-1-3 > p { - font-size: 10pt; - font-weight: 500; - color: #b4b4b4; -} - -.pure-u-1-3 > p > .label { - font-weight: 700; -} - -.pure-u-1-3 { + margin-bottom: 5%; } + .pure-g .pure-u-1-3, .pure-g .pure-u-2-3, .pure-g .pure-u-1-1 { background: #fff; color: #000; - border: 3px solid #009c9b; - padding: 15px; -} -.lblbox { - border: 1px solid #eeeeee; - border-radius: 5px; - background: #d4d4d4; - padding: 5px; - margin: 5px; - display: inline-block; -} + border: 2px solid #00a9a8; + padding: 15px; } + .pure-g .pure-u-1-3 p, .pure-g .pure-u-2-3 p, .pure-g .pure-u-1-1 p { + font-size: 10pt; + font-weight: 500; + color: #b4b4b4; } + .pure-g .pure-u-1-3 p .label, .pure-g .pure-u-2-3 p .label, .pure-g .pure-u-1-1 p .label { + font-weight: 700; } + .pure-table { - width: 100%; -} + width: 100%; } .note { - color: #b4b4b4; - font-style: italic; - font-size: 10pt; -} -#ext-etheraddresslookup-bookmark_modify_remove { - font-size: 85%; - background: rgb(202, 60, 60); + color: #b4b4b4; + font-style: italic; + font-size: 10pt; } + .note.ext-etheraddresslookup-history_good { + margin: 5px; color: #fff; -} + background: #00c2c1; + padding: 2px; } + .note.ext-etheraddresslookup-history_bad { + margin: 5px; + color: #fff; + background: #c2654c; + padding: 2px; } + +#ext-etheraddresslookup-bookmark_modify_remove { + font-size: 85%; + background: #ca3c3c; + color: #fff; } #donate_address { - font-size: 80%; - background: #fffdfd; - padding: 2px; - border: 1px solid #ffe4e4; - color: #009d9c; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} \ No newline at end of file + font-size: 80%; + background: #fffdfd; + padding: 2px; + border: 1px solid #ffe4e4; + color: #009d9c; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; } + +.error { + background: #fff; + padding: 2px; + color: #c2654c; + border: 2px solid #b6583e; + text-align: center; } + +.warning { + background: #ffe700; + padding: 2px; + color: #a98500; + border: 2px solid #fae200; + text-align: center; } + +/*# sourceMappingURL=settings.css.map */ diff --git a/css/settings.css.map b/css/settings.css.map new file mode 100644 index 00000000..8e5759f6 --- /dev/null +++ b/css/settings.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": "AASA,IAAK;EACH,UAAU,EAVM,OAAO;EAWvB,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,wBAAwB;EACrC,KAAK,EAZM,IAAI;EAaf,WAAW,EAAE,GAAG;EAEhB,aAAS;IACP,OAAO,EAAE,IAAI;EAGf,OAAG;IACD,SAAS,EAAE,IAAI;;AAInB,OAAQ;EACN,aAAa,EAAE,EAAE;EAEjB,6DAAsC;IACpC,UAAU,EA3BC,IAAI;IA4Bf,KAAK,EA3BC,IAAI;IA4BV,MAAM,EAAE,iBAAsC;IAC9C,OAAO,EAAE,IAAI;IAEb,mEAAE;MACA,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,GAAG;MAChB,KAAK,EAAE,OAAO;MAEd,wFAAO;QACL,WAAW,EAAE,GAAG;;AAMxB,WAAY;EACV,KAAK,EAAE,IAAI;;AAGb,KAAM;EACJ,KAAK,EAAE,OAAO;EACd,UAAU,EAAE,MAAM;EAClB,SAAS,EAAE,IAAI;EAEf,yCAAsC;IACpC,MAAM,EAAE,GAAG;IACX,KAAK,EAxDI,IAAI;IAyDb,UAAU,EA1DI,OAAO;IA2DrB,OAAO,EAAE,GAAG;EAGd,wCAAqC;IACnC,MAAM,EAAE,GAAG;IACX,KAAK,EA/DI,IAAI;IAgEb,UAAU,EA5DA,OAAO;IA6DjB,OAAO,EAAE,GAAG;;AAIhB,8CAA+C;EAC7C,SAAS,EAAE,GAAG;EACd,UAAU,EAAE,OAAgB;EAC5B,KAAK,EAAE,IAAI;;AAGb,eAAgB;EACd,SAAS,EAAE,GAAG;EACd,UAAU,EAAE,OAAO;EACnB,OAAO,EAAE,GAAG;EACZ,MAAM,EAAE,iBAAiB;EACzB,KAAK,EAAE,OAAO;EACd,qBAAqB,EAAE,GAAG;EAC1B,kBAAkB,EAAE,GAAG;EACvB,aAAa,EAAE,GAAG;;AAGpB,MAAO;EACL,UAAU,EApFO,IAAI;EAqFrB,OAAO,EAAE,GAAG;EACZ,KAAK,EArFO,OAAO;EAsFnB,MAAM,EAAE,iBAAkC;EAC1C,UAAU,EAAE,MAAM;;AAGpB,QAAS;EACP,UAAU,EA1FS,OAAO;EA2F1B,OAAO,EAAE,GAAG;EACZ,KAAK,EA3FS,OAAO;EA4FrB,MAAM,EAAE,iBAAyC;EACjD,UAAU,EAAE,MAAM", +"sources": ["settings.scss"], +"names": [], +"file": "settings.css" +} \ No newline at end of file diff --git a/css/settings.scss b/css/settings.scss new file mode 100644 index 00000000..994e2dd4 --- /dev/null +++ b/css/settings.scss @@ -0,0 +1,102 @@ +$main_background: #00c2c1; +$main_color: #fff; +$u_background: #fff; +$u_color: #000; +$error_background: #fff; +$error_color: #c2654c; +$warning_background: #ffe700; +$warning_color: #a98500; + +body { + background: $main_background; + padding: 50px; + font-family: 'Montserrat', sans-serif; + color: $main_color; + font-weight: 600; + + .hide-me { + display: none; + } + + h3 { + font-size: 23pt; + } +} + +.pure-g { + margin-bottom: 5%; + + .pure-u-1-3, .pure-u-2-3, .pure-u-1-1 { + background: $u_background; + color: $u_color; + border: 2px solid darken($main_background, 5%); + padding: 15px; + + p { + font-size: 10pt; + font-weight: 500; + color: #b4b4b4; + + .label { + font-weight: 700; + } + } + } +} + +.pure-table { + width: 100%; +} + +.note { + color: #b4b4b4; + font-style: italic; + font-size: 10pt; + + &.ext-etheraddresslookup-history_good { + margin: 5px; + color: $main_color; + background: $main_background; + padding: 2px; + } + + &.ext-etheraddresslookup-history_bad { + margin: 5px; + color: $main_color; + background: $error_color; + padding: 2px; + } +} + +#ext-etheraddresslookup-bookmark_modify_remove { + font-size: 85%; + background: rgb(202, 60, 60); + color: #fff; +} + +#donate_address { + font-size: 80%; + background: #fffdfd; + padding: 2px; + border: 1px solid #ffe4e4; + color: #009d9c; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} + +.error { + background: $error_background; + padding: 2px; + color: $error_color; + border: 2px solid darken($error_color, 5%); + text-align: center; +} + +.warning { + background: $warning_background; + padding: 2px; + color: $warning_color; + border: 2px solid darken($warning_background, 1%); + text-align: center; +} \ No newline at end of file diff --git a/js/app/historyInspector.js b/js/app/historyInspector.js new file mode 100644 index 00000000..e69de29b diff --git a/js/app/lib/URI.min.js b/js/app/lib/URI.min.js new file mode 100644 index 00000000..e69de29b diff --git a/settings.html b/settings.html index 0a5d69f5..554bd156 100644 --- a/settings.html +++ b/settings.html @@ -57,15 +57,41 @@

Modify Bookmark

Remove bookmark
+
+

History Check

+

We are updating our blacklists regularly, and you may have visited a domain that we now consider + malicious. You can use this tool to let EAL inspect your browser history and see if you've visited + such domain. EAL will then give you some advice pointers on what to do if it finds something.

+ + Note: + None of your browser history is communicated anywhere, all the checks are done locally. You may need to + accept the permission request for EAL to access your browser history. Running this check will be the only + time EAL looks at your browser history. Once the check is done, the permission will be removed. +

+ +

+ +
+ +
+ +

+ +
+ EAL will inspect the last 500 history entries +

+
-
+

Donate

-

If you wish to donate to the project, please send ETH or ERC20 tokens to:

+

If you wish to donate to the project, please send ETH or ERC20 tokens to:

Thanks,
— Harry.

+ + \ No newline at end of file From 73d39f79549c8f5eff54209491d633b679b68cf8 Mon Sep 17 00:00:00 2001 From: 409H Date: Thu, 14 Sep 2017 21:20:18 +0100 Subject: [PATCH 02/10] Added optional permission of history --- manifest.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/manifest.json b/manifest.json index c7e1f0d3..2e819b18 100644 --- a/manifest.json +++ b/manifest.json @@ -16,6 +16,10 @@ "activeTab" ], + "optional_permissions": [ + "history" + ], + "content_scripts":[{ "run_at": "document_start", "matches": ["http://*/*", "https://*/*"], From 8c087c38a3a76ab1fde24e1e03ad3b35f27cf705 Mon Sep 17 00:00:00 2001 From: 409H Date: Thu, 14 Sep 2017 21:20:44 +0100 Subject: [PATCH 03/10] Added URI lib - thanks to https://github.com/medialize/URI.js --- js/app/lib/URI.min.js | 91 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/js/app/lib/URI.min.js b/js/app/lib/URI.min.js index e69de29b..e639d04f 100644 --- a/js/app/lib/URI.min.js +++ b/js/app/lib/URI.min.js @@ -0,0 +1,91 @@ +/*! URI.js v1.18.12 http://medialize.github.io/URI.js/ */ +/* build contains: IPv6.js, punycode.js, SecondLevelDomains.js, URI.js, URITemplate.js */ +(function(f,m){"object"===typeof module&&module.exports?module.exports=m():"function"===typeof define&&define.amd?define(m):f.IPv6=m(f)})(this,function(f){var m=f&&f.IPv6;return{best:function(h){h=h.toLowerCase().split(":");var k=h.length,b=8;""===h[0]&&""===h[1]&&""===h[2]?(h.shift(),h.shift()):""===h[0]&&""===h[1]?h.shift():""===h[k-1]&&""===h[k-2]&&h.pop();k=h.length;-1!==h[k-1].indexOf(".")&&(b=7);var q;for(q=0;qf;f++)if("0"===k[0]&&1f&&(k=g,f=m)):"0"===h[q]&&(p=!0,g=q,m=1);m>f&&(k=g,f=m);1=f&&g>>10&1023|55296),b=56320|b&1023);return e+=t(b)}).join("")}function z(b,e){return b+22+75*(26>b)-((0!=e)<<5)}function u(b,g,h){var f=0;b=h?e(b/700):b>>1;for(b+=e(b/g);455n&&(n=0);for(c=0;c=h&&m("invalid-input");var x=b.charCodeAt(n++); + x=10>x-48?x-22:26>x-65?x-65:26>x-97?x-97:36;(36<=x||x>e((2147483647-f)/l))&&m("overflow");f+=x*l;var p=d<=a?1:d>=a+26?26:d-a;if(xe(2147483647/x)&&m("overflow");l*=x}l=g.length+1;a=u(f-c,l,0==c);e(f/l)>2147483647-k&&m("overflow");k+=e(f/l);f%=l;g.splice(f++,0,k)}return q(g)}function p(g){var h,f,k,p=[];g=b(g);var a=g.length;var c=128;var d=0;var n=72;for(k=0;kl&&p.push(t(l))}for((h=f=p.length)&&p.push("-");h=c&& +le((2147483647-d)/q)&&m("overflow");d+=(x-c)*q;c=x;for(k=0;k=n+26?26:x-n;if(r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},e=Math.floor,t=String.fromCharCode,y;var v={version:"1.3.2",ucs2:{decode:b,encode:q},decode:g,encode:p,toASCII:function(b){return k(b,function(b){return r.test(b)?"xn--"+p(b):b})},toUnicode:function(b){return k(b,function(b){return E.test(b)?g(b.slice(4).toLowerCase()): + b})}};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return v});else if(D&&A)if(module.exports==D)A.exports=v;else for(y in v)v.hasOwnProperty(y)&&(D[y]=v[y]);else f.punycode=v})(this); +(function(f,m){"object"===typeof module&&module.exports?module.exports=m():"function"===typeof define&&define.amd?define(m):f.SecondLevelDomains=m(f)})(this,function(f){var m=f&&f.SecondLevelDomains,h={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ", + bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ", + ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ","do":" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ", + es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ", + id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ","in":" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ", + kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ", + mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ", + ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ", + ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ", + tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ", + rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ", + tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ", + us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ", + org:"ae",de:"com "},has:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1)return!1;var k=f.lastIndexOf(".",b-1);if(0>=k||k>=b-1)return!1;var m=h.list[f.slice(b+1)];return m?0<=m.indexOf(" "+f.slice(k+1,b)+" "):!1},is:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1||0<=f.lastIndexOf(".",b-1))return!1;var k=h.list[f.slice(b+1)];return k?0<=k.indexOf(" "+f.slice(0,b)+" "):!1},get:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1)return null;var k=f.lastIndexOf(".",b-1); + if(0>=k||k>=b-1)return null;var m=h.list[f.slice(b+1)];return!m||0>m.indexOf(" "+f.slice(k+1,b)+" ")?null:f.slice(k+1)},noConflict:function(){f.SecondLevelDomains===this&&(f.SecondLevelDomains=m);return this}};return h}); +(function(f,m){"object"===typeof module&&module.exports?module.exports=m(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"===typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],m):f.URI=m(f.punycode,f.IPv6,f.SecondLevelDomains,f)})(this,function(f,m,h,k){function b(a,c){var d=1<=arguments.length,n=2<=arguments.length;if(!(this instanceof b))return d?n?new b(a,c):new b(a):new b;if(void 0===a){if(d)throw new TypeError("undefined is not a valid argument for URI"); + a="undefined"!==typeof location?location.href+"":""}if(null===a&&d)throw new TypeError("null is not a valid argument for URI");this.href(a);return void 0!==c?this.absoluteTo(c):this}function q(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function z(a){return void 0===a?"Undefined":String(Object.prototype.toString.call(a)).slice(8,-1)}function u(a){return"Array"===z(a)}function g(a,c){var d={},b;if("RegExp"===z(c))d=null;else if(u(c)){var l=0;for(b=c.length;l]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/ig;b.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g};b.defaultPorts={http:"80",https:"443",ftp:"21", + gopher:"70",ws:"80",wss:"443"};b.hostProtocols=["http","https"];b.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/;b.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"};b.getDomAttribute=function(a){if(a&&a.nodeName){var c=a.nodeName.toLowerCase();if("input"!==c||"image"===a.type)return b.domAttributes[c]}};b.encode=E;b.decode=decodeURIComponent;b.iso8859= + function(){b.encode=escape;b.decode=unescape};b.unicode=function(){b.encode=E;b.decode=decodeURIComponent};b.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@", + "%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}};b.encodeQuery=function(a,c){var d=b.encode(a+"");void 0===c&&(c=b.escapeQuerySpace);return c?d.replace(/%20/g,"+"):d};b.decodeQuery= + function(a,c){a+="";void 0===c&&(c=b.escapeQuerySpace);try{return b.decode(c?a.replace(/\+/g,"%20"):a)}catch(d){return a}};var y={encode:"encode",decode:"decode"},v,F=function(a,c){return function(d){try{return b[c](d+"").replace(b.characters[a][c].expression,function(d){return b.characters[a][c].map[d]})}catch(n){return d}}};for(v in y)b[v+"PathSegment"]=F("pathname",y[v]),b[v+"UrnPathSegment"]=F("urnpath",y[v]);y=function(a,c,d){return function(n){var l=d?function(a){return b[c](b[d](a))}:b[c]; + n=(n+"").split(a);for(var e=0,g=n.length;eb)return a.charAt(0)===c.charAt(0)&&"/"===a.charAt(0)?"/":"";if("/"!==a.charAt(b)||"/"!==c.charAt(b))b=a.substring(0, + b).lastIndexOf("/");return a.substring(0,b+1)};b.withinString=function(a,c,d){d||(d={});var n=d.start||b.findUri.start,l=d.end||b.findUri.end,e=d.trim||b.findUri.trim,g=d.parens||b.findUri.parens,f=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var h=n.exec(a);if(!h)break;var k=h.index;if(d.ignoreHtml){var p=a.slice(Math.max(k-3,0),k);if(p&&f.test(p))continue}for(var m=k+a.slice(k).search(l),p=a.slice(k,m),m=-1;;){var r=g.exec(p);if(!r)break;m=Math.max(m,r.index+r[0].length)}p=-1c))throw new TypeError('Port "'+a+'" is not a valid port');}};b.noConflict=function(a){if(a)return a={URI:this.noConflict()},k.URITemplate&&"function"===typeof k.URITemplate.noConflict&&(a.URITemplate=k.URITemplate.noConflict()),k.IPv6&&"function"===typeof k.IPv6.noConflict&& + (a.IPv6=k.IPv6.noConflict()),k.SecondLevelDomains&&"function"===typeof k.SecondLevelDomains.noConflict&&(a.SecondLevelDomains=k.SecondLevelDomains.noConflict()),a;k.URI===this&&(k.URI=w);return this};e.build=function(a){if(!0===a)this._deferred_build=!0;else if(void 0===a||this._deferred_build)this._string=b.build(this._parts),this._deferred_build=!1;return this};e.clone=function(){return new b(this)};e.valueOf=e.toString=function(){return this.build(!1)._string};e.protocol=r("protocol");e.username= + r("username");e.password=r("password");e.hostname=r("hostname");e.port=r("port");e.query=C("query","?");e.fragment=C("fragment","#");e.search=function(a,c){var b=this.query(a,c);return"string"===typeof b&&b.length?"?"+b:b};e.hash=function(a,c){var b=this.fragment(a,c);return"string"===typeof b&&b.length?"#"+b:b};e.pathname=function(a,c){if(void 0===a||!0===a){var d=this._parts.path||(this._parts.hostname?"/":"");return a?(this._parts.urn?b.decodeUrnPath:b.decodePath)(d):d}this._parts.path=this._parts.urn? + a?b.recodeUrnPath(a):"":a?b.recodePath(a):"/";this.build(!c);return this};e.path=e.pathname;e.href=function(a,c){var d;if(void 0===a)return this.toString();this._string="";this._parts=b._parts();var e=a instanceof b,l="object"===typeof a&&(a.hostname||a.path||a.pathname);a.nodeName&&(l=b.getDomAttribute(a),a=a[l]||"",l=!1);!e&&l&&void 0!==a.pathname&&(a=a.toString());if("string"===typeof a||a instanceof String)this._parts=b.parse(String(a),this._parts);else if(e||l)for(d in e=e?a._parts:a,e)t.call(this._parts, + d)&&(this._parts[d]=e[d]);else throw new TypeError("invalid input");this.build(!c);return this};e.is=function(a){var c=!1,d=!1,e=!1,l=!1,g=!1,f=!1,k=!1,p=!this._parts.urn;this._parts.hostname&&(p=!1,d=b.ip4_expression.test(this._parts.hostname),e=b.ip6_expression.test(this._parts.hostname),c=d||e,g=(l=!c)&&h&&h.has(this._parts.hostname),f=l&&b.idn_expression.test(this._parts.hostname),k=l&&b.punycode_expression.test(this._parts.hostname));switch(a.toLowerCase()){case "relative":return p;case "absolute":return!p; + case "domain":case "name":return l;case "sld":return g;case "ip":return c;case "ip4":case "ipv4":case "inet4":return d;case "ip6":case "ipv6":case "inet6":return e;case "idn":return f;case "url":return!this._parts.urn;case "urn":return!!this._parts.urn;case "punycode":return k}return null};var G=e.protocol,H=e.port,I=e.hostname;e.protocol=function(a,c){if(void 0!==a&&a&&(a=a.replace(/:(\/\/)?$/,""),!a.match(b.protocol_expression)))throw new TypeError('Protocol "'+a+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]"); + return G.call(this,a,c)};e.scheme=e.protocol;e.port=function(a,c){if(this._parts.urn)return void 0===a?"":this;void 0!==a&&(0===a&&(a=null),a&&(a+="",":"===a.charAt(0)&&(a=a.substring(1)),b.ensureValidPort(a)));return H.call(this,a,c)};e.hostname=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a){var d={};if("/"!==b.parseHost(a,d))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');a=d.hostname;b.ensureValidHostname(a,this._parts.protocol)}return I.call(this, + a,c)};e.origin=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){var d=this.protocol();return this.authority()?(d?d+"://":"")+this.authority():""}d=b(a);this.protocol(d.protocol()).authority(d.authority()).build(!c);return this};e.host=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a)return this._parts.hostname?b.buildHost(this._parts):"";if("/"!==b.parseHost(a,this._parts))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]'); + this.build(!c);return this};e.authority=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a)return this._parts.hostname?b.buildAuthority(this._parts):"";if("/"!==b.parseAuthority(a,this._parts))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');this.build(!c);return this};e.userinfo=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){var d=b.buildUserinfo(this._parts);return d?d.substring(0,d.length-1):d}"@"!==a[a.length-1]&& + (a+="@");b.parseUserinfo(a,this._parts);this.build(!c);return this};e.resource=function(a,c){if(void 0===a)return this.path()+this.search()+this.hash();var d=b.parse(a);this._parts.path=d.path;this._parts.query=d.query;this._parts.fragment=d.fragment;this.build(!c);return this};e.subdomain=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var d=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0, + d)||""}d=this._parts.hostname.length-this.domain().length;d=this._parts.hostname.substring(0,d);d=new RegExp("^"+q(d));a&&"."!==a.charAt(a.length-1)&&(a+=".");if(-1!==a.indexOf(":"))throw new TypeError("Domains cannot contain colons");a&&b.ensureValidHostname(a,this._parts.protocol);this._parts.hostname=this._parts.hostname.replace(d,a);this.build(!c);return this};e.domain=function(a,c){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(c=a,a=void 0);if(void 0===a){if(!this._parts.hostname|| + this.is("IP"))return"";var d=this._parts.hostname.match(/\./g);if(d&&2>d.length)return this._parts.hostname;d=this._parts.hostname.length-this.tld(c).length-1;d=this._parts.hostname.lastIndexOf(".",d-1)+1;return this._parts.hostname.substring(d)||""}if(!a)throw new TypeError("cannot set domain empty");if(-1!==a.indexOf(":"))throw new TypeError("Domains cannot contain colons");b.ensureValidHostname(a,this._parts.protocol);!this._parts.hostname||this.is("IP")?this._parts.hostname=a:(d=new RegExp(q(this.domain())+ + "$"),this._parts.hostname=this._parts.hostname.replace(d,a));this.build(!c);return this};e.tld=function(a,c){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(c=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var b=this._parts.hostname.lastIndexOf("."),b=this._parts.hostname.substring(b+1);return!0!==c&&h&&h.list[b.toLowerCase()]?h.get(this._parts.hostname)||b:b}if(a)if(a.match(/[^a-zA-Z0-9-]/))if(h&&h.is(a))b=new RegExp(q(this.tld())+"$"),this._parts.hostname= + this._parts.hostname.replace(b,a);else throw new TypeError('TLD "'+a+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");b=new RegExp(q(this.tld())+"$");this._parts.hostname=this._parts.hostname.replace(b,a)}else throw new TypeError("cannot set TLD empty");this.build(!c);return this};e.directory=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path&& + !this._parts.hostname)return"";if("/"===this._parts.path)return"/";var d=this._parts.path.length-this.filename().length-1,d=this._parts.path.substring(0,d)||(this._parts.hostname?"/":"");return a?b.decodePath(d):d}d=this._parts.path.length-this.filename().length;d=this._parts.path.substring(0,d);d=new RegExp("^"+q(d));this.is("relative")||(a||(a="/"),"/"!==a.charAt(0)&&(a="/"+a));a&&"/"!==a.charAt(a.length-1)&&(a+="/");a=b.recodePath(a);this._parts.path=this._parts.path.replace(d,a);this.build(!c); + return this};e.filename=function(a,c){if(this._parts.urn)return void 0===a?"":this;if("string"!==typeof a){if(!this._parts.path||"/"===this._parts.path)return"";var d=this._parts.path.lastIndexOf("/"),d=this._parts.path.substring(d+1);return a?b.decodePathSegment(d):d}d=!1;"/"===a.charAt(0)&&(a=a.substring(1));a.match(/\.?\//)&&(d=!0);var e=new RegExp(q(this.filename())+"$");a=b.recodePath(a);this._parts.path=this._parts.path.replace(e,a);d?this.normalizePath(c):this.build(!c);return this};e.suffix= + function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var d=this.filename(),e=d.lastIndexOf(".");if(-1===e)return"";d=d.substring(e+1);d=/^[a-z0-9%]+$/i.test(d)?d:"";return a?b.decodePathSegment(d):d}"."===a.charAt(0)&&(a=a.substring(1));if(d=this.suffix())e=a?new RegExp(q(d)+"$"):new RegExp(q("."+d)+"$");else{if(!a)return this;this._parts.path+="."+b.recodePath(a)}e&&(a=b.recodePath(a),this._parts.path=this._parts.path.replace(e, + a));this.build(!c);return this};e.segment=function(a,c,b){var d=this._parts.urn?":":"/",e=this.path(),g="/"===e.substring(0,1),e=e.split(d);void 0!==a&&"number"!==typeof a&&(b=c,c=a,a=void 0);if(void 0!==a&&"number"!==typeof a)throw Error('Bad segment "'+a+'", must be 0-based integer');g&&e.shift();0>a&&(a=Math.max(e.length+a,0));if(void 0===c)return void 0===a?e:e[a];if(null===a||void 0===e[a])if(u(c)){e=[];a=0;for(var f=c.length;a{}"`^| \\]/;h.expand=function(b,f,k){var g=u[b.operator],p=g.named?"Named":"Unnamed";b=b.variables;var m=[],r,q;for(q=0;r=b[q];q++){var w=f.get(r.name);if(0===w.type&&k&&k.strict)throw Error('Missing expansion value for variable "'+ + r.name+'"');if(w.val.length){if(1 Date: Thu, 14 Sep 2017 21:21:04 +0100 Subject: [PATCH 04/10] Added logic to perform a history check --- js/app/historyInspector.js | 84 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/js/app/historyInspector.js b/js/app/historyInspector.js index e69de29b..82dcc2e5 100644 --- a/js/app/historyInspector.js +++ b/js/app/historyInspector.js @@ -0,0 +1,84 @@ +(function () { + var objHistoryInspector = document.getElementById("ext-etheraddresslookup-history_inspect"); + + //Perform the history inspection + objHistoryInspector.addEventListener("click", function (objEvent) { + //See if we need to request permission + chrome.permissions.contains({ + permissions: ['history'] + }, function (blResult) { + //No permission to history, ask for it. + if (blResult === false) { + chrome.permissions.request({ + permissions: ['history'] + }, function (blGranted) { + if (blGranted) { + doHistoryInspection(); + } else { + exitNoPermission(); + } + }); + } else { + doHistoryInspection(); + } + }); + }); +})(); + +function doHistoryInspection() { + chrome.history.search({text: "", maxResults: 500}, function (objHistoryItems) { + console.log(objHistoryItems); + var blRedirected = false; + var intTotalWarnings = 0; + var strReportText = ""; + + var objBlacklistedDomains = localStorage.getItem("ext-etheraddresslookup-blacklist_domains_list"); + objBlacklistedDomains = JSON.parse(objBlacklistedDomains); + + var objDiv = document.getElementById("ext-etheraddresslookup-history_inspect_data"); + objDiv.innerHTML = ""; + + for (var intIterator = 0; intIterator < objHistoryItems.length; intIterator++) { + var objUri = URI(objHistoryItems[intIterator].url); + + //See if we redirected to the phishing site... + if (objUri.domain() === "harrydenley.com" && objUri.path() === "/EtherAddressLookup/phishing.html") { + blRedirected = true; + continue; + } + + //See if the domain is in the phishing list + console.log(objUri.domain() + ' - ' + objBlacklistedDomains.domains.indexOf(objUri.domain())); + if (objBlacklistedDomains.domains.indexOf(objUri.domain()) >= 0) { + strReportText += "" + (new Date(objHistoryItems[intIterator].lastVisitTime).toUTCString()) + " "; + //Did EAL redirect you away? + if (blRedirected) { + strReportText += objUri.domain() + "EAL successfully redirected you away."; + } else { + strReportText += objUri.domain() + "Domain is now blacklisted - but wasn't at the time."; + ++intTotalWarnings; + } + strReportText += "Visited "+ objHistoryItems[intIterator].visitCount +" times"; + strReportText += "
"; + } + + blRedirected = false; + } + + objDiv.innerHTML = ""; + if(intTotalWarnings > 0) { + objDiv.innerHTML += "
You have been on a domain that has now been blacklisted - if you " + + "entered your private key anywhere on the reported domains below, please consider your address " + + "compromised and start moving your coins to an alternative address that you trust and control!


" + } + objDiv.innerHTML += strReportText; + objDiv.style.display = "inline"; + }); +} + +function exitNoPermission() { + var objDiv = document.getElementById("ext-etheraddresslookup-history_inspect_data"); + objDiv.classList.remove("hide-me"); + objDiv.classList.add("error"); + objDiv.innerText = "Permission wasn't granted. Cannot inspect history!"; +} \ No newline at end of file From c6646dfa302443b59e7b9582c6e49576cb07245c Mon Sep 17 00:00:00 2001 From: 409H Date: Thu, 14 Sep 2017 21:31:09 +0100 Subject: [PATCH 05/10] More styling --- css/settings.css | 7 +++++++ css/settings.css.map | 2 +- css/settings.scss | 14 ++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/css/settings.css b/css/settings.css index c98407e8..11016b3c 100644 --- a/css/settings.css +++ b/css/settings.css @@ -70,4 +70,11 @@ body { border: 2px solid #fae200; text-align: center; } +.success { + background: #49bd51; + padding: 2px; + color: #fff; + border: 2px solid #45bc4d; + text-align: center; } + /*# sourceMappingURL=settings.css.map */ diff --git a/css/settings.css.map b/css/settings.css.map index 8e5759f6..990daa20 100644 --- a/css/settings.css.map +++ b/css/settings.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AASA,IAAK;EACH,UAAU,EAVM,OAAO;EAWvB,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,wBAAwB;EACrC,KAAK,EAZM,IAAI;EAaf,WAAW,EAAE,GAAG;EAEhB,aAAS;IACP,OAAO,EAAE,IAAI;EAGf,OAAG;IACD,SAAS,EAAE,IAAI;;AAInB,OAAQ;EACN,aAAa,EAAE,EAAE;EAEjB,6DAAsC;IACpC,UAAU,EA3BC,IAAI;IA4Bf,KAAK,EA3BC,IAAI;IA4BV,MAAM,EAAE,iBAAsC;IAC9C,OAAO,EAAE,IAAI;IAEb,mEAAE;MACA,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,GAAG;MAChB,KAAK,EAAE,OAAO;MAEd,wFAAO;QACL,WAAW,EAAE,GAAG;;AAMxB,WAAY;EACV,KAAK,EAAE,IAAI;;AAGb,KAAM;EACJ,KAAK,EAAE,OAAO;EACd,UAAU,EAAE,MAAM;EAClB,SAAS,EAAE,IAAI;EAEf,yCAAsC;IACpC,MAAM,EAAE,GAAG;IACX,KAAK,EAxDI,IAAI;IAyDb,UAAU,EA1DI,OAAO;IA2DrB,OAAO,EAAE,GAAG;EAGd,wCAAqC;IACnC,MAAM,EAAE,GAAG;IACX,KAAK,EA/DI,IAAI;IAgEb,UAAU,EA5DA,OAAO;IA6DjB,OAAO,EAAE,GAAG;;AAIhB,8CAA+C;EAC7C,SAAS,EAAE,GAAG;EACd,UAAU,EAAE,OAAgB;EAC5B,KAAK,EAAE,IAAI;;AAGb,eAAgB;EACd,SAAS,EAAE,GAAG;EACd,UAAU,EAAE,OAAO;EACnB,OAAO,EAAE,GAAG;EACZ,MAAM,EAAE,iBAAiB;EACzB,KAAK,EAAE,OAAO;EACd,qBAAqB,EAAE,GAAG;EAC1B,kBAAkB,EAAE,GAAG;EACvB,aAAa,EAAE,GAAG;;AAGpB,MAAO;EACL,UAAU,EApFO,IAAI;EAqFrB,OAAO,EAAE,GAAG;EACZ,KAAK,EArFO,OAAO;EAsFnB,MAAM,EAAE,iBAAkC;EAC1C,UAAU,EAAE,MAAM;;AAGpB,QAAS;EACP,UAAU,EA1FS,OAAO;EA2F1B,OAAO,EAAE,GAAG;EACZ,KAAK,EA3FS,OAAO;EA4FrB,MAAM,EAAE,iBAAyC;EACjD,UAAU,EAAE,MAAM", +"mappings": "AAeA,IAAK;EACH,UAAU,EAhBM,OAAO;EAiBvB,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,wBAAwB;EACrC,KAAK,EAlBM,IAAI;EAmBf,WAAW,EAAE,GAAG;EAEhB,aAAS;IACP,OAAO,EAAE,IAAI;EAGf,OAAG;IACD,SAAS,EAAE,IAAI;;AAInB,OAAQ;EACN,aAAa,EAAE,EAAE;EAEjB,6DAAsC;IACpC,UAAU,EAhCC,IAAI;IAiCf,KAAK,EAhCC,IAAI;IAiCV,MAAM,EAAE,iBAAsC;IAC9C,OAAO,EAAE,IAAI;IAEb,mEAAE;MACA,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,GAAG;MAChB,KAAK,EAAE,OAAO;MAEd,wFAAO;QACL,WAAW,EAAE,GAAG;;AAMxB,WAAY;EACV,KAAK,EAAE,IAAI;;AAGb,KAAM;EACJ,KAAK,EAAE,OAAO;EACd,UAAU,EAAE,MAAM;EAClB,SAAS,EAAE,IAAI;EAEf,yCAAsC;IACpC,MAAM,EAAE,GAAG;IACX,KAAK,EA9DI,IAAI;IA+Db,UAAU,EAhEI,OAAO;IAiErB,OAAO,EAAE,GAAG;EAGd,wCAAqC;IACnC,MAAM,EAAE,GAAG;IACX,KAAK,EArEI,IAAI;IAsEb,UAAU,EAhEA,OAAO;IAiEjB,OAAO,EAAE,GAAG;;AAIhB,8CAA+C;EAC7C,SAAS,EAAE,GAAG;EACd,UAAU,EAAE,OAAgB;EAC5B,KAAK,EAAE,IAAI;;AAGb,eAAgB;EACd,SAAS,EAAE,GAAG;EACd,UAAU,EAAE,OAAO;EACnB,OAAO,EAAE,GAAG;EACZ,MAAM,EAAE,iBAAiB;EACzB,KAAK,EAAE,OAAO;EACd,qBAAqB,EAAE,GAAG;EAC1B,kBAAkB,EAAE,GAAG;EACvB,aAAa,EAAE,GAAG;;AAGpB,MAAO;EACL,UAAU,EAxFO,IAAI;EAyFrB,OAAO,EAAE,GAAG;EACZ,KAAK,EAzFO,OAAO;EA0FnB,MAAM,EAAE,iBAAkC;EAC1C,UAAU,EAAE,MAAM;;AAGpB,QAAS;EACP,UAAU,EA7FS,OAAO;EA8F1B,OAAO,EAAE,GAAG;EACZ,KAAK,EA9FS,OAAO;EA+FrB,MAAM,EAAE,iBAAyC;EACjD,UAAU,EAAE,MAAM;;AAGpB,QAAS;EACP,UAAU,EAlGS,OAAO;EAmG1B,OAAO,EAAE,GAAG;EACZ,KAAK,EAnGS,IAAI;EAoGlB,MAAM,EAAE,iBAAyC;EACjD,UAAU,EAAE,MAAM", "sources": ["settings.scss"], "names": [], "file": "settings.css" diff --git a/css/settings.scss b/css/settings.scss index 994e2dd4..9ab06fc4 100644 --- a/css/settings.scss +++ b/css/settings.scss @@ -1,12 +1,18 @@ $main_background: #00c2c1; $main_color: #fff; + $u_background: #fff; $u_color: #000; + $error_background: #fff; $error_color: #c2654c; + $warning_background: #ffe700; $warning_color: #a98500; +$success_background: #49bd51; +$success_color: #fff; + body { background: $main_background; padding: 50px; @@ -99,4 +105,12 @@ body { color: $warning_color; border: 2px solid darken($warning_background, 1%); text-align: center; +} + +.success { + background: $success_background; + padding: 2px; + color: $success_color; + border: 2px solid darken($success_background, 1%); + text-align: center; } \ No newline at end of file From 133abf9b6790a90ebd03d1103b09fbfef69dd212 Mon Sep 17 00:00:00 2001 From: 409H Date: Thu, 14 Sep 2017 21:31:38 +0100 Subject: [PATCH 06/10] Added note styling --- settings.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/settings.html b/settings.html index 554bd156..f21df413 100644 --- a/settings.html +++ b/settings.html @@ -63,10 +63,12 @@

History Check

malicious. You can use this tool to let EAL inspect your browser history and see if you've visited such domain. EAL will then give you some advice pointers on what to do if it finds something.

- Note: - None of your browser history is communicated anywhere, all the checks are done locally. You may need to - accept the permission request for EAL to access your browser history. Running this check will be the only - time EAL looks at your browser history. Once the check is done, the permission will be removed. + + Note: + None of your browser history is communicated anywhere, all the checks are done locally. You may need to + accept the permission request for EAL to access your browser history. Running this check will be the only + time EAL looks at your browser history. Once the check is done, the permission will be removed. +



@@ -78,7 +80,7 @@

History Check




- EAL will inspect the last 500 history entries + EAL will inspect the last 500 history entries

From d0ab04c584183ef1ed1630d5f31de09b9ea91866 Mon Sep 17 00:00:00 2001 From: 409H Date: Thu, 14 Sep 2017 21:32:03 +0100 Subject: [PATCH 07/10] Added message to say you're good and fixed the permission not granted view bug --- js/app/historyInspector.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/app/historyInspector.js b/js/app/historyInspector.js index 82dcc2e5..794ecbe9 100644 --- a/js/app/historyInspector.js +++ b/js/app/historyInspector.js @@ -66,10 +66,12 @@ function doHistoryInspection() { } objDiv.innerHTML = ""; - if(intTotalWarnings > 0) { + if(false && intTotalWarnings > 0) { objDiv.innerHTML += "
You have been on a domain that has now been blacklisted - if you " + "entered your private key anywhere on the reported domains below, please consider your address " + "compromised and start moving your coins to an alternative address that you trust and control!


" + } else { + objDiv.innerHTML += "
It looks like you're all good! Remember to never share your private keys.


" } objDiv.innerHTML += strReportText; objDiv.style.display = "inline"; @@ -78,7 +80,6 @@ function doHistoryInspection() { function exitNoPermission() { var objDiv = document.getElementById("ext-etheraddresslookup-history_inspect_data"); + objDiv.innerHTML = "
Permission wasn't granted. Cannot inspect history!
"; objDiv.classList.remove("hide-me"); - objDiv.classList.add("error"); - objDiv.innerText = "Permission wasn't granted. Cannot inspect history!"; } \ No newline at end of file From f32e58c4d2d05211b866e19482eba83561702f25 Mon Sep 17 00:00:00 2001 From: 409H Date: Thu, 14 Sep 2017 21:34:14 +0100 Subject: [PATCH 08/10] Added logic to remove history permission after using it --- js/app/historyInspector.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/js/app/historyInspector.js b/js/app/historyInspector.js index 794ecbe9..ef30d6b1 100644 --- a/js/app/historyInspector.js +++ b/js/app/historyInspector.js @@ -13,6 +13,7 @@ permissions: ['history'] }, function (blGranted) { if (blGranted) { + console.log("Granted history permission"); doHistoryInspection(); } else { exitNoPermission(); @@ -27,7 +28,6 @@ function doHistoryInspection() { chrome.history.search({text: "", maxResults: 500}, function (objHistoryItems) { - console.log(objHistoryItems); var blRedirected = false; var intTotalWarnings = 0; var strReportText = ""; @@ -48,7 +48,6 @@ function doHistoryInspection() { } //See if the domain is in the phishing list - console.log(objUri.domain() + ' - ' + objBlacklistedDomains.domains.indexOf(objUri.domain())); if (objBlacklistedDomains.domains.indexOf(objUri.domain()) >= 0) { strReportText += "" + (new Date(objHistoryItems[intIterator].lastVisitTime).toUTCString()) + " "; //Did EAL redirect you away? @@ -75,11 +74,27 @@ function doHistoryInspection() { } objDiv.innerHTML += strReportText; objDiv.style.display = "inline"; + + removePermission(); }); } -function exitNoPermission() { +function exitNoPermission() +{ var objDiv = document.getElementById("ext-etheraddresslookup-history_inspect_data"); objDiv.innerHTML = "
Permission wasn't granted. Cannot inspect history!
"; objDiv.classList.remove("hide-me"); +} + +function removePermission() +{ + chrome.permissions.remove({ + permissions: ['history'] + }, function(removed) { + if (removed) { + console.log("Removed history permission.") + } else { + console.log("Cannot remove history permission!"); + } + }); } \ No newline at end of file From ee839987261c24e60ccdfd571f0b1c2652162803 Mon Sep 17 00:00:00 2001 From: 409H Date: Thu, 14 Sep 2017 21:48:07 +0100 Subject: [PATCH 09/10] Increased version number --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 2e819b18..1a575f5f 100644 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,7 @@ "name": "EtherAddressLookup", "short_name": "EtherAddressLookup", "description": "Adds links to strings that look like Ethereum addresses to your favorite blockchain explorer.", - "version": "1.6", + "version": "1.7", "browser_action": { "default_icon": "images/icon.png", From f84f9544f0599ff77e5b9d38a8ed3c7fefc49729 Mon Sep 17 00:00:00 2001 From: 409H Date: Thu, 14 Sep 2017 21:50:08 +0100 Subject: [PATCH 10/10] Removed debug --- js/app/historyInspector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/app/historyInspector.js b/js/app/historyInspector.js index ef30d6b1..76c731b2 100644 --- a/js/app/historyInspector.js +++ b/js/app/historyInspector.js @@ -65,7 +65,7 @@ function doHistoryInspection() { } objDiv.innerHTML = ""; - if(false && intTotalWarnings > 0) { + if(intTotalWarnings > 0) { objDiv.innerHTML += "
You have been on a domain that has now been blacklisted - if you " + "entered your private key anywhere on the reported domains below, please consider your address " + "compromised and start moving your coins to an alternative address that you trust and control!


"