aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/phishing.html5
-rw-r--r--app/scripts/contentscript.js2
-rw-r--r--app/scripts/phishing-detect.js5
-rw-r--r--gulpfile.js1
4 files changed, 10 insertions, 3 deletions
diff --git a/app/phishing.html b/app/phishing.html
index dc8f61a93..eabb363b3 100644
--- a/app/phishing.html
+++ b/app/phishing.html
@@ -25,9 +25,9 @@
a {
color: white;
}
-
</style>
+
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -45,7 +45,7 @@
ga('require', 'linker');
ga('linker:autoLink', ['metamask.io'], false, true);
</script>
-
+ <script src="phishing-detect.js"></script>
</head>
<body>
@@ -55,6 +55,7 @@
<h3>ATTENTION</h3>
<p>MetaMask believes this domain could currently compromise your security and has prevented you from interacting with it.</p>
<p>This is because the site tested positive on the <a href="https://github.com/metamask/eth-phishing-detect">Ethereum Phishing Detector</a>. This includes outright malicious websites and legitimate websites that have been compromised by a malicious actor.</p>
+ <p id="esdbLink"></p>
<p>You can turn MetaMask off to interact with this site, but it is advised not to.</p>
<p>If you think this domain is incorrectly flagged or if a blocked legitimate website has resolved its security issues, <a href="https://github.com/metamask/eth-phishing-detect/issues/new">please file an issue</a>.</p>
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js
index 6eee1987a..2cbfb811e 100644
--- a/app/scripts/contentscript.js
+++ b/app/scripts/contentscript.js
@@ -199,5 +199,5 @@ function blacklistedDomainCheck () {
function redirectToPhishingWarning () {
console.log('MetaMask - routing to Phishing Warning component')
const extensionURL = extension.runtime.getURL('phishing.html')
- window.location.href = extensionURL
+ window.location.href = extensionURL + '#' + window.location.hostname
}
diff --git a/app/scripts/phishing-detect.js b/app/scripts/phishing-detect.js
new file mode 100644
index 000000000..4168b6618
--- /dev/null
+++ b/app/scripts/phishing-detect.js
@@ -0,0 +1,5 @@
+window.onload = function() {
+ if (window.location.pathname === '/phishing.html') {
+ document.getElementById('esdbLink').innerHTML = '<b>To read more about this scam, navigate to: <a href="https://etherscamdb.info/domain/' + window.location.hash.substring(1) + '"> https://etherscamdb.info/domain/' + window.location.hash.substring(1) + '</a></b>'
+ }
+}
diff --git a/gulpfile.js b/gulpfile.js
index 0ec0723d3..5a468d2f3 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -275,6 +275,7 @@ const buildJsFiles = [
'contentscript',
'background',
'ui',
+ 'phishing-detect',
]
// bundle tasks