Executing GM Command using PHP

04/29/2013 15:46 Mystical-Online#1
Dear Community,

searched the whole web for suggestions or maybe a complete solution to execute GM commands out of PHP scripts.

Does anyone know something about it, maybe any knowledge about the communication between server an SMC?

Looking forward for some interesting suggestions, ideas and information.

Your team of Mystical Online
04/29/2013 23:51 Devsome#2
You can write commands in the world wide web with PHP and any Char you logged in (clientless or not) are reading your commands and execute it.
04/30/2013 11:09 Mystical-Online#3
Hi Devsome,

can you give me more information about that? How does it work exactly?
I read the term clientless many times for now, are there any suggestions to realize a something like a API between Server an PHP?
04/30/2013 12:28 kevin_owner#4
Well the easiest way I can come up with is to use the PHP Server List example PushEdx created. It has all the code included to connect with a program which has the standard silkroad security.

So what you need to do is to connect with the PHP to the GlobalManager, get some info of the packets you need (Reverse them with a proxy or mabye someone released info about these packets). Then you "simply" create some webpages which send these packets to the GlobalManager.
04/30/2013 13:17 LastThief*#5
Quote:
Originally Posted by kevin_owner View Post
Well the easiest way I can come up with is to use the PHP Server List example PushEdx created. It has all the code included to connect with a program which has the standard silkroad security.

So what you need to do is to connect with the PHP to the GlobalManager, get some info of the packets you need (Reverse them with a proxy or mabye someone released info about these packets). Then you "simply" create some webpages which send these packets to the GlobalManager.
Adding to this quote :
You need to identify yourself to global manager as "ServiceManager" to allow you to pass, then start sniffing packets from smc then send them using php.

You need to ping the global manager with 7204 each second and 2002 each 4 seconds to keep the connection alive or global manager will just disconnect you off.

Just as an example of logging in global manager

Code:
if (packet.Opcode == 0x6005)
                        {
                            Packet loginauth = new Packet(0x7001);
                            loginauth.WriteAscii(Convert.ToString(Base.ini.GetValue("SMC_AUTH", "ID")));
                            loginauth.WriteAscii(cMD5.ConvertStringToMD5(Convert.ToString(Base.ini.GetValue("SMC_AUTH", "PW"))));
                            loginauth.WriteAscii(cMD5.ConvertStringToMD5(""));
                            loginauth.WriteUInt16(24);
                            loginauth.WriteUInt16(0);

                            gw_security.Send(loginauth);

                        }
Have fun !
05/01/2013 07:54 Mystical-Online#6
Hi,

nice information are there existing classes or do you use a class in sample which you build up on your own?

There're many things used php before, but packet sniffing with php is completely new to me anything special to watch out for?
05/01/2013 11:57 cyberninjah#7
You can have take watch to this:
[Only registered and activated users can see links. Click Here To Register...]