Javascript SSI- Blocking Internet Protocols - Blocking Internet Protocals from site

free web hosting
Free Web Hosting > Computers & Tech > How-To's and Tutorials > Programming > Client Side Scripting > Javascript

Javascript SSI- Blocking Internet Protocols - Blocking Internet Protocals from site

netc0n
Hello, i thought this would be interesting since i haven't discussed Javascript in years. SSI(Server Side Includes) can be used for many interesting things...many of which deal with connection information and such.
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 wink.gif

1First we must start with the basic Javascript script beginning ::

CODE
<script LANGUAGE="JavaScript">
<--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 :sad.gif*note that these IP addresses are examples but actually were on the blacklist*)

CODE
function ban(){
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>


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>



Well, maybe someone will find that useful....SSI with javascript can be fun to fool around with and get ideas from. biggrin.gif

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.

 

 

 


Reply

warallthetm
Could this be done in php? Because all the blacklisted person has to do is to turn off javascript. I have seen it in php but have not found a practicle use for it. To bad the Cs blacklit don't exist because now adays we need it! There are so many hackers and script kiddies out there who need to be tought a leason about not hacking smile.gif

Reply

vizskywalker
Although, Javascript is not server side includes. This is an interesting idea, and could easily be implemented in various languages. However, it fails in many cases precisely because Javascript is handled on the Client Side, and is not a Server Side include. To simply leave this as javascript, you could instead make the javascript page point either ahead to the next page assuming the ip passed, or back. Then if javascrpt were disabled, the user would see a blank page, or a page asking them to enable javascript.

~Viz

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. html javascript ssi - 7.89 hr back. (1)
  2. protocols in javascript - 105.78 hr back. (1)
  3. javascript protocols - 106.01 hr back. (1)
  4. how to use e-mail because javascript is blocking it - 111.53 hr back. (1)
  5. tutorial javascript ssi - 148.67 hr back. (1)
  6. ssi operators - 171.09 hr back. (1)
  7. javascript tutorial #echo var="remote_addr - 226.98 hr back. (1)
  8. hacking with ssi - 247.78 hr back. (1)
  9. blocking an ip address using java script - 307.54 hr back. (1)
  10. javascript "remote address" - 326.52 hr back. (1)
  11. javascript for blocking back history.go(1) - 397.14 hr back. (1)
  12. javascript for blocking back - 397.38 hr back. (1)
  13. javascript and the internet - 437.72 hr back. (1)
Similar Topics

Keywords : javascript, ssi, blocking, internet, protocals, blocking, internet, protocals, site

  1. Conditional Statements Of Javascript
    Tutorial for beginers (1)
  2. Javascript Operators
    (0)
    In this part of the tutorial, we will discuss about JavaScript Arithmetic Operators, JavaScript
    Assignment Operators, Comparison Operators, Logical operators and conditional operator. +, -, *, /
    etc are the JavaScript Arithmetic Operators. =, +=, -= etc are the JavaScript Assignment Operators.
    ==, != etc are the Comparison Operators and “&&”, “||” etc are the
    Logical operators. Arithmetic operators are used to perform arithmetic between variables and/or
    values and Assignment operators are used to assign values to JavaScript variables. Comparis....
  3. Javascript Tutorial For Beginner
    Using Javascript in HTML page (0)
    In this tutorial I will show you how you can put JavaScript in a HTML page. It is very easy to add
    JavaScript in a HTML page. We will use <script> tag for this purpose. Inside the <script>
    tag, we will use "type=" attribute and will define the scripting language. We will define the script
    language as “text/javascript”. After define the script language we will add our
    JavaScript codes and at last we will close the tag using . So the complete code will be- CODE
    <html> <body> <script type="text/javascript"> (Pla....
  4. Is Their A Free Or Express Program To Help Make Javascript, Or How Do I Do It.
    i want to make javascript but dont know how. (0)
    can someone direct me to a free program that will help me make java script, or maybe just tell me
    how? ....
  5. Garmon's Javascript #1 - Simple Object Database
    Learn basic Object-Oriented Programming (1)
    Okay, so you're like me - you've heard about OOP or Object Oriented Programming and wonder
    what all the hOOPlah is about! So here's the straight pOOP. Okay, sorry for the stOOPid
    puns. I'll stop now. Honestly, I will. OOPs I did it again. Right. Here's the scenario: we
    have an online store, we want to maintain a database of our products, and we want to be able to
    access them. This tutorial shows how this can be done, with very simple, commented code. Please
    note, that I'm not recommending that you use JavaScript to store your actual product....
  6. Forum post templates!
    Using javascript (3)
    I guess I'll better start by explaining by what I mean by these post templates. The idea came
    to me as one online-friend of mine has a habit of posting all his posts with same colour on a
    certain forum. We had previously talked how it would be cool if vBulletin (in this case) would have
    option to save a "post template" which it would automatically load to textarea everytime a new reply
    or thread is posted. Well as it is not implemented on the server side, why not do it
    clientside! What you may have not realized is that "bookmark toolbar" or "personal bar" book....

    1. Looking for javascript, ssi, blocking, internet, protocals, blocking, internet, protocals, site

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for javascript, ssi, blocking, internet, protocals, blocking, internet, protocals, site
advertisement




Javascript SSI- Blocking Internet Protocols - Blocking Internet Protocals from site



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE