Sythe.Org Forums     Register     FAQ     Members List     Calendar     Mark Forums Read    
 
Sythe.Org Forums  
   Runescape Gold

Sythe.org — A Virtual Goods Trading Hub

Make real cash! buying and selling in-game items.

We have a no-scam policy.

You can make thousands playing your favourite games here at Sythe.org.

Just sign up an account and follow the rules!


Take me to

Runescape Markets

Other Game Markets

Support Center

Register an Account

Close
Runescape Login API?
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 01-10-2011, 02:31 AM
Active Member
BANNED
 
Join Date: Mar 2008
Posts: 187
Lightbulb Runescape Login API?

So I'm working on a project to be able to sorta have a simplified runescape.com control panel. Good especially for security purposes like account management functions, high scores, quick password change / reset for security etc.... I'm trying to make it log in through php through postdata.

My only problem I have run into is logging in through php
just ahead of time, I have already searched all over the forums and google for a working function.

Example:

Log in through this page which is the main log in
https://secure.runescape.com/m=weblo...&dest=title.ws

When logging in and monitoring Tamper Data This is the post data. I have tried implementing it in URL form in multiple ways but i still have not been able to complete a log in this way.

POSTDATA=username=*****&password=*****&mod=www&ssl =0&dest=title.ws

Replace the stars with your user name and password of course

So yeah any help with this?

Thanks ahead of time

Im on msn if you wanna help. I guess I could get you in on what im working on or something if interested.

Current code in use

Code:
<?php

$username = $_POST['username'];
$password = $_POST['password'];

header ('Location: https://secure.runescape.com/m=weblogin/login.ws?username='.$username.'&password='.$password.'&mod=www&ssl=0&dest=title.ws ');

exit;
?>
aftermath

Last edited by Sidd : 01-11-2011 at 03:59 AM.
Reply With Quote
  #2  
Old 01-10-2011, 01:16 PM
This is the legitimate alternate account of a staff member.
 
Join Date: Jan 2011
Posts: 30
Default Re: Runescape Login API?

As I recall the Runescape Login thing for other site services is a Java Applet and not an HTML/CGI thing.

Pretty sure it would be impossible to write an abstraction or wrapper for it.
__________________
I use this account when I am on my mobile device, or a location where accessing my main account would be inconvienient or unsafe.

If you need to contact me, please send a private message to my main account and not this one.
Reply With Quote
  #3  
Old 01-11-2011, 02:17 AM
Jimmy's Avatar
Leecher
Ex-Moderator $5 USD Donor
 
Join Date: Jun 2008
Location: Southern California
Posts: 2,359
Default Re: Runescape Login API?

Quote:
Originally Posted by SMRAlt View Post
As I recall the Runescape Login thing for other site services is a Java Applet and not an HTML/CGI thing.

Pretty sure it would be impossible to write an abstraction or wrapper for it.
No, the runescape login is (currently) an HTML form.

I (quickly) made a little thing in java to post the data to the server and it seemed to work fine (got to the Login Successful page, etc). The HTML form has the additional parameter "rem" with a value of "1," however I doubt that this makes a difference, since after omitting it, I achieved the same successful result.

I have to assume then that the problem lies with your code, rather then the method by which you're approaching this. Could you post the actual code that you're using to POST the login data to the runescape server?
__________________
Reply With Quote
  #4  
Old 01-11-2011, 03:55 AM
Active Member
BANNED
 
Join Date: Mar 2008
Posts: 187
Default Re: Runescape Login API?

Code:
<?php

$username = $_POST['username'];
$password = $_POST['password'];

header ('Location: https://secure.runescape.com/m=weblogin/login.ws?username='.$username.'&password='.$password.'&mod=www&ssl=0&dest=title.ws ');

exit;
?>
Im always getting sent here although the information matches my real RS account when entered through the url once it submits

Last edited by Sidd : 01-11-2011 at 03:59 AM.
Reply With Quote
  #5  
Old 01-11-2011, 08:41 PM
Jimmy's Avatar
Leecher
Ex-Moderator $5 USD Donor
 
Join Date: Jun 2008
Location: Southern California
Posts: 2,359
Default Re: Runescape Login API?

