Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2003
    Posts
    878

    If u study phpBB source, please come in...

    ok, a trivial question.
    in index.php , we see:
    PHP Code:
    define('IN_PHPBB'true);
    // blah blah
    include( 'common.php' );
    // blah blah blah below... 
    then in common.php , we have:
    PHP Code:
    if ( !defined('IN_PHPBB') )
    {
        die(
    "Hacking attempt");
    }
    // blah blah blah below 
    how does this technique deter hacking??... what kind of hacking??

    TIA
    peace...

  2. #2
    Join Date
    Dec 2003
    Location
    Clarksville, Indiana
    Posts
    75
    It keeps people from accessing files that are otherwise not for public use.

  3. #3
    Join Date
    Mar 2003
    Posts
    878
    Originally posted by TehBooster
    It keeps people from accessing files that are otherwise not for public use.
    ok...it is that simple ??!!!
    I was alarmed by the "hacking attempt" .....

  4. #4
    Join Date
    Mar 2003
    Posts
    878
    So you guys practise that in your codes too???
    i better start to...

  5. #5
    Join Date
    Mar 2004
    Posts
    1,301
    that to prevent you from accessing directly to common.php. You must call index.php which define the IN_PHPPP. So, if you ttry to type link to common.php directly on, IN_PHPPP is not defined yet --> script killed.

  6. #6
    better put the code then sorry

  7. #7
    Join Date
    Sep 2003
    Posts
    125
    I think "Hacking attempt" is a bit of an assumption ... maybe chose a better phrase for your own apps, maybe:

    "File should be included/required",
    "File Linking Error"

    or

    "Push off fart brain"

    foogee

  8. #8
    Join Date
    Aug 2002
    Location
    Southwest Michigan
    Posts
    935
    Hacking attempt is not really that great of a description as much as an error alert would be given that anyone can view the source and could then define that as being true on their own script and require the common.php could they not?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •