Poseidon: Difference between revisions

From OpenKore Wiki
Jump to navigation Jump to search
No edit summary
Line 3: Line 3:
: Original game client (with HackShield) connected to Poseidon server provides data for OpenKore connected to real game server.  
: Original game client (with HackShield) connected to Poseidon server provides data for OpenKore connected to real game server.  
: The RO server sends a packet to the client, and the client must response with an appropriate packet.
: The RO server sends a packet to the client, and the client must response with an appropriate packet.
: Servers like cRO, kRO, twRO and vRO use GameGuard.  
: Servers like cRO, kRO, jRO, twRO and vRO use GameGuard.  


= Overview =
= Overview =
Line 22: Line 22:


= Configuration =
= Configuration =
== Ragnarok Client (Ragexe) ==
# Extract <code>clientinfo.xml</code> from you ragnarok client <code>data.grf</code> file (use GRF Editor [https://www.mediafire.com/file/aflylbhblrzpz0h/GRF_Editor_v1.8.4.1.zip/file])
#: [[File:grfeditorextract.png|800px]]
# rename it to <code>poseidon.xml</code> and place in <code>ragnarok/data</code> directory.
#: [[File:renameposeidonxml.png|800px]]
# Open <code>poseidon.xml</code> using any text editor (Recommended Notepad++[https://notepad-plus-plus.org/downloads/]) and change <code>address</code> to your Poseidon server address (<code>127.0.0.1</code> or <code>localhost</code> for same computer). Change <code>port</code> to <code>6900</code>. ''(These magic numbers are constants from <code>src/Poseidon/poseidon.pl</code> source.)'' Change 'display' to anything you want to distinguish between Poseidon connection and your original.
# If your clientinfo.xml has the 'domain' tag, change it to <code>ip:port</code> (<code>ex: 127.0.0.1:6900</code>)
#: [[File:poseidonxmledit.png]]
Example of edited clientinfo:
<pre><?xml version="1.0" encoding="euc-kr" ?>
<clientinfo>
<servicetype>russia</servicetype>
<servertype>primary</servertype>
<extendedslot></extendedslot>
<connection>
<display>Poseidon</display>
<desc>None</desc>
<domain>127.0.0.1:6900</domain>
<address>127.0.0.1</address>
<port>6900</port>
<version>1</version>
<langtype>4</langtype>
<registrationweb>http://rofan.ru/</registrationweb>
</connection>
</clientinfo></pre>
== OpenKore ==
# Make sure your server connection settings have "[[gameGuard|gameGuard 1]]" (check <code>tables/servers.txt</code>).
#: [[File:serversgameguard.png]]
# Go to <code>control/poseidon.txt</code> and change <code>server_type=Default</code> to your server. (list available at <code>src/Poseidon/servertypes.txt</code>)
#: [[File:poseidonservertype.png|800px]]
= Running =
# Start <code>src/Poseidon/poseidon.pl</code> or <code>start-poseidon.exe</code>, wait for message 'Poseidon initialized'.
#: [[File:initializedposeidon.png]]
# Open cmd, go to ragnarok folder and start the ragexe, use the following arguments to make ragexe load the custom poseidon.xml:
#* Regular client (twRO, cRO): <code>Ragexe.exe 1rag1 /account:poseidon.xml</code>
#* jRO client: <code>Ragexe.exe 1rag1 -w -u:12345RO -p:be407f3a32e47d2b5cef6acb8f14724146a720cd /account:poseidon.xml</code>
#* kRO client: <code>Ragexe.exe 1rag1 -t:DummyToken DummyUser  G Ragnarok /account:poseidon.xml</code>
#* kRO Zero client: <code>Ragexe.exe 1rag1 -t:DummyToken DummyUser  G RagnarokZero /account:poseidon.xml</code>
#* vRO client: <code>Ragexe.exe 1rag1 User=DummyUser Token=DummyToken BToken=DummyBToken /account:poseidon.xml</code>
#: [[File:startragexe.png|800px]]
# Select Poseidon service (if prompted), input any login and password, select any character.
#: [[File:selectcharacter.png|800px]]
# You should appear in Novice Training Center and be able to see and talk with NPC (you will not be able to walk or do anything other than talking with NPC).
#: [[File:mapserver.jpg|800px]]
# Start OpenKore (start.exe, wxstart.exe or openkore.pl).
= Advanced configuration =


