New OAuth based DarkOrbit login system

08/08/2013 09:57 »jD«#1
Bigpoint just pushed a change to the way they handle logins, so I decided to quickly put together some code that handles their new OAuth login system.

Source Code: [Only registered and activated users can see links. Click Here To Register...]

Code is released under [Only registered and activated users can see links. Click Here To Register...]:

-jD
08/08/2013 10:10 megasuperleader#2
Compliments for your server jD.

Keep it up!
08/08/2013 11:41 »jD«#3
I committed some changes to generate a server change URL. See commit [Only registered and activated users can see links. Click Here To Register...] fdc18b6

-jD
08/09/2013 09:30 GnomeProgramming#4
Nice and clean code :)
08/17/2013 00:27 uragan#5
hey jD

please fix this line:

Quote:
string changeServerURL = Regex.Match(serverInstancesHTML, "target=\"http://" + serverCode + ".darkorbit.bigpoint.com/(GameAPI.php\\?req=.+)?\"").Groups[1].Value;
to

Quote:
string changeServerURL = Regex.Match(serverInstancesHTML, "target=\"http://" + serverCode + ".darkorbit.bigpoint.com/(GameAPI.php\\?req=.+)?\" onclick").Groups[1].Value;
thx
08/17/2013 01:43 »jD«#6
Why? It Doesn't change anything and ruins the capture groups under Mono.

-jD
08/17/2013 06:01 ™Skyz™#7
but you dont say shit how they banning bots? thats weird....
08/17/2013 06:34 »jD«#8
Quote:
Originally Posted by ™Skyz™ View Post
but you dont say shit how they banning bots? thats weird....
What?

-jD
08/17/2013 12:34 uragan#9
you have to check the output of Regex.Match()
08/17/2013 13:22 »jD«#10
For me it matches perfectly!

-jD
08/17/2013 22:41 uragan#11
Quote:

"GameAPI.php?req=xxxxxxxxx" onclick="InstanceSelection.clickedIni(this);"
this one i got with your Regex.Match()
08/18/2013 02:25 »jD«#12
You can't, there's a non-greedy capture group before it...

-jD
08/18/2013 02:31 YOSTA#13
Quote:
Originally Posted by »jD« View Post
You can't, there's a non-greedy capture group before it...

-jD
When the server onlinge again JD. THX
08/18/2013 02:32 uragan#14
dunno why,

Visual Studio 11.0.5x
Framework 4.5.5x

dont have a lot exp on c#

but
The important thing is that "HtmlEntity.DeEntitize" works fine :)
08/18/2013 02:56 AlanSouza#15
thanks Jd. :]