How to secure ur config.php + small java script for addition security :)

Results 1 to 6 of 6
  1. #1
    Extacy plýs !!! Eroticus is offline
    MemberRank
    Nov 2007 Join Date
    Israel <3Location
    500Posts

    How to secure ur config.php + small java script for addition security :)

    Java script to disable Right Click & Copy/Paste ( Mini addition )
    Add between
    <head>

    </head>
    in your main motherboard script :D (index.php)

    Code:
    <script type="text/javascript"> 
    //below javascript is used for Disabling right-click on HTML page
    document.oncontextmenu=new Function("return false");//Disabling right-click
     
     
    //below javascript is used for Disabling text selection in web page
    document.onselectstart=new Function ("return false"); //Disabling text selection in web page
    if (window.sidebar){
    document.onmousedown=new Function("return false"); 
    document.onclick=new Function("return true") ; 
     
     
    //Disable Cut into HTML form using Javascript 
    document.oncut=new Function("return false"); 
     
     
    //Disable Copy into HTML form using Javascript 
    document.oncopy=new Function("return false"); 
     
     
    //Disable Paste into HTML form using Javascript  
    document.onpaste=new Function("return false"); 
    }
    </script>
    How to secure ur config.php :) and make it not accessible to the Internet
    Just open all .php files that request config.php and add before
    Code:
    /''/
    That mean 1 folder back :P = and you can go back how much folder you want :) and config.php will be not accessible from the Internet.

    Example


    Last edited by Eroticus; 08-10-14 at 01:53 AM.


  2. #2
    Enthusiast Tyr is offline
    MemberRank
    Nov 2014 Join Date
    36Posts

    Re: How to secure ur config.php + small java script for addition security :)

    You really deserve my Like !

  3. #3
    Account Upgraded | Title Enabled! Artuuro_lv is offline
    MemberRank
    Jun 2008 Join Date
    UKLocation
    310Posts

    Re: How to secure ur config.php + small java script for addition security :)

    Since javascript is mostly just client - side language (except node.js & other javascript server frameworks), this really wont help in securing the scripts. You should be doing routing in php to keep your files hidden from public completely.

  4. #4
    Member evilheart is offline
    MemberRank
    Sep 2012 Join Date
    73Posts

    Re: How to secure ur config.php + small java script for addition security :)

    thanks

  5. #5
    Novice hormez is offline
    MemberRank
    Apr 2015 Join Date
    2Posts

    Re: How to secure ur config.php + small java script for addition security :)

    First of all, Javascript have to include in bottom on page, never in head.
    Second one, wtf securing with javascript? Please guys cut your ears off.

    Did you ever heard about .htaccess? Gosh.
    Guys search on google .htaccess modrewrite rules and your 'security' problem is gone.

    All silkroad-frameworks i ever seen in this forum are bullshit and i just saw really bad programmers around here.

    please dont make your self a pro if you arent one.

  6. #6
    Apprentice periculoasa is offline
    MemberRank
    Jan 2014 Join Date
    9Posts

    Re: How to secure ur config.php + small java script for addition security :)

    lol that does not help either, if u think about it more :))



Advertisement