Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • authorize user ipb forum account in java application


    Ales

    Recommended Posts

    Connection to database is successful, i have problem authorize member. IPB uses hashes and salts and is written in php, Rs clients are mostly java and it can be a mess..

     

    How do rs bot clients handle that?

    Link to comment
    Share on other sites

    You write a PHP auth script or connect to the DB directly and verify the hash using their algorithm. I have a PHP script if you need it.

     

    i have no idea how to set that sql statement for their algorithm. you can share php script or help me with sql statement? 

    Link to comment
    Share on other sites

    i have no idea how to set that sql statement for their algorithm. you can share php script or help me with sql statement? 

    You don't do it in the SQL. Pull back the data you need to validate the password (hash and salt) or use their PHP API.

    Link to comment
    Share on other sites

    You don't do it in the SQL. Pull back the data you need to validate the password (hash and salt) or use their PHP API.

     

    sorry i have no idea how to do it :) and there are no guides

    Link to comment
    Share on other sites


    <?php

    /**
    * Created by PhpStorm.
    * User: Anthony
    * Date: 2/12/15
    * Time: 11:06 PM
    */

    /* Make sure we don't get redirected ! */
    define('IPS_ENFORCE_ACCESS', TRUE);

    /* Change directories so that proper directory is picked up */
    chdir('/var/www/html/forums');

    /* Define us as public */
    define('IPB_THIS_SCRIPT', 'public');
    require_once('/var/www/html/forums' . '/initdata.php');

    /* If login, set the IPS variables */
    if(isset($_GET['u']) && isset($_GET['p'])) {
    $_POST['ips_username'] = $_GET['u'];
    $_POST['ips_password'] = $_GET['p'];
    }

    /* IPS Registry */
    require_once(IPS_ROOT_PATH . 'sources/base/ipsRegistry.php');
    require_once(IPS_ROOT_PATH . 'sources/base/ipsController.php');

    $ipsRegistry = ipsRegistry::instance();
    $ipsRegistry->init();

    $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login');
    $login = new $classToLoad($ipsRegistry);
    $login->init();

    /* Verify login details with IP.Board */
    $login->verifyLogin();

    if ($login->return_code == 'SUCCESS') {
    // success
    } else {
    // failed
    }

    Link to comment
    Share on other sites

    <?php
    
    /**
     * Created by PhpStorm.
     * User: Anthony
     * Date: 2/12/15
     * Time: 11:06 PM
     */
    
    /* Make sure we don't get redirected ! */
    define('IPS_ENFORCE_ACCESS', TRUE);
        
    /* Change directories so that proper directory is picked up */
    chdir('/var/www/html/forums');
    
    /* Define us as public */
    define('IPB_THIS_SCRIPT', 'public');
    require_once('/var/www/html/forums' . '/initdata.php');
    
    /* If login, set the IPS variables */
    if(isset($_GET['u']) && isset($_GET['p'])) {
        $_POST['ips_username'] = $_GET['u'];
        $_POST['ips_password'] = $_GET['p'];
    }
    
    /* IPS Registry */
    require_once(IPS_ROOT_PATH . 'sources/base/ipsRegistry.php');
    require_once(IPS_ROOT_PATH . 'sources/base/ipsController.php');
        
    $ipsRegistry = ipsRegistry::instance();
    $ipsRegistry->init();
        
    $classToLoad = IPSLib::loadLibrary(IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login');
    $login = new $classToLoad($ipsRegistry);
    $login->init();
        
    /* Verify login details with IP.Board */
    $login->verifyLogin();
        
    if ($login->return_code == 'SUCCESS') {
        // success
    } else {
        // failed
    }
    
    

     

    Thank you i will try to figure rest on my own <3:)

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.