Hi, i am very new to js and am trying to add interactivity to the script.e.g. give the user a choice if they want to go to the malware analyzer or not.
I am using the greasemonkey add - on.
I am using the search command to look for text which obfuscated. the eval is used to hide code.
// ==UserScript==
// @name Hello World
// @namespace // @description example script to alert "Hello world!" on every page
// @exclude //@exclude // @exclude
// ==/UserScript==
var thehead = document.getElementsByTagName('script')[0];
var testString = thehead.innerHTML;
if(testString.search("eval") > 0)
{
alert("This page may contain invalid obfuscated javascript, you will now be redirected to a malware analyser");
redirect();
}
function redirect()
{
settimeout("location.href = '}
I am using the greasemonkey add - on.
I am using the search command to look for text which obfuscated. the eval is used to hide code.
// ==UserScript==
// @name Hello World
// @namespace // @description example script to alert "Hello world!" on every page
// @exclude //@exclude // @exclude
// ==/UserScript==
var thehead = document.getElementsByTagName('script')[0];
var testString = thehead.innerHTML;
if(testString.search("eval") > 0)
{
alert("This page may contain invalid obfuscated javascript, you will now be redirected to a malware analyser");
redirect();
}
function redirect()
{
settimeout("location.href = '}