^You're confusing GET data with POST data. POST data isn't appended to the URL, it's sent to the server.

In response to your request for the source of the little thing I made:
Code:
import java.io.*;
import java.net.*;

public class LoginTest
{

    public static void main(String[] args) throws Exception
    {
        String[][] postVars = {
            {
                "username", "" //username here
            },
            {
                "password", "" //password here
            },
            {
                "rem", "1"
            },
            {
                "mod", "www"
            },
            {
                "ssl", "0"
            },
            {
                "dest", "title.ws"
            }
        };

        URL postURL = new URL("https://secure.runescape.com/m=weblogin/login.ws");
        URLConnection postURLConnect = postURL.openConnection();
        postURLConnect.setDoOutput(true);

        OutputStreamWriter out = new OutputStreamWriter(postURLConnect.getOutputStream());
        for(String[] postVar : postVars)
            out.write(postVar[0] + "=" + postVar[1] + "&");
        out.flush();
        out.close();

        InputStream in = postURLConnect.getInputStream();
        OutputStream fout = new FileOutputStream(new File("out.txt"));
        int i;
        byte[] buff = new byte[1024];
        while((i = in.read(buff)) != -1)
        {
            fout.write(buff, 0, i);
        }
        fout.close();
    }

}
__________________

Last edited by Jimmy : 01-11-2011 at 08:41 PM.
Reply With Quote
  #7  
Old 02-13-2011, 07:18 PM
Newcomer
BANNED
 
Join Date: Feb 2011
Posts: 23
Default Re: Runescape Login API?

I have a similar problem. I already used cURL and everything, but i get 404 (if i remove the GET parameters from the cURL URL) or Incorrect pass.

Here's my current code:

Code:
$URL="https://secure.runescape.com/m=weblogin/login.ws?mod=forum&ssl=0&dest=login.ws";
$post_array = array(
  'username' => $username,
  'password' => $password,
  'mod' => 'forum',
  'ssl' => '0',
  'dest' => 'login.ws'
  );
$main = curl_post($URL, $post_array);
echo $main;
exit;
I use this function for curl:

Code:
/**
 * Send a POST requst using cURL
 * @param string $url to request
 * @param array $post values to send
 * @param array $options for cURL
 * @return string
 */
function curl_post($url, array $post = NULL, array $options = array())
{
    $defaults = array(
        CURLOPT_POST => 1,
        CURLOPT_HEADER => 0,
        CURLOPT_URL => $url,
        CURLOPT_FRESH_CONNECT => 1,
        CURLOPT_RETURNTRANSFER => 1,
        CURLOPT_FORBID_REUSE => 1,
        CURLOPT_TIMEOUT => 4,
        CURLOPT_POSTFIELDS => http_build_query($post)
    );

    $ch = curl_init();
	curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
	curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); 
    curl_setopt_array($ch, ($options + $defaults));
    if( ! $result = curl_exec($ch))
    {
        trigger_error(curl_error($ch));
    }
    curl_close($ch);
    return $result;
}

Last edited by FuglyNerd : 02-13-2011 at 07:19 PM.
Reply With Quote
  #8  
Old 02-23-2011, 12:22 PM
Newcomer
 
Join Date: Feb 2011
Posts: 19
Default Re: Runescape Login API?

They must conform to the http spec regardless of whether they use ror, java, asp, php whatever. You're on the right tracks by using cURL - you should NEVER use Header() for such purposes.
I'm curious first off by what you plan to do with this control panel? A lot of the data is outputted through an applet so you wont be able to do as much as you'd like I imagine.. Not without a lot of work, anyway.
Secondly, what errors are you getting with using cURL?
Reply With Quote
  #9  
Old 03-01-2011, 02:53 AM
Active Member
 
Join Date: Jul 2005
Posts: 248
Default Re: Runescape Login API?

Another thing to remember is that most browsers have strict XSS policies.

The easiest way to circumvent this nowadays is by using browser-specific add-ons such as Firefox Addons or Chrome Extensions.


This post may seem useless now, but you're definitely going to run into some XSS-related issues later.
Reply With Quote
Reply



Cheap RS Gold Store  Runescape Gold

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

All times are GMT +1. The time now is 03:17 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.1