== Poseidon server ==
== Poseidon server ==
The basic settings of the Poseidon server are in the <code>control\poseidon.txt</code> file:


Constants in poseidon.pl:
;ragnarokserver_ip=127.0.0.1
; RAGNAROK_SERVER_HOST, RAGNAROK_SERVER_PORT
;ragnarokserver_port=6900
: Host/port where ragnarok client will connect (Ragexe)
: Here you'll define the IP Address and the Port where Poseidon will keep waiting for your ragnarok online client to connect.
; QUERY_SERVER_HOST, QUERY_SERVER_PORT
: Host/port where poseidon clients will connect (OpenKore)


=== Command-line arguments ===
; queryserver_ip=0.0.0.0
; queryserver_port=24390
: Here you'll define the IP Address and the Port where Poseidon will keep waiting for OpenKore to connect and send the GG/HS queries.


; --file=<string>
; server_type=Default
: Tells poseidon where to find poseidon.txt
: Here you have to specify your current server type in order to the poseidon operate properly! See <code>src\Poseidon\servertypes.txt</code> for available servertypes.
: For instance: <code>./poseidon.pl --file=bar/foo/myfile.txt</code>


; --ragnarokserver_ip=<address>
; debug=0
: Starts the Ragnarok Server (where the Ragnarok client will connect) at given address
: Enable debug messages


; --ragnarokserver_port=<port>
== Ragnarok Client (Ragexe) ==
: Starts the Ragnarok Server (where the Ragnarok client will connect) at given port


; --queryserver_ip=<address>
Use the <code>clientinfo.xml</code> file to connect the Ragnarok client to the Poseidon server.
: Starts the Query Server (where openkore client will connect) at given address


; --queryserver_port=<address>
; You can use the following commands to start the Ragnarok client with the required parameters:
: Starts the Query Server (where openkore client will connect) at given port
* cRO: <code>Ragexe.exe 1rag1 /account:poseidon.xml</code>
* jRO client: <code>Ragexe.exe 1rag1 -w -u:12345RO -p:be407f3a32e47d2b5cef6acb8f14724146a720cd /account:poseidon.xml</code>
* kRO client: <code>Ragexe.exe 1rag1 -t:DummyToken DummyUser  G Ragnarok /account:poseidon.xml</code>
* kRO Zero client: <code>Ragexe.exe 1rag1 -t:DummyToken DummyUser  G RagnarokZero /account:poseidon.xml</code>
* twRO: <code>Ragexe.exe 1rag1</code>
* vRO client: <code>Ragexe.exe 1rag1 User=DummyUser Token=DummyToken BToken=DummyBToken /account:poseidon.xml</code>


; --server_type=<string>
; See examples for connecting OpenKore:
: Selects a server type (see src/Poseidon/servertypes.txt for available servertypes)
* [[Configuring_Poseidon_for_vRO]]
: For instance: <code>./poseidon.pl --server_type=bRO_2016-11-08a</code>
* [[Configuring_Poseidon_for_twRO]]


; --debug=<boolean>
== OpenKore ==
: Interesting for developers, poseidon will now output some extra info


# Make sure your server connection settings have "[[gameGuard|gameGuard 1]]" (check <code>tables/servers.txt</code>).
#: [[File:serversgameguard.png]]
# Make sure that the values of the <code>poseidonServer</code> and <code>poseidonPort</code> parameters in the <code>control\config.txt</code> file match to the <code>queryserver_ip</code> and <code>queryserver_port</code> values from the <code>control\poseidon.txt</code> file.


