Announcement

Collapse
No announcement yet.

[RELEASE v2.x.x] - a phpMyChat integration Hack

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [RELEASE v2.x.x] - a phpMyChat integration Hack

    Hi.... it is my first hack - phpProbe
    here is it... it was tested under vbb2x RC2 and phpMyChat 0.14.4

    News:
    Updated on 19.07.01
    - FAQ has been add

    Updated on 18.07.01
    The hack is compatible with version 0.14.5 of phpMyChat
    - there is some javaScript code there, so the hack will not work with browsers without JS support (phpMyChat will not work with these browsers too )
    - the Exit link in chat works ok now

    Hack:
    Step 1:
    open /lib/index.lib.php3 in yours phpMyChat Derictory
    find:
    PHP Code:
    // Fix some security holes 
    replace it with
    PHP Code:
    //a VBB integration hack by Stasik ([email protected])
    //v0.1
    //(C)2001

    $exiturl "http://www.blabla.com"// the url the user will be redirected exiting the chat

    if($Ver == ""){print "
    <HTML>
    <SCRIPT TYPE=\"text/javascript\" LANGUAGE=\"javascript\">
        <!--
        var NS4 = (document.layers) ? 1 : 0;
        var IE4 = ((document.all) && (parseInt(navigator.appVersion)>=4)) ? 1 : 0;
        var ver4 = (NS4 || IE4) ? \"H\" : \"L\";
    function defineVerField()
        {
            if (document.images && ver4 == 'L')
                document.forms['Params'].elements['Ver'].value = 'M';    // js1.1 enabled browser
            else document.forms['Params'].elements['Ver'].value = ver4;
        }
     -->
    </SCRIPT>
    <FORM ACTION=\"index.php3\" METHOD=\"POST\" AUTOCOMPLETE=\"OFF\" NAME=\"Params\">
    <INPUT TYPE=\"hidden\" NAME=\"Ver\" VALUE=\"L\">
    </FORM>
    <SCRIPT TYPE=\"text/javascript\" LANGUAGE=\"javascript\">
    defineVerField();
    document.forms.Params.submit();
    </SCRIPT>
    </HTML>
    "
    ; exit;}

    chdir("/path/to/board/");
    require(
    "./global.php");
    chdir("/path/to/chat/");

    if (
    $bbuserid == 0

    print 
    "no"//Message if the user has no cookie
    exit; 
    }
    else
    {
    if (
    $bbusername == "" || (isset($bbusername))==0

    $getusername=$DB_site->query_first("SELECT username FROM user WHERE userid=$bbuserid"); 
    $username=$getusername[username]; 
    $bbusername $username
    }
    else 

    $username $bbusername
    } }

    $U $username;

    $pat "[[:space:]]"
    $repl ""
    $U ereg_replace($pat,$repl,$U); 
    $pat ','
    $U ereg_replace($pat,$repl,$U); 
    stripslashes($U); 

    $N 20
    $D 10
    $Form_Send 1

    //Replace admin with your administration nick
    if($U != "Admin")
    {
    $PASSWORD="1";
    }

    // Fix some security holes 
    Step 2:
    open /lib/index.lib.php3 in yours phpMyChat Derictory
    find:
    PHP Code:
    $DbLink->query("INSERT INTO ".C_MSG_TBL." VALUES ($EN, '$E', 'SYS exit', '', ".time().", '', 'sprintf(L_EXIT_ROM, \"".special_char($U,$Latin1)."\")')");
            }
        } 
    replace it with:
    PHP Code:
    $DbLink->query("INSERT INTO ".C_MSG_TBL." VALUES ($EN, '$E', 'SYS exit', '', ".time().", '', 'sprintf(L_EXIT_ROM, \"".special_char($U,$Latin1)."\")')");
            }
        }
    if(
    $exit == "1"){header ("Location: $exiturl"); exit;} 
    Step 3:
    open /exit.php3 in yours phpMyChat Derictory
    find:

    PHP Code:
    <A HREF="<?php echo("$From?Ver=$Ver&L=$L&U=".urlencode(stripslashes($U))."&E=".urlencode(stripslashes($R))."&EN=$T"); ?>" TARGET="_parent"><?php echo(L_EXIT); ?></A>
    replace it with:
    PHP Code:
    <A HREF="<?php echo("$From?exit=1&Ver=$Ver&L=$L&U=".urlencode(stripslashes($U))."&E=".urlencode(stripslashes($R))."&EN=$T"); ?>" TARGET="_parent"><?php echo(L_EXIT); ?></A>
    ENJOY

    FAQ:
    Q: I`m getting "no" every time.
    A: You need to upgrade a cookie option in your VB control panel. Write under: Options->Change Options->[HTTP Headers and output]->Cookie Domain your domainname ONLY (blabla.com).

    Q: I`m getting "you need to register" error.
    A: Enable chat using for not registered users in your phpMyChat config (/config/config.lib.php3).

    Q: I`m getting "wrong password" error.
    A: Make shure you have deleted all user accounts in your chat and have only administrative one. If you are logging is as administrator note that you have to enter your password EVERY time you are logging in.

    Questions or Bug reports?
    Post it here I`ll answer ASAP.
    Last edited by Stasik; Thu 19 Jul '01, 5:51am.

  • #2
    Is there a demo of it? I would like to see it in action before installing it.
    Bid For Power - Bid For Power Forums
    =======================
    Anime Academy - Anime Academy Forums

    Comment


    • #3
      there was a local demo of it, i`m searching a demo forum... IT WORKS REALLY

      Comment


      • #4
        Your hack works fine for me, but i have a quastion:

        Ho are users able to open a private room? They are not listed in the phpmychat user database i guess, so they can "only" chat, right?

        Is there a chance to use the vbulletin database for all other actions (like open a private room)?

        Best wishes, polizist

        Comment


        • #5
          Is phpMyChat hard on a server? I'm running on a virtual account, and would love to have this hack, but I'd like to know whether the chat script would have my host howling for my blood (or shutting down my account) first

          Comment


          • #6
            well, we have it on our own server with a gig of memory. just try what happens

            Comment


            • #7
              is there a php4 version of phpmychat because i cant use php3 on my site

              Comment


              • #8
                I think there is no php4 version

                Comment


                • #9
                  Originally posted by polizist
                  Your hack works fine for me, but i have a quastion:

                  Ho are users able to open a private room? They are not listed in the phpmychat user database i guess, so they can "only" chat, right?

                  Is there a chance to use the vbulletin database for all other actions (like open a private room)?

                  Best wishes, polizist
                  Hi....

                  this things with other actions are not so easy to do...... i know theoretically how to do it, but i have no time and lust to do it

                  bye...

                  P.S. Nickname "Polizist" ist geil

                  Comment


                  • #10
                    I installed this hack, but it dont work? It just keeps saying "invalid password" no matter who trys?
                    MSN: [email protected] | MAIL: [email protected] | FOLIO: mholman.com

                    Comment


                    • #11
                      Hi

                      you have to allow the chat-use to unregistered useres (using setup.php3 or manually in config file)

                      --OR/AND--

                      you have to delete all users from chat and leave only Admin-nick

                      bye
                      Last edited by Stasik; Fri 13 Jul '01, 9:54am.

                      Comment


                      • #12
                        Will it work with version 2.0.1 and phpmychat version 14.2 if so where do I place it because fix security holes is not found in version 14.2

                        Thanks
                        Real Web Host

                        Comment


                        • #13
                          hi

                          try to enter this text BEFORE
                          "require("./${ChatPath}config/config.lib.php3");"

                          if not then

                          try to upgrade your chat or post index.lib.php3 here

                          BYE

                          Comment


                          • #14
                            I am waiting to upgrade my chat until 15.0 comes up.

                            Here is the url http://chat.realwebhost.net

                            Here is the link to my forums http://forums.realwebhost.net

                            I have attached the zip file. I did try to place code where you stated and I tried this for the paths
                            board path I tried http://forums.realwebhost.net and also tried http://www.realwebhost.net/forums I think it should be the first one because that is how I get to my forums.

                            Niether worked gave a error saying bad path.

                            Then I tried chat path the same way switching the word forums with chat and I got the samew errors.
                            I have attached the file

                            Joey
                            Real Web Host

                            Comment


                            • #15
                              enter a hack code before:

                              "require("./${ChatPath}config/config.lib.php3");"

                              for the both path i will need a tree of your server.

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X