Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz > Rappelz Private Server
You last visited: Today at 17:07

  • Please register to post and access all features, it's quick, easy and FREE!

 

[Release] Rappelz Auth Emu for Linux & Windows + Unpacked SFrame PH 8.1

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 768
[Release] Rappelz Auth Emu for Linux & Windows + Unpacked SFrame PH 8.1

Contents

Introduction

Here is an Auth Server emu that can fully replace the official one. I didn't use the decompilation output of IDA pro to make it, I instead used a different architecture due to different libraries used (AFAIK, the official auth does not use many third party libs, maybe only openssl).

Also I make it so that it's portable, I tested it on Linux as 64 bits, Windows XP and Windows Server 2012 R2 as 32 bits executable.
It should also work correctly on Linux ARM for those who might have such a device (like a raspberry pi)


Features

The server has most of the feature of the official auth server with some additional features:
  • Support both methods of authentication: old DES and new RSA/AES, so clients/servers from at least 5.2 to 8.3 works on it
  • Auto reconnect to SQL database on failure
  • Track already connected clients and kick on duplicate login (if the account is already logged in)
  • Check the existence of dbo.Account table at startup (not mandatory, but all connections attempts will fail if the query fails)
  • Integrate also an upload server and miniweb server for guild icons
  • Accept only < 64KB images and check if it's really a JPG image
  • The miniweb server ignore directory part of the URL and only use the filename (the physical upload directory is configurable)
  • Support ban IP file (MAC address is not supported has this address require client support and can be easily bypassed)
  • Configuration file similar to the official auth server
  • All supported config variables are dumped at startup with their value
  • Performance of miniweb server: 20k requests/sec, 4GBytes/sec on localhost (2,6Ghz cpu)
  • Performance of auth server: 115 authentications / sec (most of the time is lost by the SQL network traffic and latency, cpu usage is < 10%, DB on ethernet LAN)


Usage guide


Screen-shots

Auth Emu on Linux
You must register and activate your account in order to view images.

Auth Emu and SFrame on Linux with GS on WinXP VM
You must register and activate your account in order to view images.

Auth Emu and GS on WinXP VM, SFrame on Linux with guild icon
You must register and activate your account in order to view images.

SFrame-ph-81-unpacked-debug.exe with debug message shown in DebugView
You must register and activate your account in order to view images.


What to do if it crash

Even if the Emu was able to run two weeks without crash and is still running (and with clients connecting to it), it might crash for some reason.

If the Auth Emu crashes and you don't set admin.dump_mode to 1, then it will generate a crashdump in the file crashdump.dmp in the folder where the Emu is. Send me that file so I will be able to know information about the state of the Emu at the time of the crash which will help me fix it. (Of course, any additional descriptions is appreciated too )

Crash dumps should not be very large, when I tested this feature, crashdump.dmp size was around 700 KB. If crashdump.dmp already exist when a new crash occurs, it will be overwritten.

You can send this file in a ZIP via EPVP private message or via this thread so I can investigate on the cause of the crash.


SFrame unpacked 8.1

PH SFrame clients that use the new authentication method (RSA/AES) are not packed. They can't be used with the official auth because of the authentication method, but they can be used with my Auth Emu as it supports RSA/AES. So it's possible to patch it and use it.

I provide here the SFrame.exe I use (PH, 8.1, June 2013) which is not packed, does not check the IP nor the launcher and does not have GameGuard. I provide also a debug one which displays debug messages in DebugView.

To view the output of debug message by SFrame-ph-81-debug.exe, you need DebugView.
Start DebugView with admin rights and then SFrame-ph-81-debug.exe. In DebugView you will be able to see messages from SFrame.
This can help debugging resource issues.


Download

If Windows complains about missing msvcr100.dll or msvcp100.dll, install the Visual C++ 2010 runtime redistributable x86.

Linux executable is 64 bits, tell me if someone wants a 32 bits or armel (raspberrypi) one.
It depends on the following Debian/Ubuntu packages:
libc6 (>= 2.14)
unixodbc (>= 2.3.1)
libssl1.0.0 (>= 1.0.0)
libstdc++6 (>= 4.8)
tdsodbc
Attached Files
File Type: zip RappelzServerAuth-win-x86-v1.0.zip (703.3 KB, 211 views)
File Type: zip RappelzServerAuth-linux-amd64-v1.0.zip (112.9 KB, 84 views)
File Type: zip SFrame-ph-81-unpacked.exe.zip (4.72 MB, 264 views)
File Type: zip SFrame-ph-81-unpacked-debug.exe.zip (4.72 MB, 196 views)