* Notes
= Launching a fake Poseidon server =
** You can use any combination of those
** If you provide <code>ragnarokserver_ip</code>, <code>ragnarokserver_port</code>, <code>queryserver_ip</code>, <code>queryserver_port</code> and <code>server_type</code>, no file will be loaded.
** If neither <code>file</code> nor all the necessary command line arguments are given, poseidon will default to the default behavior of trying to load <code>../../control/poseidon.txt</code>, <code>./control/poseidon.txt</code>, or <code>./poseidon.txt</code> -- in that order.
** Command line arguments have priority over the configuration file. For instance, if you use <code>--ragnarokserver_ip=<address></code>, the Ragnarok Server will be hosted at that address, not the one in the configuration file.
** This feature is only available after PR [https://github.com/OpenKore/openkore/pull/1273 #1273] (15 Oct 2017)


== Poseidon client (OpenKore) ==
There are two choices:


Options in config.txt:
# Start <code>start-poseidon.exe</code>
; poseidonServer, poseidonPort
#: This application reads settings from a <code>control\poseidon.txt</code> file, then runs the <code>src\Poseidon\poseidon.pl</code> script. No Perl is required to run the script.
: Host/port of Poseidon server (QUERY_SERVER connection is Poseidon)
# Start <code>src/Poseidon/poseidon.pl</code> with parameters. You need Perl to run the script, or you can use: <code>start.exe ! src\Poseidon\poseidon.pl</code>
#: You can use the following arguments:
#:; --file=<string>
#:: specify the location of the <code>poseidon.txt</code> file (default: <code>control\poseidon.txt</code>)
#:: For example: <code>src\Poseidon\poseidon.pl --file=control\twRO\poseidon.txt</code>
#:; --ragnarokserver_ip=<address>
#:; --ragnarokserver_port=<port>
#:: Starts the Ragnarok Server (where the Ragnarok client will connect) at given address and port
#:; --queryserver_ip=<address>
#:; --queryserver_port=<address>
#:: Starts the Query Server (where openkore client will connect) at given address and port
#:; --server_type=<string>
#:: Selects a server type (see <code>src\Poseidon\servertypes.txt</code> for available servertypes)
#:; --debug=<[[boolean]]>
#:: Interesting for developers, poseidon will now output some extra info
#: For example: <code>src\Poseidon\poseidon.pl --server_type=twRO_2021-06-21 --ragnarokserver_ip=192.168.1.5 --ragnarokserver_port=6900</code>
::; Notes:
::* You can use any combination of those
::* If you provide <code>ragnarokserver_ip</code>, <code>ragnarokserver_port</code>, <code>queryserver_ip</code>, <code>queryserver_port</code> and <code>server_type</code>, no file will be loaded.
::* If neither <code>file</code> nor all the necessary command line arguments are given, poseidon will default to the default behavior of trying to load <code>../../control/poseidon.txt</code>, <code>./control/poseidon.txt</code>, or <code>./poseidon.txt</code> -- in that order.
::* Command line arguments have priority over the configuration file. For instance, if you use <code>--ragnarokserver_ip=<address></code>, the Ragnarok Server will be hosted at that address, not the one in the configuration file.
::* This feature is only available after PR [https://github.com/OpenKore/openkore/pull/1273 #1273] (15 Oct 2017)


== Notes ==
== Notes ==
* If game client protection detects OpenKore binaries, run Poseidon without binaries (install Perl) or on another (maybe virtual) machine.
* If game client protection detects OpenKore binaries, run Poseidon without binaries (install Perl) or on another (maybe virtual or WSL) machine.

Revision as of 00:26, 25 October 2021

Poseidon is a counter-measure for nProtect GameGuard (HackShield).

Original game client (with HackShield) connected to Poseidon server provides data for OpenKore connected to real game server.
The RO server sends a packet to the client, and the client must response with an appropriate packet.
Servers like cRO, kRO, jRO, twRO and vRO use GameGuard.

Overview

Poseidon works like this
1. Poseidon sets up a fake RO server (let us call it PoseidonRO).
2. RO client connects to PoseidonRO.
3. Poseidon sets up another server socket for communication with OpenKore.
4. OpenKore connects to real RO server and Poseidon.
5. Real RO server sends GameGuard query to OpenKore.
6. OpenKore sends GameGuard query to Poseidon.
7. Poseidon sends GameGuard query to RO client.
8. RO client sends a reply.
9. Poseidon sends reply to OpenKore.
10. OpenKore sends reply to real RO server.

Fluxogram

Poseidon workflow.jpg

Configuration

Poseidon server

The basic settings of the Poseidon server are in the control\poseidon.txt file:

ragnarokserver_ip=127.0.0.1
ragnarokserver_port=6900
Here you'll define the IP Address and the Port where Poseidon will keep waiting for your ragnarok online client to connect.
queryserver_ip=0.0.0.0
queryserver_port=24390
Here you'll define the IP Address and the Port where Poseidon will keep waiting for OpenKore to connect and send the GG/HS queries.
server_type=Default
Here you have to specify your current server type in order to the poseidon operate properly! See src\Poseidon\servertypes.txt for available servertypes.
debug=0
Enable debug messages

Ragnarok Client (Ragexe)

Use the clientinfo.xml file to connect the Ragnarok client to the Poseidon server.

You can use the following commands to start the Ragnarok client with the required parameters
  • cRO: Ragexe.exe 1rag1 /account:poseidon.xml
  • jRO client: Ragexe.exe 1rag1 -w -u:12345RO -p:be407f3a32e47d2b5cef6acb8f14724146a720cd /account:poseidon.xml
  • kRO client: Ragexe.exe 1rag1 -t:DummyToken DummyUser G Ragnarok /account:poseidon.xml
  • kRO Zero client: Ragexe.exe 1rag1 -t:DummyToken DummyUser G RagnarokZero /account:poseidon.xml
  • twRO: Ragexe.exe 1rag1
  • vRO client: Ragexe.exe 1rag1 User=DummyUser Token=DummyToken BToken=DummyBToken /account:poseidon.xml
See examples for connecting OpenKore

OpenKore

  1. Make sure your server connection settings have "gameGuard 1" (check tables/servers.txt).
    serversgameguard.png
  2. Make sure that the values of the poseidonServer and poseidonPort parameters in the control\config.txt file match to the queryserver_ip and queryserver_port values from the control\poseidon.txt file.

Launching a fake Poseidon server

There are two choices:

  1. Start start-poseidon.exe
    This application reads settings from a control\poseidon.txt file, then runs the src\Poseidon\poseidon.pl script. No Perl is required to run the script.
  2. Start src/Poseidon/poseidon.pl with parameters. You need Perl to run the script, or you can use: start.exe ! src\Poseidon\poseidon.pl
    You can use the following arguments:
    --file=<string>
    specify the location of the poseidon.txt file (default: control\poseidon.txt)
    For example: src\Poseidon\poseidon.pl --file=control\twRO\poseidon.txt
    --ragnarokserver_ip=<address>
    --ragnarokserver_port=<port>
    Starts the Ragnarok Server (where the Ragnarok client will connect) at given address and port
    --queryserver_ip=<address>
    --queryserver_port=<address>
    Starts the Query Server (where openkore client will connect) at given address and port
    --server_type=<string>
    Selects a server type (see src\Poseidon\servertypes.txt for available servertypes)
    --debug=<boolean>
    Interesting for developers, poseidon will now output some extra info
    For example: src\Poseidon\poseidon.pl --server_type=twRO_2021-06-21 --ragnarokserver_ip=192.168.1.5 --ragnarokserver_port=6900
Notes
  • You can use any combination of those
  • If you provide ragnarokserver_ip, ragnarokserver_port, queryserver_ip, queryserver_port and server_type, no file will be loaded.
  • If neither file nor all the necessary command line arguments are given, poseidon will default to the default behavior of trying to load ../../control/poseidon.txt, ./control/poseidon.txt, or ./poseidon.txt -- in that order.
  • Command line arguments have priority over the configuration file. For instance, if you use --ragnarokserver_ip=<address>, the Ragnarok Server will be hosted at that address, not the one in the configuration file.
  • This feature is only available after PR #1273 (15 Oct 2017)

Notes

  • If game client protection detects OpenKore binaries, run Poseidon without binaries (install Perl) or on another (maybe virtual or WSL) machine.