How to prevent website from being hacked into

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MistiBaban
    New Member
    • Oct 2007
    • 11

    How to prevent website from being hacked into

    I need help ??
    I am building a webpage in simple HTML/Java code.
    But I want to shutdown visitor's machine, when cause username/password error.
    Is it possible ????????
  • Ganon11
    Recognized Expert Specialist
    • Oct 2006
    • 3651

    #2
    This doesn't belong in the Cafe forum; it belongs in either Java or HTML. But why do you want to be so drastic as to shut down a visitors computer? Most websites go with the standard of, y'know, letting the user know there was a mistake. THis sounds very vicious.

    Comment

    • MistiBaban
      New Member
      • Oct 2007
      • 11

      #3
      Originally posted by Ganon11
      This doesn't belong in the Cafe forum; it belongs in either Java or HTML. But why do you want to be so drastic as to shut down a visitors computer? Most websites go with the standard of, y'know, letting the user know there was a mistake. THis sounds very vicious.

      I know, sir
      But someone try to hack the administrative password.
      He use to try with wrong password above 25 times per day.
      I already said in this page that if anyone use to enter with wrong username/password; virus will shutdown his/her machine.
      So please help me.
      I don't want to hurm the machine with virus; just shutdown using cmd prompt.

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Originally posted by Ganon11
        ...
        This sounds very vicious.
        I agree with Ganon,

        Maybe you want to close the user's browser?
        Even so, there will be a message that pops up stating that the JavaScript is attempting to close the browser and the user has the option to cancel.

        Comment

        • MistiBaban
          New Member
          • Oct 2007
          • 11

          #5
          Originally posted by Frinavale
          I agree with Ganon,

          Maybe you want to close the user's browser?
          Even so, there will be a message that pops up stating that the JavaScript is attempting to close the browser and the user has the option to cancel.
          He/She want to hack the administrative password
          And tried many time per day.
          Please help me.

          Comment

          • Frinavale
            Recognized Expert Expert
            • Oct 2006
            • 9749

            #6
            Originally posted by MistiBaban
            He/She want to hack the administrative password
            And tried many time per day.
            Please help me.
            You could try to set a "Time-Out" period. But this would require Server Side implementation.

            What are you using to developing your application?

            Comment

            • MistiBaban
              New Member
              • Oct 2007
              • 11

              #7
              Originally posted by Frinavale
              You could try to set a "Time-Out" period. But this would require Server Side implementation.

              What are you using to developing your application?
              I use the following quote
              [code=html]
              <form>
              <p>ENTER USERNAME :
              <input type="text" name="text2">
              </p>
              <p> ENTER PASSWORD :
              <input type="password" name="text1">
              <input type="button" value="Check In" name="Submit" onclick=javascr ipt:validate(te xt2.value,"User name",text1.val ue,"Password") >
              </p>

              </form>[/code]
              [code=javascript]
              <script language = "javascript ">

              function validate(text1, text2,text3,tex t4)
              {
              if (text1==text2 && text3==text4)
              load('success.h tm');
              else
              {
              load('\Fail.htm l');
              }
              }
              function load(url)
              {
              location.href=u rl;
              }
              </script>[/code]
              Last edited by Frinavale; Oct 2 '07, 02:45 PM. Reason: Added [code] tags to make more legible

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                Please use code tags when posting code:

                &#91;CODE=javas cript]
                Your Javascript code here...
                [/CODE]

                Looking at your code, it is too easy to log in. You shouldn't be using JavaScript for login. Anyone with even a basic knowledge of JavaScript will know what the username and password is.

                Use a server-side language for login.

                Comment

                • Frinavale
                  Recognized Expert Expert
                  • Oct 2006
                  • 9749

                  #9
                  Originally posted by MistiBaban
                  I use the following quote
                  [code=html]
                  <form>
                  <p>ENTER USERNAME :
                  <input type="text" name="text2">
                  </p>
                  <p> ENTER PASSWORD :
                  <input type="password" name="text1">
                  <input type="button" value="Check In" name="Submit" onclick=javascr ipt:validate(te xt2.value,"User name",text1.val ue,"Password") >
                  </p>

                  </form>[/code]
                  [code=javascript]
                  <script language = "javascript ">

                  function validate(text1, text2,text3,tex t4)
                  {
                  if (text1==text2 && text3==text4)
                  load('success.h tm');
                  else
                  {
                  load('\Fail.htm l');
                  }
                  }
                  function load(url)
                  {
                  location.href=u rl;
                  }
                  </script>[/code]
                  Normally when validating a user's password we check it against a database of some sort that is stored on the web server.

                  I'm not sure what you are trying to accomplish with what you are doing in this code.

                  I think what you are trying to do is going to require some more intensive web programming.... specifically Server Side coding to accomplish a proper login process.

                  I've moved your question to the JavaScript forum to see if anyone has more suggestions for you. I've also renamed your thread to better reflect your problem.

                  -Frinny

                  Comment

                  • MistiBaban
                    New Member
                    • Oct 2007
                    • 11

                    #10
                    Originally posted by Frinavale
                    Normally when validating a user's password we check it against a database of some sort that is stored on the web server.

                    I'm not sure what you are trying to accomplish with what you are doing in this code.

                    I think what you are trying to do is going to require some more intensive web programming.... specifically Server Side coding to accomplish a proper login process.

                    I've moved your question to the JavaScript forum to see if anyone has more suggestions for you. I've also renamed your thread to better reflect your problem.

                    -Frinny
                    I understand what both of U said, sir
                    Thanking you for explain me
                    I have not so good idea on it but I want to learn it by trial and error methods

                    I am using a free web so I think I am not able to use Server Side coding.
                    It is a project of me but I want to make it really good

                    Can you help me to rearrange this code in this way that
                    When I enter the Username/Password into the form
                    It check the java script from another html page, which will never become in front, so no one could see the code if it.

                    Comment

                    • Frinavale
                      Recognized Expert Expert
                      • Oct 2006
                      • 9749

                      #11
                      Originally posted by MistiBaban
                      I understand what both of U said, sir
                      Thanking you for explain me
                      I have not so good idea on it but I want to learn it by trial and error methods

                      I am using a free web so I think I am not able to use Server Side coding.
                      It is a project of me but I want to make it really good

                      Can you help me to rearrange this code in this way that
                      When I enter the Username/Password into the form
                      It check the java script from another html page, which will never become in front, so no one could see the code if it.
                      I don't know how to do this without using Server Side code.
                      Look into what your web provider allows....maybe it'll let you use something like ASP or something?

                      -Frinny

                      Comment

                      • MistiBaban
                        New Member
                        • Oct 2007
                        • 11

                        #12
                        Originally posted by Frinavale
                        I don't know how to do this without using Server Side code.
                        Look into what your web provider allows....maybe it'll let you use something like ASP or something?

                        -Frinny
                        I have little idea on it but.......
                        Can I redirect the form, when press the submit, into another page where the check will be done by java script and allow or not allow to the private page on correct and wrong password respectively.

                        Comment

                        • acoder
                          Recognized Expert MVP
                          • Nov 2006
                          • 16032

                          #13
                          Originally posted by MistiBaban
                          I have little idea on it but.......
                          Can I redirect the form, when press the submit, into another page where the check will be done by java script and allow or not allow to the private page on correct and wrong password respectively.
                          This can't be done with JavaScript. The JavaScript source can easily be seen.

                          Some free web hosts do include support for a server-side language, usually PHP.

                          Comment

                          • MistiBaban
                            New Member
                            • Oct 2007
                            • 11

                            #14
                            Originally posted by acoder
                            This can't be done with JavaScript. The JavaScript source can easily be seen.

                            Some free web hosts do include support for a server-side language, usually PHP.
                            Can U help me, sir ??????
                            I will publish my site from http://www.freewebs.com/impossibleworld/
                            What I will do ??
                            I already publish my site but due to the hacker I stopped it.
                            Please help me

                            Comment

                            • Frinavale
                              Recognized Expert Expert
                              • Oct 2006
                              • 9749

                              #15
                              Originally posted by MistiBaban
                              Can U help me, sir ??????
                              I will publish my site from http://www.freewebs.com/impossibleworld/
                              What I will do ??
                              I already publish my site but due to the hacker I stopped it.
                              Please help me
                              How do you know your site is being hacked?

                              Comment

                              Working...