A few years ago i was working on something for the Counter-Strike Blacklist when it existed. It was a project i was making for a site called CS anti-hack Community. This was going to be an all web-based security project to basically not allow any IP currently on the blacklist to preceed to any site that wanted to be a part the anti-hack community. Well i was pretty much finished with the basis of it and i had it up and running..but soon after CS Blacklist went inactive and was no longer in use. But I will show an example of what i used to block certain specified IPs from a web page. Yes this is my code but its not like i invented the stuff...so i share with you
1First we must start with the basic Javascript script beginning ::
CODE
<script LANGUAGE="JavaScript">
<--AHM Guard BY AHMC-->
<--Begin
<--AHM Guard BY AHMC-->
<--Begin
2We begin the script with the variable which is the Remote Address of the the computer that visits the page, then using 'IF' to apply that if the following addresses visit the page that the trigger will be activated :
CODE
function ban(){
var ip = '<!--#echo var="REMOTE_ADDR"-->';
if (ip == "210.201.133.34" || ip == "80.32.11.34") {
var ip = '<!--#echo var="REMOTE_ADDR"-->';
if (ip == "210.201.133.34" || ip == "80.32.11.34") {
3now comes the command that will happen if the address is on the ban list::
CODE
alert("!!!!!!!!!!!!!!!!!!!!!!!!Warning!!!!!!!!!!!!!!!!!!!!!!!!!\nYour ip address \("+ip+"\) Is on the CS BlackList");
history.go(-1);
window.location.replace("http://www.csblacklist.com/")
}
}
ban();
End--//>
</script>
history.go(-1);
window.location.replace("http://www.csblacklist.com/")
}
}
ban();
End--//>
</script>
Obviously these gives an alert window and redirects you to the Old CS blacklist site.
And now right after that script you can enter in another that will be the outcome if the remote address is not on the list::
CODE
<script LANGUAGE="JavaScript">
<--Part of AHM Guard-->
<--Begin
var ip = '<!--#echo var="REMOTE_ADDR"-->';
alert("IP Was Scanned Clean\n " +ip);
End--//>
</script>
<--Part of AHM Guard-->
<--Begin
var ip = '<!--#echo var="REMOTE_ADDR"-->';
alert("IP Was Scanned Clean\n " +ip);
End--//>
</script>
Well, maybe someone will find that useful....SSI with javascript can be fun to fool around with and get ideas from.
Thanks,
netc0n
Notice from twitch:
In the future, can you place all script/code related examples into the [ code ] tags. It helps differentiate between content and example.

