code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript">
var ip = '<!--#echo var="REMOTE_ADDR"-->'
if (ip = 'IP.AD.RE.S') {
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.mti.com" } else { ("OK you choose I don't care! Bye bye! Don't come back!"); {location.href="http://www.yahoo.com" }} }
</script>
</head>
<body>
Should not SEE
</body>
</html> |
Het javascript in de HEAD zou een bepaald ip adres moeten blocken. Echter als ik het test dan blockt deze alle IP's.
Het script komt hier vandaan: http://wsabstract.com/script/script2/blockip.shtml
In eerste instantie bij testen werkte het script niet. Toen heb ik de dubbele = in if (ip = 'IP.AD.RE.S') vervangen door maar één =. Echter hierdoor lijkt die alle IP's te blocken.
Iemand een idee waar de fout in kan zitten?