cmoss
02-03-2004, 06:08 PM
Javascript gurus you help is needed urgently. To make a very long story short there is a web site that helps consumer victims of a major fraud.
The company that is doing the fraud is trying to attack the help site in a number of avenues.
There are over 60 static IP addresses they use. We need a script that can be added to all the HTML pages of the website that can check all IP's coming to the site and will redirect all IP addresses of these criminals to the FBI.
We found one Javascript on the web, but if it works it is only for one IP address. We need to have one that will work for 60 IP addresses and don;t know how to structure the script in that case.
Please help. The script we found on the web is pasted below.
1) Can we just paste that script in the source code of every HTML page and it will work?
2) What needs to be modified so it will check and redirect any one of the 60 IP addresses they have??
Thank you in advance.
We are not experts at all in programming beyond the basics so please keep that in mind.
<script language="javascript">
var ip = '<!--#echo var="REMOTE_ADDR"-->'
if (ip == '206.186.23.178') {
alert("STOP! You are viewing this page from an IP address that is not allowed!");
alert("Why can't you guys just leave me alone?");
if (confirm("Do you want to leave peacefully? Or will I have to help you?"))
{location.href="http://www.yahoo.com" } else { ("OK you choose I don't care! Bye bye! Don't come back!"); {location.href="http://www.yahoo.com" }} }
</script>
The company that is doing the fraud is trying to attack the help site in a number of avenues.
There are over 60 static IP addresses they use. We need a script that can be added to all the HTML pages of the website that can check all IP's coming to the site and will redirect all IP addresses of these criminals to the FBI.
We found one Javascript on the web, but if it works it is only for one IP address. We need to have one that will work for 60 IP addresses and don;t know how to structure the script in that case.
Please help. The script we found on the web is pasted below.
1) Can we just paste that script in the source code of every HTML page and it will work?
2) What needs to be modified so it will check and redirect any one of the 60 IP addresses they have??
Thank you in advance.
We are not experts at all in programming beyond the basics so please keep that in mind.
<script language="javascript">
var ip = '<!--#echo var="REMOTE_ADDR"-->'
if (ip == '206.186.23.178') {
alert("STOP! You are viewing this page from an IP address that is not allowed!");
alert("Why can't you guys just leave me alone?");
if (confirm("Do you want to leave peacefully? Or will I have to help you?"))
{location.href="http://www.yahoo.com" } else { ("OK you choose I don't care! Bye bye! Don't come back!"); {location.href="http://www.yahoo.com" }} }
</script>