glandu2 is offline  
Thanks
33 Users
Old   #2
 
elite*gold: 0
Join Date: Jul 2012
Posts: 231
Received Thanks: 65
Keep calm & thank glandu for everything he did to improve rappelz development


eziorav is offline  
Old   #3
 
elite*gold: 26
Join Date: Dec 2012
Posts: 19
Received Thanks: 51
I do not know if I have one such error, but I will not allow further authorization, what am I doing wrong?
You must register and activate your account in order to view images.
[Xsanadu]Dream is offline  
Old   #4
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 768
Change the variable core.log.level to debug or trace to see more log messages. You will be able to see the computed MD5 hash with the one retrieved from the database.

Check if auth.db.salt was also set to 2011 for the your previous auth (I don't remember the variable name for the official auth, try 2012 as it may be the default salt for the 8.1 server iirc)


glandu2 is offline  
Old   #5
 
elite*gold: 26
Join Date: Dec 2012
Posts: 19
Received Thanks: 51
Quote:
Originally Posted by glandu2 View Post
Change the variable core.log.level to debug or trace to see more log messages. You will be able to see the computed MD5 hash with the one retrieved from the database.

Check if auth.db.salt was also set to 2011 for the your previous auth (I don't remember the variable name for the official auth, try 2012 as it may be the default salt for the 8.1 server iirc)
Trace did, and now I do not know like the right thing but why does this happen?
You must register and activate your account in order to view images.
[Xsanadu]Dream is offline  
Old   #6
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 768
Quote:
Originally Posted by [Xsanadu]Dream View Post
Trace did, and now I do not know like the right thing but why does this happen?
You must register and activate your account in order to view images.
Well indeed there is a missing digit for the DB value. I can't access the source code for next 2 hours so I can't see for the moment what could cause this :/

Can you try to add a space in the DB to see if it read the last digit ? If that works it would mean that my auth skip the last character for some reason.

What's your server version and the "password" column type ?
glandu2 is offline  
Old   #7
 
elite*gold: 26
Join Date: Dec 2012
Posts: 19
Received Thanks: 51
Quote:
Originally Posted by glandu2 View Post
Well indeed there is a missing digit for the DB value. I can't access the source code for next 2 hours so I can't see for the moment what could cause this :/

Can you try to add a space in the DB to see if it read the last digit ? If that works it would mean that my auth skip the last character for some reason.

What's your server version and the "password" column type ?
You must register and activate your account in order to view images.
You must register and activate your account in order to view images.
last character does not load from the database
Use your Sframe.exe PH and 8.1 server
[Xsanadu]Dream is offline  
Old   #8
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 768
I see my code and I don't see anywhere why it could retrieve only 31 characters.
Can you confirm that there is no spaces before the first letter ?

I will investigate on this and see why it retrieve only 31 characters with nvarchar(32), and if I have the same problem.

I only tested with password column as varchar(60) and it works

And why for you it does not complain about column size ? If I put something larger than 32 characters, it tell me that row 1 wasn't committed because of string length

[edit]
After a second test, this bug seems to occur only with nvarchar columns

Why the bug

So the bug occur only with windows version and with nvarchar and "SQL Server" as the ODBC driver. That's why I didn't see that, I used several databases but all were using varchar(60) for the password column.


I will correct that bug, but here are solutions to fix it:

Solution 1 : Use an updated SQL Server ODBC driver

If you have SQL server 2012 on localhost, use instead:
Code:
auth.db.driver:SQL Server Native Client 11.0
If you don't use SQL Server 2012 or SQL Server is not on the same machine as the auth, you can download it and install it where the auth is: Download Microsoft® ODBC Driver 11 for SQL Server® - Windows from Official Microsoft Download Center

You can also see available installed ODBC driver for SQL Server by typing in the run dialogbox in start menu: "odbcad32"
The go to "Drivers" tab:

Then set the variable "auth.db.driver" to one of these driver names.


Solution 2
As you have a small table with only one row, you can just create another database with dbo.Account with only the 3 first columns like this:

Code:
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Account](
	[account_id] [int] NOT NULL,
	[account] [nvarchar](31) NOT NULL,
	[password] [varchar](32) NOT NULL,
 CONSTRAINT [PK_Account] PRIMARY KEY CLUSTERED 
(
	[account_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
glandu2 is offline  
Old   #9
 
elite*gold: 0
Join Date: May 2011
Posts: 155
Received Thanks: 19
glandu2 I would like to tell you that there are Awesome, helpful & useful people but, you're more than that I have no idea how useful is this release going to be but, i am sure it's a huge project to work on and get it ready out to us.

Thanks button is not enough at ALL but, thank you from the heart good job, well done and keep going until you reach the sky.

glandu2 I would like to tell you that there are Awesome, helpful & useful people but, you're more than that I have no idea how useful is this release going to be but, i am sure it's a huge project to work on and get it ready out to us.

Thanks button is not enough at ALL but, thank you from the heart good job, well done and keep going until you reach the sky.
speedkaka13 is offline  
Old   #10
 
elite*gold: 30
Join Date: Mar 2012
Posts: 626
Received Thanks: 280
mmm unpacked sframe. even with debug. yummy yummy.
mongreldogg is offline  
Old   #11
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 768
As requested by PM, here is a full auth.opt file which has default value (only the listen IP to the GS has been changed to 127.0.0.1)

Beside, I am running the auth emu for almost one month without bugs (and still running), still at less than 2MB ram usage and 00:00:00 cpu time used since it was started.

The emu received HTTP request of external IPs as it listen directly from the internet for the guild icon server on port 80 (this include probably some known attacks against known servers config flaws, these does not apply to my emu as it serve only images less than 64kB and does not really support the full HTTP spec, just error 404 or 200 + the image in fact). So it was able to run fine even with unusual request without problems.

Here is the content of the auth.opt file in attachment for ones who don't have problems with page's width:
Code:
admin.telnet.autostart:false
admin.telnet.ip:127.0.0.1
admin.telnet.port:4501

auth.clients.autostart:true
auth.clients.des_key:MERONG
auth.clients.ip:0.0.0.0
auth.clients.port:4500

#If possible, SQL Server Native Client is better but is not installed by default unless you have SQL Server installed
#To see which SQL driver are available, execute "odbcad32" and go to the "ODBC Driver" tab
auth.db.driver:SQL Server
#auth.db.driver:SQL Server Native Client 11.0

auth.db.account:sa
auth.db.ignoreinitcheck:false
auth.db.name:Auth
auth.db.password:
auth.db.port:1433
auth.db.salt:2012
auth.db.server:127.0.0.1

auth.gameserver.autostart:true
auth.gameserver.ip:127.0.0.1
auth.gameserver.port:4502

ban.ipfile:bannedip.txt

core.log.consolelevel:info
core.log.dir:log
core.log.enablefile:true
core.log.file:auth.log
core.log.level:info

upload.clients.autostart:true
upload.clients.ip:0.0.0.0
upload.clients.port:4617
upload.clients.webport:80

upload.dir:upload

upload.gameserver.autostart:true
upload.gameserver.ip:127.0.0.1
upload.gameserver.port:4616
This version of the emu does not allow changing the table name (dbo.Account). If your table has a different name, it's possible to create a view to mirror it's content like that:
Code:
CREATE VIEW dbo.Account AS SELECT * FROM dbo.Accounts;
(replace dbo.Accounts without your current existing table)
Attached Files
File Type: zip auth.opt.zip (557 Bytes, 18 views)
glandu2 is offline  
Thanks
2 Users
Old   #12
 
elite*gold: 0
Join Date: Jul 2011
Posts: 1
Received Thanks: 0
Thanks
tking88 is offline  
Old   #13
 
elite*gold: 30
Join Date: Mar 2012
Posts: 626
Received Thanks: 280
one more question.

does this emu works with MySQL any way? maybe it supports special SQL driver or whatever?
mongreldogg is offline  
Old   #14
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 768
Yes, but you need the new version 2:

You need the MySQL ODBC driver x86, see here:
And you need to change the connection string in the auth config:
Code:
auth.db.connectionstring:Driver={MySQL ODBC 5.3 AINSI Driver};Server=127.0.0.1;Database=Auth;Uid=myUsername;Pwd=myPassword;


glandu2 is offline  
Reply

Tags
auth, emu, rappelz, rappelz auth emu



« Previous Thread | Next Thread »

Similar Threads
[RELEASE]Sframe Unpacked
Hi all small post for say I will try to always make an unpacked version for each rappelz update of the sframe... (The last one) Sframe V3...
49 Replies - Rappelz Private Server
[RELEASE] Sframe - Epic3 Unpacked
NULLED
22 Replies - Rappelz Private Server



All times are GMT +2. The time now is 17:07.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy
Copyright ©2017 elitepvpers All Rights Reserved.