![]() |
Sending Rcon commands via UDP
Ho folks,
I'm trying to write my own little app in VB much like Crow Kings AutoKick. I know I have to use the Winsock control and send via UDP and that's all set up with the correct IP and Port but how exactly do I form the syntax to send and receive the info back??? If I use something along the lines of "rconpassord ****" or "rcon status" all I receive back is "ÿÿÿÿdisconnect" It's driving me mad. Can someone throw me a few pointers please? Many thanks Mr. Monkey |
Re: Sending Rcon commands via UDP
[quote="mr.monkey":aa3b4]Ho folks,
I'm trying to write my own little app in VB much like Crow Kings AutoKick. I know I have to use the Winsock control and send via UDP and that's all set up with the correct IP and Port but how exactly do I form the syntax to send and receive the info back??? If I use something along the lines of "rconpassord ****" or "rcon status" all I receive back is "ÿÿÿÿdisconnect" It's driving me mad. Can someone throw me a few pointers please? Many thanks Mr. Monkey[/quote:aa3b4] um.... packet capture? post this over in board of developers too. r3mix |
Re: Sending Rcon commands via UDP
[quote="mr.monkey":53e33]Ho folks,
I'm trying to write my own little app in VB much like Crow Kings AutoKick. I know I have to use the Winsock control and send via UDP and that's all set up with the correct IP and Port but how exactly do I form the syntax to send and receive the info back??? If I use something along the lines of "rconpassord ****" or "rcon status" all I receive back is "ÿÿÿÿdisconnect" It's driving me mad. Can someone throw me a few pointers please? Many thanks Mr. Monkey[/quote:53e33] You need to include a header before you send the rcon text to the server. Q3 (and thus MOHAA) have a 4 byte header at the beginning which should just be 0xff (ASCII 255) four times, plus an extra byte that MOHAA always has set to 2. You also should (must?) include each seperate word of the command it a seperate quote, as this is what the game itself does. So, to send "rcon status" with a password of "bleh", you'd send: 255, 255, 255, 255, 2, and then the string rcon bleh "status". I've got a quick C implementation [url=http://stats.clanfx.com/download/moh-rcon.c.txt:53e33]here[/url:53e33]. So something like: [code:53e33] header = Chr$(255) + Chr$(255) + Chr$(255) + Chr$(255) + Chr$(2) [/code:53e33] would work in VB to get the header, and I have no desire in learning any more VB to do the rest. You similarly want to strip the header from the response. - influx |
You're a star. Thanks a lot buddy :)
|
Monkey Monkey Monkey Monkey Monkey Monkey Monkey oOo:
|
Anyone know how this would work in Java?
|
All times are GMT -6. The time now is 04:47 AM. |
Powered by vBulletin® Version 3.8.12 by ScriptzBin
Copyright ©2000 - 2025, vBulletin Solutions Inc.
© 1998 - 2007 by Rudedog Productions | All trademarks used are properties of their respective owners. All rights reserved.