mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
add phishing html page, and redirect to bundled page in-window
This commit is contained in:
parent
53b440a287
commit
7ca402147d
BIN
app/images/ethereum-metamask-chrome.png
Normal file
BIN
app/images/ethereum-metamask-chrome.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
@ -67,7 +67,8 @@
|
||||
"notifications"
|
||||
],
|
||||
"web_accessible_resources": [
|
||||
"inpage.js"
|
||||
"inpage.js",
|
||||
"phishing.html"
|
||||
],
|
||||
"externally_connectable": {
|
||||
"matches": [
|
||||
|
60
app/phishing.html
Normal file
60
app/phishing.html
Normal file
@ -0,0 +1,60 @@
|
||||
<!DOCTYPE HTML>
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Phishing Warning</title>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background: #c50000;
|
||||
padding: 50px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
.centered {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
color: white;
|
||||
max-width: 600px;
|
||||
}
|
||||
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),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
ga('create', 'UA-37075177-6', 'auto');
|
||||
ga('send', 'pageview');
|
||||
//Send referral data to EAL
|
||||
(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),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
ga('create', 'UA-68598031-1', 'auto' {'allowLinker':true});
|
||||
ga('send', 'pageview');
|
||||
ga('require', 'linker');
|
||||
ga('linker:autoLink', ['harrydenley.com', 'metamask.io'], false, true);
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="centered">
|
||||
|
||||
<img src="/images/ethereum-metamask-chrome.png" style="width:100%">
|
||||
<h3>ATTENTION</h3>
|
||||
<p>MetaMask believes this domain to have malicious intent 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>.</p>
|
||||
<p>You can turn MetaMask off to interact with this site, but it's advised not to.</p>
|
||||
<p>If you think this domain is incorrectly flagged, <a href="https://github.com/metamask/eth-phishing-detect/issues/new">please file an issue</a>.</p>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -197,6 +197,7 @@ function blacklistedDomainCheck () {
|
||||
* Redirects the current page to a phishing information page
|
||||
*/
|
||||
function redirectToPhishingWarning () {
|
||||
console.log('MetaMask - redirecting to phishing warning')
|
||||
window.location.href = 'https://metamask.io/phishing.html'
|
||||
console.log('MetaMask - routing to Phishing Warning component')
|
||||
let extensionURL = extension.runtime.getURL('phishing.html')
|
||||
window.location.href = extensionURL
|
||||
}
|
||||
|
55
package-lock.json
generated
55
package-lock.json
generated
@ -2,7 +2,6 @@
|
||||
"name": "metamask-crx",
|
||||
"version": "0.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": {
|
||||
"version": "7.0.0-beta.31",
|
||||
@ -1623,15 +1622,6 @@
|
||||
"@types/react": "*"
|
||||
}
|
||||
},
|
||||
"JSONStream": {
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz",
|
||||
"integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=",
|
||||
"requires": {
|
||||
"jsonparse": "^1.2.0",
|
||||
"through": ">=2.2.7 <3"
|
||||
}
|
||||
},
|
||||
"abab": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz",
|
||||
@ -8359,8 +8349,7 @@
|
||||
}
|
||||
},
|
||||
"eth-contract-metadata": {
|
||||
"version": "github:MetaMask/eth-contract-metadata#2da362052a312dc6c72a7eec116abf6284664f50",
|
||||
"from": "github:MetaMask/eth-contract-metadata#master"
|
||||
"version": "github:MetaMask/eth-contract-metadata#966a891dd9c79b873fd8968a0155b067ca630502"
|
||||
},
|
||||
"eth-ens-namehash": {
|
||||
"version": "2.0.8",
|
||||
@ -9209,15 +9198,7 @@
|
||||
}
|
||||
},
|
||||
"ethereumjs-util": {
|
||||
"version": "github:ethereumjs/ethereumjs-util#ac5d0908536b447083ea422b435da27f26615de9",
|
||||
"from": "github:ethereumjs/ethereumjs-util#ac5d0908536b447083ea422b435da27f26615de9",
|
||||
"requires": {
|
||||
"bn.js": "^4.8.0",
|
||||
"create-hash": "^1.1.2",
|
||||
"keccak": "^1.0.2",
|
||||
"rlp": "^2.0.0",
|
||||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
"version": "github:ethereumjs/ethereumjs-util#ac5d0908536b447083ea422b435da27f26615de9"
|
||||
},
|
||||
"ethereumjs-vm": {
|
||||
"version": "2.3.2",
|
||||
@ -12998,13 +12979,6 @@
|
||||
},
|
||||
"gulp": {
|
||||
"version": "github:gulpjs/gulp#71c094a51c7972d26f557899ddecab0210ef3776",
|
||||
"from": "github:gulpjs/gulp#4.0",
|
||||
"requires": {
|
||||
"glob-watcher": "^4.0.0",
|
||||
"gulp-cli": "^2.0.0",
|
||||
"undertaker": "^1.0.0",
|
||||
"vinyl-fs": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"gulp-cli": {
|
||||
"version": "2.0.1",
|
||||
@ -16966,6 +16940,15 @@
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"JSONStream": {
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz",
|
||||
"integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=",
|
||||
"requires": {
|
||||
"jsonparse": "^1.2.0",
|
||||
"through": ">=2.2.7 <3"
|
||||
}
|
||||
},
|
||||
"jsprim": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
|
||||
@ -28853,6 +28836,14 @@
|
||||
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
|
||||
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
|
||||
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
|
||||
"requires": {
|
||||
"safe-buffer": "~5.1.0"
|
||||
}
|
||||
},
|
||||
"string-length": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/string-length/-/string-length-1.0.1.tgz",
|
||||
@ -28909,14 +28900,6 @@
|
||||
"function-bind": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
|
||||
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
|
||||
"requires": {
|
||||
"safe-buffer": "~5.1.0"
|
||||
}
|
||||
},
|
||||
"stringify-object": {
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.2.2.tgz",
|
||||
|
Loading…
Reference in New Issue
Block a user