Created
March 8, 2013 04:55
-
-
Save mala/5114296 to your computer and use it in GitHub Desktop.
Firefoxのフィッシング/マルウェアブロックが有効かどうか検出するコード
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var now = Date.now(); | |
var phishing; | |
var malware; | |
var p_loaded = false; | |
var m_loaded = false; | |
</script> | |
<script src="http://www.mozilla.org/firefox/its-a-trap.html" onerror="phishing=Date.now()-now;p_loaded=true"></script> | |
<script src="http://www.mozilla.org/firefox/its-an-attack.html" onerror="malware=Date.now()-now;m_loaded=true"></script> | |
<script> | |
var timer = setInterval(function(){ | |
if (Date.now() - now > 1000) { | |
document.write(" maybe phishing/malware protection is disabled"); | |
document.close(); | |
clearInterval(timer); | |
} else { | |
if(!p_loaded && !m_loaded) return; | |
p_loaded ? document.write("phishing:"+ phishing + "ms, phishing protection is enabled" + "<br>") : document.write("phishing protection is disabled<br>"); | |
m_loaded ? document.write("malware:"+ malware + "ms, malware protection is enabled" + "<br>") : document.write("malware protection is disabled<br>"); | |
document.close(); | |
clearInterval(timer); | |
} | |
}, 100); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment